So I have asked for help here before with the same thing, and got help, now i changed the skript like really much and I need help with the same thing: The players can execute the command while a booster is set. All help is appreciated. (If you didn't understand, I mean that when players have 2 boosters, they can run both at the same time. This is the code:
Code:
on join:
{booster.%Player%} isn't set
set {booster.%player%} to false
set {booster.n.%player%} to 0
command /booster:
aliases: /boosters
trigger:
wait 5 ticks
open chest with 3 rows named "&cBoosters" to player
format slot 12 of player with paper named "&c%{booster.n.%player%}% &7Booster(s)" with lore "&7You currently own &c%{booster.n.%player%}% &7Booster(s).||&7Purchase at &c/shop||&7||&7&oClick me to use a booster" to run [make player execute command "/boosteruse"]
format slot 14 of player with book named "&9&lBooster &7Info" with lore "&7What is a Boooster?||&7||&7&oA thing you can buy that||&7&ogives you more money||&7&owhen you kill someone.||&7&oIt lasts for 1 hour." to close
format slot 22 of player with redstone block named "&cClose" to close
format slot 0 of player with Red stained glass named "&eDecoration" to close
format slot 1 of player with Red stained glass named "&eDecoration" to close
format slot 2 of player with Red stained glass named "&eDecoration" to close
format slot 3 of player with Red stained glass named "&eDecoration" to close
format slot 4 of player with Red stained glass named "&eDecoration" to close
format slot 5 of player with Red stained glass named "&eDecoration" to close
format slot 6 of player with Red stained glass named "&eDecoration" to close
format slot 7 of player with Red stained glass named "&eDecoration" to close
format slot 8 of player with Red stained glass named "&eDecoration" to close
format slot 9 of player with Red stained glass named "&eDecoration" to close
format slot 17 of player with Red stained glass named "&eDecoration" to close
format slot 18 of player with Red stained glass named "&eDecoration" to close
format slot 19 of player with Red stained glass named "&eDecoration" to close
format slot 20 of player with Red stained glass named "&eDecoration" to close
format slot 21 of player with Red stained glass named "&eDecoration" to close
format slot 23 of player with Red stained glass named "&eDecoration" to close
format slot 24 of player with Red stained glass named "&eDecoration" to close
format slot 25 of player with Red stained glass named "&eDecoration" to close
format slot 26 of player with Red stained glass named "&eDecoration" to close
format slot 21 of player with Red stained glass named "&eDecoration" to close
command /boosteruse:
trigger:
if {booster} is not set:
if {booster.n.%player%} is more than or equal to 1:
remove 1 from {booster.n.%player%}
make console execute command "sk enable killermoney2"
make console execute command "sk disable killermoney"
set {booster} to true
broadcast "&8"
broadcast "&8[&cNight&8] &c%player% &7Activated a &9&lBalance Booster&7! &f(&c/shop&f)"
broadcast "&8"
wait 1 hour
make console execute command "sk disable killermoney2"
make console execute command "sk enable killermoney"
broadcast "&8[&cNight&8] &7The &9&lBalance Booster &7has ended."
set {booster} to false
else if {booster} is set:
send "&8[&cNight&8] &7There is already a running booster."
stop
if {booster.n.%player%} is equal to 0:
message "&8[&cNight&8] &7You dont have any boosters to use!"
stop
command /givebooster <player>:
usage: &c/givebooster <player>
trigger:
if sender has permission "boost.admin":
add 1 to {booster.n.%arg-1%}
send "&8[&cNight&8] &7You now have &c%{booster.n.%arg-1%}% &7booster(s) available!" to arg 1
command /endbooster:
permission: boost.admin
permission message: §8[§cNight§8] §7You do not have permission to end this booster.
trigger:
delete {booster}
make console execute command "sk enable killermoney"
make console execute command "sk disable killermoney2"
message "&8[&cNight&8] &7You successfully ended the &cBooster."
broadcast "&8[&cNight&8] &c%player% &7has force-ended the &9&lBalance Booster&7."
Last edited: