I making a reward gui but i want to command have a cooldown for example 1 hour cooldown but in my code that doesn't working and gui not appear.
this is a test version of command becouse i'm coding to everything work and when everything work i edit rewards.
Thanks in advance
code_language.skript:
command /fkit:
trigger:
if {fkit.%player%::cooldown} is not set:
set {_cooldown1} to "5 hours" parsed as timespan
set {fkit.%player%::cooldown} to difference between now and {_cooldown1}
set {fkit.%player%::cooldown} to now
open chest with 1 row named "&cFKit loot" to player
wait 1 tick
set {chance} to a random integer between 1 and 5
if {chance} is 1:
format slot 0 of player with feather named "&3Soon" with lore "&aComing Soon" to close then run [execute console command "/uikl %player%"]
if {chance} is between 2 and 5:
format slot 1 of player with 5 steak named "Steak" to close then run [execute console command "/uikl %player%"]
else:
message "&c[&bSkenia Items&c] You can use /fkit again after %difference between now and {fkit.%player%::cooldown}% seconds." to player
this is a test version of command becouse i'm coding to everything work and when everything work i edit rewards.
Thanks in advance