Tnt Wand Cooldown problems

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

Sep 30, 2024
2
0
1
22
```command /tntwand <integer>:
permission: tnt.wand
cooldown: 30 seconds
cooldown message: &cYou last got a wand %elapsed time% ago, you may get a wand again in %remaining time%.
trigger:
send message "&cYou have recieved a tnt wand!"
if arg-1 is 1:
give player a stick named "&cTNT Wand" with lore "&7Right-click to launch TNT!"
if arg-1 is 2:
give player a stick named "&cTNT Wand2" with lore "&7Right-click to launch TNT!"
if arg-1 is 3:
give player a stick named "&cTNT Wand3" with lore "&7Right-click to launch TNT!"
if arg-1 is 4:
give player a stick named "&cTNT Wand4" with lore "&7Right-click to launch TNT!"
if arg-1 is 5:
give player a stick named "&cTNT Wand5" with lore "&7Right-click to launch TNT!"
on right click with a stick:
set item cooldown of player's tool for player to 30 seconds
if player's tool is a stick named "&cTNT Wand":
if player has player's tool on cooldown:
send "&cYou can't use the tnt wand right now. Wait %item cooldown of player's tool for player%" to player
else:
shoot a primed tnt at speed 1
if player's tool is a stick named "&cTNT Wand2":
if player has player's tool on cooldown:
send "&cYou can't use the tnt wand right now. Wait %item cooldown of player's tool for player%" to player
else:
shoot a primed tnt at speed 2
if player's tool is a stick named "&cTNT Wand3":
if player has player's tool on cooldown:
send "&cYou can't use the tnt wand right now. Wait %item cooldown of player's tool for player%" to player
else:
shoot a primed tnt at speed 3
if player's tool is a stick named "&cTNT Wand4":
if player has player's tool on cooldown:
send "&cYou can't use the tnt wand right now. Wait %item cooldown of player's tool for player%" to player
else:
shoot a primed tnt at speed 4
if player's tool is a stick named "&cTNT Wand5":
if player has player's tool on cooldown:
send "&cYou can't use the tnt wand right now. Wait %item cooldown of player's tool for player%" to player
else:
shoot a primed tnt at speed 5```




how to make it so that there is a cooldown when I right click a stick to shoot tnt. The problem is that the cooldown keeps resetting and I have no idea how to make it work