need help with a pull like a black hole

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

rafti123

Member
Feb 2, 2025
10
0
1
command /shield:
trigger:
give player unbreakable shield of mending named "<#880e4f>&lᴅɪᴍᴇɴs<#9b135c>&lɪᴏ<#c2185b>&lɴᴀʟ <#e91e63>&lsʜɪ<#f06292>&lᴇʟᴅ" with lore "&6ᴘᴀssɪᴠᴇ", and "<#8a5886> ʀᴇsɪsᴛᴀɴᴄᴇ 1", " ", "&6(&fʀᴍʙ&6) <#880e4f>Domain Expansion&7:", " &e- &7Creates a domain that does &7damage"

every 10 seconds:
loop all players:
loop all items in inventory of loop-player:
if name of loop-item is "<#880e4f>&lᴅɪᴍᴇɴs<#9b135c>&lɪᴏ<#c2185b>&lɴᴀʟ <#e91e63>&lsʜɪ<#f06292>&lᴇʟᴅ":
remove resistance from loop-player
apply resistance 1 to loop-player for 10.1 seconds

on rightclick with shield:
if name of player's tool is "<#880e4f>&lᴅɪᴍᴇɴs<#9b135c>&lɪᴏ<#c2185b>&lɴᴀʟ <#e91e63>&lsʜɪ<#f06292>&lᴇʟᴅ":
if {shield.cooldown::%player's uuid%} is set:
set {_timeleft} to difference between {shield.cooldown::%player's uuid%} and now
if {_timeleft} < 10 seconds:
set {_remainingtime} to 10 seconds - {_timeleft}
send "&cYou must wait %{_remainingtime}% before using this again!" to player
stop
set {shield.cooldown::%player's uuid%} to now

set {_loc} to location of player
add 5 to y-coordinate of {_loc} # Position particles above player
set {_s} to 4
play sound "entity.zombie_villager.converted" with volume 20 and pitch 1 at player
play sound "block.beacon.power_select" with volume 20 and pitch 1 at player
play sound "block.beacon.activate" with volume 20 and pitch 2 at player
play sound "block.respawn_anchor.deplete" with volume 20 and pitch 1 at player
play sound "block.respawn_anchor.set_spawn" with volume 20 and pitch 1 at player
play sound "entity.lightning_bolt.thunder" with volume 20 and pitch 0.8 at player
play sound "item.axe.scrape" with volume 20 and pitch 0.5 at player
DomainExpansion({_s}, {_loc}, 300)
wait 1 tick
# Remove the DomainExpansionLast call to prevent duplicate circles
set {_remainingtime} to 10
loop 10 times:
send action bar "<#880e4f>&lᴅɪᴍᴇɴs<#9b135c>&lɪᴏ<#c2185b>&lɴᴀʟ <#e91e63>&lsʜɪ<#f06292>&lᴇʟᴅ&r &7&lᴄᴏᴏʟᴅᴏᴡɴ: &f%{_remainingtime}%s" to player
wait 1 second
subtract 1 from {_remainingtime}
delete {shield.cooldown::%player's uuid%}
send "&a&l✔ &f&lYour <#880e4f>&lᴅɪᴍᴇɴs<#9b135c>&lɪᴏ<#c2185b>&lɴᴀʟ <#e91e63>&lsʜɪ<#f06292>&lᴇʟᴅ &f&lis &a&oʀᴇᴀᴅʏ" to player

function DomainExpansion(s: number, p: location, duration: number):
set {_spacing} to 0.5
set {_pl} to {_p} # Use the location that was already adjusted above

set {_circumference} to 10 * pi * {_s}
set {_numParticles} to floor({_circumference} / {_spacing})

set {_ticks} to 0
while {_ticks} < {_duration}: # Run for 'duration' ticks
loop {_numParticles} times:
set {_angle} to loop-value * 360 / {_numParticles}
set {_pitch} to random number between -90 and 90 # Keep full range as requested
set {_v} to spherical vector with radius 1.5, yaw {_angle} and pitch {_pitch}
draw 1 of dust using dustOption(rgb(0, 0, 0), 1) at {_pl} ~ {_v} with extra 0.000000001 with force


# Create a damage location at player's position (not above where particles are)
set {_damage_loc} to {_p}
loop all entities in world of {_damage_loc}:
if loop-entity is within {_s} blocks of {_damage_loc}:
damage loop-entity by 2.5 hearts

add 1 to {_ticks}
wait 1 tick

function DomainExpansionLast(s: number, p: location, duration: number):
# This function is no longer called to avoid duplicate circles
set {_pl} to {_p}
DomainExpansion({_s}, {_pl}, {_duration})
wait 0.3 seconds

on rightclick with shield:
if name of player's tool is "<#880e4f>&lᴅɪᴍᴇɴs<#9b135c>&lɪᴏ<#c2185b>&lɴᴀʟ <#e91e63>&lsʜɪ<#f06292>&lᴇʟᴅ":
if {shield.cooldown::%player's uuid%} is set:
set {_timeleft} to difference between {shield.cooldown::%player's uuid%} and now
if {_timeleft} < 10 seconds:
set {_remainingtime} to 10 seconds - {_timeleft}
send "&cYou must wait %{_remainingtime}% before using this again!" to player
stop
set {shield.cooldown::%player's uuid%} to now

set {_loc} to location of player
add 5 to y-coordinate of {_loc} # Position particles above player
set {_s} to 4
play sound "entity.zombie_villager.converted" with volume 20 and pitch 1 at player
play sound "block.beacon.power_select" with volume 20 and pitch 1 at player
play sound "block.beacon.activate" with volume 20 and pitch 2 at player
play sound "block.respawn_anchor.deplete" with volume 20 and pitch 1 at player
play sound "block.respawn_anchor.set_spawn" with volume 20 and pitch 1 at player
play sound "entity.lightning_bolt.thunder" with volume 20 and pitch 0.8 at player
play sound "item.axe.scrape" with volume 20 and pitch 0.5 at player
DomainExpansion({_s}, {_loc}, 300)
wait 1 tick
# Remove the DomainExpansionLast call to prevent duplicate circles
set {_remainingtime} to 10
loop 10 times:
send action bar "<#880e4f>&lᴅɪᴍᴇɴs<#9b135c>&lɪᴏ<#c2185b>&lɴᴀʟ <#e91e63>&lsʜɪ<#f06292>&lᴇʟᴅ&r &7&lᴄᴏᴏʟᴅᴏᴡɴ: &f%{_remainingtime}%s" to player
wait 1 second
subtract 1 from {_remainingtime}
delete {shield.cooldown::%player's uuid%}
send "&a&l✔ &f&lYour <#880e4f>&lᴅɪᴍᴇɴs<#9b135c>&lɪᴏ<#c2185b>&lɴᴀʟ <#e91e63>&lsʜɪ<#f06292>&lᴇʟᴅ &f&lis &a&oʀᴇᴀᴅʏ" to player


does anyone how to make it so the nearest entitys gets pulled towards the particles thanks
 
You could use a vector to pull multiple entities towards your desired location. An example would be:

Code:
loop all entities within radius {_radius} of {_loc}:
    if loop-entity is not player:
        set {_v} to vector between loop-entity and {_loc}
            push loop-entity {_v} with speed {_pushForce}

If you want to do this repetitively you can put it into a loop and put in a delay such as "wait 1 second". Keep in mind if you want this to work you need to set the variables.
 
You could use a vector to pull multiple entities towards your desired location. An example would be:

Code:
loop all entities within radius {_radius} of {_loc}:
    if loop-entity is not player:
        set {_v} to vector between loop-entity and {_loc}
            push loop-entity {_v} with speed {_pushForce}

If you want to do this repetitively you can put it into a loop and put in a delay such as "wait 1 second". Keep in mind if you want this to work you need to set the variables.
i am kinda confused it is possible u can add it in the skript for me