Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on join:
- loop 9 times:
- add 1 to {_loopnum}
- set {_slot} to 0
- loop 54 times:
- if {storage.%UUID of player%.%{_loopnum}%::%{_slot}%} is not set:
- set {storage.%UUID of player%.%{_loopnum}%::%{_slot}%} to air
- add 1 to {_slot}
- command /storage:
- trigger:
- open chest with 1 row named "&aStorage Menu" to player
- wait 1 tick
- loop 9 times:
- set {_slot} to loop-number - 1
- set slot {_slot} of player's current inventory to chest named "&6Storage &eNo.%loop-number%"
- on inventory click:
- inventory name of clicked inventory is "&aStorage Menu"
- inventory type of clicked inventory is "CHEST"
- "%clicked inventory%" is "inventory of <none>"
- clicked item is chest
- name of clicked item contain "&6Storage &eNo."
- play sound "BLOCK_CHEST_OPEN" to player with volume 1 and pitch 5
- set {_storagenumber} to name of clicked item
- replace "&6Storage &eNo." in {_storagenumber} with ""
- cancel event
- execute console command "menu create storage-%UUID of player%-%{_storagenumber}% 6 &6Storage &eNo.%{_storagenumber}%"
- execute console command "menu edit %player% storage-%UUID of player%-%{_storagenumber}%"
- on inventory close:
- inventory name of player's current inventory contain "&6Storage &eNo."
- inventory type of player's current inventory is "CHEST"
- play sound "BLOCK_CHEST_CLOSE" to player with volume 1 and pitch 5
Advertisement
Add Comment
Please, Sign In to add comment