on load:
createCooldown("dostawa", 24 hours)
createCooldown2("dostawa2", 24 hours)
function bGetMoney(m: text, player: player, money: integer):
close {_player}'s inventory
add {_money} to {_player}'s balance
send " &eOtrzymales (%{_money}%$)" to {_player}
setCooldown({_player}, {_m})
command /dostawa [<text>]:
trigger:
open chest with 3 row named "&0/dostawa" to player
if getCooldown(player, "dostawa"):
format gui slot 13 of player with diamond named "Dostawa" to run function bGetMoney("dostawa", player, 100)
else:
format gui slot 13 of player with barrier named " " with lore "&7> &eDostawa pieniedzy dla &lGRACZY" and "&cWroc tu za: &l%getCooldownText(player, ""dostawa"")%"
player has permission "dostawa.premium"
if getCooldown(player, "dostawa2"):
format gui slot 13 of player with diamond named "Dostawa" to run function bGetMoney("dostawa2", player, 100)
else:
format gui slot 14 of player with barrier named " " with lore "&7> &eDostawa pieniedzy dla &lPREMIUM" and "&cWroc tu za: &l%getCooldownText(player, ""dostawa2"")%"