V0listic Posted September 16 Share Posted September 16 command /menu: trigger: set {_menu} to a new chest inventory with 3 row named "&6 Menu" set slot 13 of {_menu} to diamond named "&9Shop" # is the name of diamond item open {_menu} to player on inventory click: # Listen for players clicking in an inventory. name of event-inventory is "&6 Menu" cancel event set {_menu} to a new chest inventory with 3 row named "&9Shop" # opens a new chest called shop set slot 13 of {_menu} to diamond named "&2Buy for $157" open {_menu} to player on inventory click: name of event-inventory is "&9Shop" cancel event set {_menu} to a new chest inventory named "Buy" set slot integers from 0 to 26 of {_menu} to grey stained glass pane with name " " set slot 13 of {_menu} to diamond named "diamond" # is the name of diamond item set slot 12 of {_menu} to red stained glass pane named "&4-1" set slot 14 of {_menu} to green stained glass pane named "&2+1" set slot 22 of {_menu} to green dye named "&aConfirm" set slot 4 of {_menu} to red dye named "&cCancel" open {_menu} to player on inventory click: name of event-inventory is "&aBuy" cancel event if index of event-slot is 4: close player's inventory on inventory click: name of event-inventory is "&aBuy" cancel event if index of event-slot is 13: Link to comment Share on other sites More sharing options...
_Tarna_ Posted September 17 Share Posted September 17 What are you stuck on? Also you should use metadata to make GUIs. Like this: command /shop: trigger: set {_gui} to chest inventory with 3 rows named "Shop" set slot 0 of {_gui} with diamond named "Diamond: $50" set metadata tag "shop" of player to {_gui} open {_gui} to player on inventory click: event-inventory is metadata tag "shop" of player cancel event if index of event-slot is 0: # remove money, give diamond And if you want to make it even better, look into using functions to simplify the process and so you don't have to manually specify each item and its price and click action. Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 - 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - 12/20/22 Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
gabinun Posted September 18 Share Posted September 18 why are you using so many spaces _tarna_ ? why not just do this command shop: trigger: set {gui} to chest inventory with 3 rows named "Shop" set slot 0 of {gui} with diamond named "Diamond: $50" set metadata tag "shop" of player to {gui} open {gui} to player on inventory click: event-inventory is metadata tag "shop" of player cancel event index of event-slot is 0: Link to comment Share on other sites More sharing options...
BlockVoyager Posted September 26 Share Posted September 26 Indention preferences probably. @gabinun BlockVoyager888 Owner of Block Studios, EvboPVP, and EvboPKServer/Multiverse Studios. Co-Owner of ThunderPvP Staff of EvboPK, EvboLegends, Zone4, BoxPvP Find me on Discord: __.quantum.__ Link to comment Share on other sites More sharing options...
gabinun Posted 11 hours ago Share Posted 11 hours ago its harder to hit the tab button than the space button Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now