Advertisement
Deni21dc

Application

Feb 19th, 2022
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. command /shop:
  2. trigger:
  3. set metadata tag "shop" of player to chest inventory with 8 rows named "&aShop"
  4. set slot 0 of metadata tag "shop" of player to diamond sword named "&rDiamond Sword $500" with lore "&aClick to buy a Diamond Sword"
  5. set slot 1 of metadata tag "shop" of player to iron chestplate named "Iron Set $1000" with lore "&aClick to buy full Iron Armor Set"
  6. open (metadata tag "shop" of player) to player
  7.  
  8. on inventory click:
  9. if event-inventory = (metadata tag "shop" of player):
  10. cancel event
  11. if index of event-slot is 0:
  12. if {money::%player%'s uuid} > 1000:
  13. give player 1 diamond sword
  14. remove 500 from {money::%player%'s uuid}
  15. send "&aSuccessfully bought a Diamond Sword!" to player
  16. else:
  17. send "&aYou're too poor!"
  18. if index of event-slot is 1:
  19. if {money::%player%'s uuid} > 1000:
  20. give player 1 iron helmet
  21. give player 1 iron chestplate
  22. give player 1 iron leggings
  23. give player 1 iron boots
  24. remove 1000 from {money::%player%'s uuid}
  25. send "&aSuccessfully bought Iron Set!" to player
  26. else:
  27. send "&aYou're too poor!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement