Solved Spawn skript with delay

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

MuffinEmoji

Member
Jun 28, 2017
4
0
0
23
I need a spawn skript with delay, and when u move, u cancel the delay, the delay needs to be 3-5 seconds.. I tried myself but i cant, bcs i arent that good at skripting xd
 
ez....
code_language.skript:
command /spawn:
    trigger:
        set {Spawn::%player%} to 5
        send "Please don't move"
        while {Spawn::%player%} is not 0:
           wait a seconds
           subtract 1 from {Spawn::%player%}
        {Spawn::%player%} is 0
        teleport player to {spawn}

on any move:
    if {Spawn::%player%} is set:
        delete {Spawn::%player%}
        send "You moved..."