Hi, I am having some problems with my skript. The problem im having is that when i loop all the players and push them back / ignite them it is pushing/igniting the player who used the ability as well which I don't want to happen.
Here is my skript:
Here is my skript:
code_language.skript:
#summon lightning at an area nearby.
on rightclick with a golden axe:
if player is holding a golden axe named "&6&l&o&kHH&e&l&oThor's Hammer&6&l&o&kHH":
if {thundercooldown::%player%} is not set:
if player is not sneaking:
strike lightning at the targeted block
set {thundercooldown::%player%} to true
wait 7 seconds
clear {thundercooldown::%player%}
else: #right click while sneaking to push players around you back
loop all players in radius 5 around player:
push loop-player backwards at speed 5
set {knockcooldown::%player%} to true
wait 10 seconds
clear {knockcooldown::%player%}
if {thundercooldown::%player%} is set:
send "&4This ability is on cooldown."
# make players around you burst into flames.
on rightclick with a iron sword:
if player is holding a iron sword named "&4»&c»&6»Blazing Blade&6«&c«&4«":
if {blazingcooldown::%player%} is not set:
loop all players in radius 3 around player:
ignite loop-player for 30 seconds
loop all blocks in radius 3 around player:
lerp 5 of flame at loop-block with offset vector(0, 1, 0) with extra 0.05
set {blazingcooldown::%player%} to true
wait 15 seconds
clear {blazingcooldown::%player%}
if {blazingcooldown::%player%} is set:
send "&4This ability is on cooldown."