#Give
command /givebox:
permission: admin.admin
trigger:
give 1 stone named "&cMoney Box" to player
#Case
on rightclick with stone:
name of player's tool contains "&cMoney Box":
cancel event
set {_s} to -1
open chest with 1 rows named "&2&lMoney Box" to player
loop 9 times:
wait 1 tick
add 1 to {_s}
format slot {_s} of player with gray dye to run ""
execute console command "/playsound random.orb %player%"
set {_s} to -1
loop 9 times:
wait 3 tick
"%inventory name of current inventory of player%" is "&2&lMoney Box":
add 1 to {_s}
format slot {_s} of player with light green dye named "&a&l%random integer between 250 and 500%K" to run ""
execute console command "/playsound note.pling %player%"
set {_s} to -1
loop 9 times:
add 1 to {_s}
format slot {_s} of player with gray dye named "&a&l%random integer between 250 and 500%K" to run ""
execute console command "/playsound random.levelup %player%"
#LUCKY
chance of 50%:
format slot 4 of player with light green dye named "&a&l250K" to run ""
add 250000 to player's account
else if chance of 50%:
format slot 4 of player with light green dye named "&a&l350K" to run ""
add 350000 to player's account
else if chance of 50%:
format slot 4 of player with light green dye named "&a&l500K" to run ""
add 500000 to player's account