Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /rankshop:
- permission: rankshop.command
- trigger:
- play sound "block.stone_button.click_on" with volume 10 to player
- set metadata tag "Rankshop" of player to chest inventory with 3 rows named "RANK SHOP"
- 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"
- 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"
- 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"
- open (metadata tag "Rankshop" of player) to player
- on inventory click:
- if event-inventory = (metadata tag "Rankshop" of player):
- cancel event
- if index of event-slot is 11:
- if player has permission "iron":
- send "&3You already have a rank that is the same or better!" to player
- stop
- else:
- if {balance::%player's uuid%} > 500000:
- remove 500000 from {balance::%player's uuid%}
- execute console command "lp user %player% parent add iron"
- broadcast "&7%player% has purchased &f&lIron &7Rank from /rankshop!"
- if index of event-slot is 13:
- if player has permission "diamond":
- send "&3You already have a rank that is the same or better!" to player
- stop
- else:
- if {balance::%player's uuid%} > 1000000:
- remove 1000000 from {balance::%player's uuid%}
- execute console command "lp user %player% parent add diamond"
- broadcast "&7%player% has purchased &b&lDiamond &7Rank from /rankshop!"
- if index of event-slot is 15:
- if player has permission "emerald":
- send "&3You already have a rank that is the same or better!" to player
- stop
- else:
- if {balance::%player's uuid%} > 5000000:
- remove 5000000 from {balance::%player's uuid%}
- execute console command "lp user %player% parent add emerald"
- broadcast "&7%player% has purchased &a&lEmerald &7Rank from /rankshop!"
Add Comment
Please, Sign In to add comment