adding cooldown to this

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

sharpintel123

Member
May 4, 2024
17
0
1
33
command /stregthsword:
permission: stregth.sword
trigger:
set {cooldown} to difference between {cooldown.%player%} and now
if {cooldown} is less than 1 seconds:
send "&cYou must wait %difference between {cooldown} and 60 seconds% &cbefore using this wand again."
stop
set {cooldown.%player%} to now
give player 1 diamond sword of sharpness 5 and unbreaking 3 and fire aspect 2 and looting 3 and mending named "&7&m--&e&ka&6&lStregth Wand&e&ks&7&m--" with lore "&7Right click for 10s of stregth 4"

on right click:
player is holding 1 diamond sword of sharpness 5 and unbreaking 3 and fire aspect 2 and looting 3 and mending named "&7&m--&e&ka&6&lStregth Wand&e&ks&7&m--" with lore "&7Right click for 10s of stregth 4"

execute console command "effect give %player% minecraft:strength 11 3"

i need the cooldown here
on right click:
player is holding 1 diamond sword of sharpness 5 and unbreaking 3 and fire aspect 2 and looting 3 and mending named "&7&m--&e&ka&6&lStregth Wand&e&ks&7&m--" with lore "&7Right click for 10s of stregth 4"

execute console command "effect give %player% minecraft:strength 11 3"
if i cna get this to work ima make custom texturepack 3d for this item so dm sharpintel23982
 
just do the same thing?
oh i see what you mean now i got diffrent probblem timer goes up not down


command /stregthsword:
permission: stregth.sword
trigger:
set {cooldown} to difference between {cooldown.%player%} and now
if {cooldown} is less than 1 seconds:
send "&cYou must wait %difference between {cooldown} and 60 seconds% &cbefore using this wand again."
stop
set {cooldown.%player%} to now
give player 1 diamond sword of sharpness 5 and unbreaking 3 and fire aspect 2 and looting 3 and mending named "&7&m--&e&ka&6&lStregth Wand&e&ks&7&m--" with lore "&7Right click for 10s of stregth 4"

on right click:
player is holding 1 diamond sword of sharpness 5 and unbreaking 3 and fire aspect 2 and looting 3 and mending named "&7&m--&e&ka&6&lStregth Wand&e&ks&7&m--" with lore "&7Right click for 10s of stregth 4"

set {cooldown} to difference between {cooldown.%player%} and now
if {cooldown} is less than 1 seconds:
send "&cYou must wait %difference between {cooldown} and 5 seconds% &cbefore using this wand again." to player
stop
execute console command "effect give %player% minecraft:strength 11 3"
 
oh i see what you mean now i got diffrent probblem timer goes up not down


Code:
command /stregthsword:
  permission: stregth.sword
  trigger:
    set {cooldown} to difference between {cooldown.%player%} and now
    if {cooldown} is less than 1 seconds:
      send "&cYou must wait %difference between {cooldown} and 60 seconds% &cbefore using this wand again."
      stop
    set {cooldown.%player%} to now
    give player 1 diamond sword of sharpness 5 and unbreaking 3 and fire aspect 2 and looting 3 and mending  named "&7&m--&e&ka&6&lStregth Wand&e&ks&7&m--" with lore "&7Right click for 10s of stregth 4"
 
on right click:
  player is holding 1 diamond sword of sharpness 5 and unbreaking 3 and fire aspect 2 and looting 3 and mending  named "&7&m--&e&ka&6&lStregth Wand&e&ks&7&m--" with lore "&7Right click for 10s of stregth 4"
 
  set {cooldown} to difference between {cooldown.%player%} and now
  if {cooldown} is less than 1 seconds:
  send "&cYou must wait %difference between {cooldown} and 5 seconds% &cbefore using this wand again." to player
  stop
  execute console command "effect give %player% minecraft:strength 11 3"
Use code blocks in the further like I show above
 
also try this but didint work
on right click:
player is holding 1 diamond sword of sharpness 5 and unbreaking 3 and fire aspect 2 and looting 3 and mending named "&7&m--&e&ka&6&lStregth Wand&e&ks&7&m--" with lore "&7Right click for 10s of stregth 4"

if {strengthwand.cooldown.%player%} is not set or difference between {strengthwand.cooldown.%player%} and now > 10 seconds:
set {strengthwand.cooldown.%player%} to now
stop
execute console command "effect give %player% minecraft:strength 11 3"