Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. function mainShop(p: player):
  2. set {_inv} to chest inventory with 3 rows named "&5&lShop"
  3. set slot (integers from 0 to 8) of {_inv} to gray glass pane
  4. set slot 9 and 17 of {_inv} to gray glass pane
  5. set slot (integers from 18 to 26) of {_inv} to gray glass pane
  6. set slot 10 of {_inv} to grass block named "&a&lBlocks"
  7. set slot 12 of {_inv} to heart of the sea named "&b&lMisc"
  8. set slot 14 of {_inv} to wheat seeds named "&c&lCustom Seeds"
  9. set slot 16 of {_inv} to nametag named "&e&lPerks"
  10. open {_inv} to {_p}
  11.  
  12. command /shop:
  13. trigger:
  14. mainShop(player)
  15.  
  16. on inventory click:
  17. if event-inventory != player's inventory:
  18. if inventory name of current inventory of player = "&5&lShop":
  19. cancel event
  20. if event-slot = grass block:
  21. send "test"
  22. else if event-slot = heart of the sea:
  23. send "test"
  24. else if event-slot = wheat seeds:
  25. set {_inv} to chest inventory with 3 rows named "&c&lCustom Seeds"
  26. set slot (integers from 0 to 8) of {_inv} to gray glass pane
  27. set slot 9 and 17 of {_inv} to gray glass pane
  28. set slot (integers from 18 to 26) of {_inv} to gray glass pane
  29. set slot 18 to red glass pane of {_inv} named "&4Main Menu"
  30. set slot 10 of {_inv} to wheat seeds named "&b&lWheat Plant" with lore "", "&7Place to use" and ""
  31. set slot 11 of {_inv} to wheat seeds named "&b&lCoal Plant" with lore "", "&7Place to use" and ""
  32. set slot 12 of {_inv} to wheat seeds named "&b&lIron Plant" with lore "", "&7Place to use" and ""
  33. set slot 13 of {_inv} to wheat seeds named "&b&lGold Plant" with lore "", "&7Place to use" and ""
  34. set slot 14 of {_inv} to wheat seeds named "&b&lDiamond Plant" with lore "", "&7Place to use" and ""
  35. set slot 15 of {_inv} to wheat seeds named "&b&lEmerald Plant" with lore "", "&7Place to use" and ""
  36. set slot 16 of {_inv} to barrier
  37. open {_inv} to player
  38. else if event-slot = nametag:
  39. send "test"
  40.  
  41. on inventory click:
  42. if event-inventory != player's inventory:
  43. if inventory name of current inventory of player = "&c&lCustom Seeds":
  44. cancel event
  45. if event-slot = red glass pane:
  46. mainShop(player)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement