Can someone add a cooldown to this i've tried nearly everything

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Yushaa

Active Member
Oct 19, 2023
64
2
8
26
Code:

Code:
on sneak toggle:
        player is wearing elytra
        push player upwards at speed 2
        send action bar "&eUsed Voyager Boost | &cCD: &a15s"
on right click:
        player is wearing elytra
        push player forwards at speed 2
        send action bar "&eUsed Voyager Dash | &cCD: &a15s"
 
I added a cooldown to the script, I hope it's just the way you needed it ^^


JavaScript:
on sneak toggle:
    if {-c.%player%} is not set:
        player is wearing elytra
        push player upwards at speed 2
        send action bar "&aUsed Voyager Boost"
        set {-c.%player%} to 15
        loop 15 times:
            wait 1 second
            remove 1 from {-c.%player%}
        delete {-c.%player%}
        send action bar "&aVoyager Boost is ready to use"
    else:
        send action bar "&eUsed Voyager Boost | &cCD: &a%{-c.%player%}%s"