Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mainShop(p: player):
- set {_inv} to chest inventory with 3 rows named "&5&lShop"
- set slot (integers from 0 to 8) of {_inv} to gray glass pane
- set slot 9 and 17 of {_inv} to gray glass pane
- set slot (integers from 18 to 26) of {_inv} to gray glass pane
- set slot 10 of {_inv} to grass block named "&a&lBlocks"
- set slot 12 of {_inv} to heart of the sea named "&b&lMisc"
- set slot 14 of {_inv} to wheat seeds named "&c&lCustom Seeds"
- set slot 16 of {_inv} to nametag named "&e&lPerks"
- open {_inv} to {_p}
- command /shop:
- trigger:
- mainShop(player)
- on inventory click:
- if event-inventory != player's inventory:
- if inventory name of current inventory of player = "&5&lShop":
- cancel event
- if event-slot = grass block:
- send "test"
- else if event-slot = heart of the sea:
- send "test"
- else if event-slot = wheat seeds:
- set {_inv} to chest inventory with 3 rows named "&c&lCustom Seeds"
- set slot (integers from 0 to 8) of {_inv} to gray glass pane
- set slot 9 and 17 of {_inv} to gray glass pane
- set slot (integers from 18 to 26) of {_inv} to gray glass pane
- set slot 18 to red glass pane of {_inv} named "&4Main Menu"
- set slot 10 of {_inv} to wheat seeds named "&b&lWheat Plant" with lore "", "&7Place to use" and ""
- set slot 11 of {_inv} to wheat seeds named "&b&lCoal Plant" with lore "", "&7Place to use" and ""
- set slot 12 of {_inv} to wheat seeds named "&b&lIron Plant" with lore "", "&7Place to use" and ""
- set slot 13 of {_inv} to wheat seeds named "&b&lGold Plant" with lore "", "&7Place to use" and ""
- set slot 14 of {_inv} to wheat seeds named "&b&lDiamond Plant" with lore "", "&7Place to use" and ""
- set slot 15 of {_inv} to wheat seeds named "&b&lEmerald Plant" with lore "", "&7Place to use" and ""
- set slot 16 of {_inv} to barrier
- open {_inv} to player
- else if event-slot = nametag:
- send "test"
- on inventory click:
- if event-inventory != player's inventory:
- if inventory name of current inventory of player = "&c&lCustom Seeds":
- cancel event
- if event-slot = red glass pane:
- mainShop(player)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement