kill token not working

  • 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 community!

    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!

Status
Not open for further replies.
Mar 18, 2021
16
0
1
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%}
 
Status
Not open for further replies.