1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Spawn skript with delay

Discussion in 'Requests' started by MuffinEmoji, Jun 28, 2017.

  1. MuffinEmoji

    MuffinEmoji Member

    Joined:
    Jun 28, 2017
    Messages:
    4
    Likes Received:
    0
    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
     
  2. Best Answer:
    Post #2 by ShaneBee, Jun 28, 2017
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    ez....
    Code (Skript):
    1. command /spawn:
    2.     trigger:
    3.         set {Spawn::%player%} to 5
    4.         send "Please don't move"
    5.         while {Spawn::%player%} is not 0:
    6.            wait a seconds
    7.            subtract 1 from {Spawn::%player%}
    8.         {Spawn::%player%} is 0
    9.         teleport player to {spawn}
    10.  
    11. on any move:
    12.     if {Spawn::%player%} is set:
    13.         delete {Spawn::%player%}
    14.         send "You moved..."
    15.  
     
    Coolitoyce and JustADev like this.
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    Thank you! :*
     

Share This Page

Loading...