im trying to make a void spawn/kill skript involving a kill token but i cant seem to make it work if anyone can help pls do
Code:
every 1 second:
loop all players:
if loop-player's y coordinate is between 66 and 0:
if {VoidSpawnTp.%loop-player%} is false:
if {punched.%loop-player%} is true:
add 1 to {kills::%{puncher.%loop-player%}%}
add 1 to {deaths::%loop-player%}
set {VoidSpawnTp.%loop-player%} to true
teleport loop-player to {VoidSpawn.%loop-player's world%}
send title "&cYou got pushed into the &bvoid&c and died" with subtitle "&cTeleported back to &bspawn" to loop-player
broadcast "&b%{puncher.%loop-player%}% &7killed &b%loop-player% &7and got a &cKILL TOKEN"
give a sunflower named "&6Kill Token" to the {puncher.%loop-player%}
else:
set {VoidSpawnTp.%loop-player%} to true
teleport loop-player to {VoidSpawn.%loop-player's world%}
send title "&cYou fell into the &bvoid&c and died" with subtitle "&cTeleported back to &bspawn" to loop-player
on damage:
if victim is a player:
if attacker is a player:
set {punched.%victim%} to true
set {puncher.%victim%} to "%attacker%"
wait 10 seconds
set {punched.%victim%} to false
clear {puncher.%victim%}