Here the balance that was suppose to add 0.1 every 5 seconds isnt displaying on GUI
Code:
command /cryptominer:
trigger:
give player a sponge with name "&b&lMiner"
set {_player} to player's name
set {_mined} to 5
on right click:
if player's tool is a sponge with name "&b&lMiner":
open chest inventory with 3 rows named "&5&lCrypto Miner" to player
set slot 11 of player's current inventory to book named "&7" with lore "&fOwner: &b%player%" and "&7"
set slot 13 of player's current inventory to gold block named "&bYou currently have &a%{_mined}%&6₿" with lore "&7" and "&fRIGHT CLICK &7to withdraw your money"
set slot 15 of player's current inventory to sunflower named "&dCrypto type: &6₿" with lore "&7" and "&c❱ &fCosting around &a$33,154.05"
on block place:
if player's tool is a sponge with name "&b&lMiner":
cancel event
on inventory click:
if name of event-inventory is "&5&lCrypto Miner":
cancel event
if clicked slot is 13:
set {_dollars} to {_mined} * 33154.05
send "&aYou withdrew &f${_dollars}&a from your mining balance." to player
add {_dollars} to player's balance
on every 5 seconds:
add 0.1 to {_mined}
Last edited by a moderator: