MasterKyle08

rankshop

Feb 22nd, 2020 (edited)
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. command /rankshop:
  2. permission: rankshop.command
  3. trigger:
  4. play sound "block.stone_button.click_on" with volume 10 to player
  5. set metadata tag "Rankshop" of player to chest inventory with 3 rows named "RANK SHOP"
  6. set slot 11 of metadata tag "Rankshop" of player to iron block named "&lIron &fRank" with lore "&7Price: &a$500,000", "&aPerks: &7[&fIron&7] &fprefix"
  7. set slot 13 of metadata tag "Rankshop" of player to diamond block named "&b&lDiamond &fRank" with lore "&7Price: &a$1,000,000", "&aPerks: &7[&3Diamond&7] &fprefix"
  8. set slot 15 of metadata tag "Rankshop" of player to emerald block named "&a&lEmerald &fRank" with lore "&7Price: &a$5,000,000", "&aPerks: &7[&2Emerald&7] &fprefix"
  9. open (metadata tag "Rankshop" of player) to player
  10.  
  11. on inventory click:
  12. if event-inventory = (metadata tag "Rankshop" of player):
  13. cancel event
  14. if index of event-slot is 11:
  15. if player has permission "iron":
  16. send "&3You already have a rank that is the same or better!" to player
  17. stop
  18. else:
  19. if {balance::%player's uuid%} > 500000:
  20. remove 500000 from {balance::%player's uuid%}
  21. execute console command "lp user %player% parent add iron"
  22. broadcast "&7%player% has purchased &f&lIron &7Rank from /rankshop!"
  23. if index of event-slot is 13:
  24. if player has permission "diamond":
  25. send "&3You already have a rank that is the same or better!" to player
  26. stop
  27. else:
  28. if {balance::%player's uuid%} > 1000000:
  29. remove 1000000 from {balance::%player's uuid%}
  30. execute console command "lp user %player% parent add diamond"
  31. broadcast "&7%player% has purchased &b&lDiamond &7Rank from /rankshop!"
  32. if index of event-slot is 15:
  33. if player has permission "emerald":
  34. send "&3You already have a rank that is the same or better!" to player
  35. stop
  36. else:
  37. if {balance::%player's uuid%} > 5000000:
  38. remove 5000000 from {balance::%player's uuid%}
  39. execute console command "lp user %player% parent add emerald"
  40. broadcast "&7%player% has purchased &a&lEmerald &7Rank from /rankshop!"
  41.  
  42.  
  43.  
  44.  
  45.  
Add Comment
Please, Sign In to add comment