Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- break:
- event-block = coal ore:
- if player isn't sneaking:
- cancel event
- add 5 to player's balance
- send action bar "&f&l -&b&l + $5&f&l -" to player
- else:
- if player is op:
- set event-block to air
- event-block = iron ore:
- if player isn't sneaking:
- cancel event
- add 10 to player's balance
- send action bar "&f&l -&b&l + $10&f&l -" to player
- else:
- if player is op:
- set event-block to air
- command /upg:
- trigger:
- player's held item = any pickaxe:
- send ""
- send " &cOpening upgrade shop"
- send ""
- upg(player)
- else:
- send ""
- send " &cPlease hold your pickaxe"
- send ""
- function upg(p: player):
- play "BLOCK_CHEST_OPEN" to {_p}
- set {_uuid} to uuid of {_p}
- open virtual chest with 1 row named " &cUpgrade Shop" to {_p}
- set {_9} to 0
- loop 9 times:
- format gui slot {_9} of {_p} with black stained glass named "&a"
- add 1 to {_9}
- format gui slot 2 of {_p} with paper of efficiency 1 with no nbt named "&cEfficiency" with lore "&bCost:&7 $%{ecost::%{_uuid}%}%", "&bAdds:&7 $175" and "&bMax:&7 10" to run:
- if {_p}'s balance >= {ecost::%{_uuid}%}:
- if level of efficiency of {_p}'s tool < 10:
- add 175 to {ecost::%{_uuid}%}
- send "" to {_p}
- send " &cPurchased&b&l +1&c Efficiency" to {_p}
- send "" to {_p}
- send " &cNew price >&b&l %{ecost::%{_uuid}%}%" to {_p}
- send "" to {_p}
- enchant the tool of {_p} with "efficiency %level of efficiency of {_p}'s tool +1%" parsed as a enchantment type
- add 175 to {ecost::%{_uuid}%}
- subtract {ecost::%{_uuid}%} from {_p}'s balance
- else:
- send "" to {_p}
- send " &cEfficiency level is maxed!" to {_p}
- send "" to {_p}
- close {_p}'s inventory
- play "BLOCK_CHEST_CLOSE" to {_p}
- else:
- set {_needed} to {ecost::%{_uuid}%} - {_p}'s balance
- send "" to {_p}
- send " &cNot enough money!" to {_p}
- send "" to {_p}
- send " &cYou need >&b&l %{_needed}%&c more!" to {_p}
- send "" to {_p}
- close {_p}'s inventory
- play "BLOCK_CHEST_CLOSE" to {_p}
- format gui slot 4 of {_p} with paper of efficiency 1 with no nbt named "&cExplosive" with lore "&bCost:&7 $%{explosivecost::%{_uuid}%}%", "&bAdds:&7 $350" and "&bMax:&7 3" to run:
- if {_p}'s balance >= {explosivecost::%{_uuid}%}:
- if {exp::%{_uuid}%} < 3:
- send "" to {_p}
- send " &cPurchased&b&l +1&c Explosive" to {_p}
- send "" to {_p}
- send " &cNew price >&b&l %{explosivecost::%{_uuid}%}%" to {_p}
- send "" to {_p}
- add 350 to {explosivecost::%{_uuid}%}
- subtract {explosivecost::%{_uuid}%} from {_p}'s balance
- add 30 to {echance::%{_uuid}%}
- add 1 to {exp::%{_uuid}%}
- else:
- send "" to {_p}
- send " &cExplosive level is maxed!" to {_p}
- send "" to {_p}
- close {_p}'s inventory
- play "BLOCK_CHEST_CLOSE" to {_p}
- else:
- set {_needed} to {explosivecost::%{_uuid}%} - {_p}'s balance
- send "" to {_p}
- send " &cNot enough money!" to {_p}
- send "" to {_p}
- send " &cYou need >&b&l $%{_needed}%&c more!" to {_p}
- send "" to {_P}
- on inventory close:
- player's inventory name = " &cUpgrade Shop":
- play "BLOCK_CHEST_CLOSE" to player
- command /e:
- trigger:
- set {explosivecost::%player's uuid%} to 500
- set {exp::%player's uuid%} to 0
- delete {echance::%player's uuid%}
- set {ecost::%player's uuid%} to 250
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement