Advertisement
Builder4Life

Untitled

Mar 4th, 2023
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.78 KB | None | 0 0
  1. options:
  2. guiname: &9&lXBUST
  3. guiaccept: &9&lXBUST &7| &bOrder pending
  4.  
  5. totemn: "<##3489eb>&lᴛᴏᴛᴇᴍ"
  6. toteml: "", "&7Hold in off hand", "&7to use the &fTotem"
  7. totemc: 1
  8.  
  9. glown: "<##3489eb>&lɢʟᴏᴡsᴛᴏɴᴇ"
  10. glowl: "", "&7glowstone", "&7greatest lamp ever know"
  11. glowc: 1
  12.  
  13. obsn: "<##3489eb>&lᴏʙsɪᴅɪᴀɴ"
  14. obsl: "", "&7Is this gonna be", "&7your path into &fhell &7?"
  15. obs: 1
  16.  
  17. crystn: "<##3489eb>&lᴄʀʏsᴛᴀʟ"
  18. crystl: "", "&fMagic &7light", "&7The best killer bomb ever know"
  19. crystc: 1
  20.  
  21. anchn: "<##3489eb>&lᴀɴᴄʜᴏʀ"
  22. anchl: "", "&7u die in hell", "&7and u wanna stay", "&7here is your solution"
  23. anch: 1
  24.  
  25. variables:
  26. {dark} = blue stained glass pane
  27. {light} = light blue stained glass pane
  28.  
  29. command /test:
  30. trigger:
  31. if player's max health >= 1:
  32. set {_acceptg} to a new chest inventory with 3 rows with name "{@guiaccept}"
  33. set slot 2, 3, 4, 5, 6, 20, 21, 23 and 24 of {_acceptg} to {light} named "&9"
  34. set slot 0, 1, 7, 8, 9, 17, 18, 19, 25 and 26 of {_acceptg} to {dark} named "&b"
  35. set slot 14 of {_acceptg} to lime stained glass pane named "<##3489eb>&lᴀᴄᴄᴇᴘᴛ" with lore "", "&7Click to &aAccept", "&7Your order"
  36. set slot 13 of {_acceptg} to {_item} named {_name} with lore {_lore}
  37. set slot 12 of {_acceptg} to red stained glass pane named "<##3489eb>&lᴄᴀɴᴄᴇʟ" with lore "", "&7Click to &cCancel", "&7Your order"
  38. set slot 22 of {_acceptg} to arrow named "&c&lʙᴀᴄᴋ"
  39. open {_acceptg} to player
  40. else:
  41. send "" to player
  42. send "&9&lSHOP &fU have only 1 heart left" to player
  43. send "" to player
  44.  
  45. command /shop:
  46. trigger:
  47. set {_heartshop} to a new chest inventory with 3 rows with name "{@guiname}"
  48. set slot 2, 3, 4, 5, 6, 20, 21, 23 and 24 of {_heartshop} to {light} named "&9"
  49. set slot 0, 1, 7, 8, 9, 17, 18, 19, 25 and 26 of {_heartshop} to {dark} named "&b"
  50. set slot 15 of {_heartshop} to 64 glowstone named {glown} with lore "", "&7Click to buy", "&9&lCost &b1 heart"
  51. set slot 14 of {_heartshop} to 64 obsidian named {obsn} with lore "", "&7Click to buy", "&9&lCost &b1 heart"
  52. set slot 13 of {_heartshop} to totem of undying named {totemn} with lore "", "&7Click to buy", "&9&lCost &b1 heart"
  53. set slot 12 of {_heartshop} to 64 end crystal named {crystn} with lore "", "&7Click to buy", "&9&lCost &b1 heart"
  54. set slot 11 of {_heartshop} to 64 respawn anchor named {anchn} with lore "", "&7Click to buy", "&9&lCost &b1 heart"
  55. set slot 22 of {_heartshop} to barrier named "&c&lᴇxɪᴛ"
  56. open {_heartshop} to player
  57.  
  58.  
  59. function heartshop(name: text, lore: text, item: item, cost: integer, pl: player):
  60. if {pl}'s max health >= {_cost}:
  61. set {_acceptg} to a new chest inventory with 3 rows with name "{@guiaccept}"
  62. set slot 2, 3, 4, 5, 6, 20, 21, 23 and 24 of {_acceptg} to {light} named "&9"
  63. set slot 0, 1, 7, 8, 9, 17, 18, 19, 25 and 26 of {_acceptg} to {dark} named "&b"
  64. set slot 14 of {_acceptg} to lime stained glass pane named "<##3489eb>&lᴀᴄᴄᴇᴘᴛ" with lore "", "&7Click to &aAccept", "&7Your order"
  65. set slot 13 of {_acceptg} to {_item} named {_name} with lore {_lore}
  66. set slot 12 of {_acceptg} to red stained glass pane named "<##3489eb>&lᴄᴀɴᴄᴇʟ" with lore "", "&7Click to &cCancel", "&7Your order"
  67. set slot 22 of {_acceptg} to arrow named "&c&lʙᴀᴄᴋ"
  68. open {_acceptg} to {pl}
  69. else:
  70. send "" to {pl}
  71. send "&9&lSHOP &fU have only 1 heart left" to {pl}
  72. send "" to {pl}
  73.  
  74. function heartbuy(items: item, costb: integer, bn: text, bl: text, pla: player):
  75. if slot 13 of {pla}'s current inventory is {_items}:
  76. if {pla} has enough space for 1 barrier:
  77. remove {_costb} from {pla}'s max health
  78. give {pla} {_itemb} named {_bn} with lore {_bl}
  79. send "" to {pla}
  80. send "&9&lSHOP &fyou succesfuly bought &b1 %{_bn}%" to {pla}
  81. send "" to {pla}
  82. else:
  83. send "" to {pla}
  84. send "&9&lSHOP &fyou dont have enough space" to {pla}
  85. send "" to {pla}
  86.  
  87. on inventory click:
  88. if name of event-inventory is "{@guiname}":
  89. cancel event
  90.  
  91. if index of event-slot = 22:
  92. close player's inventory
  93.  
  94. if index of event-slot = 11:
  95. heartshop({anchn}, {anchl}, 64 respawn anchor, {anchc}, player)
  96.  
  97. if index of event-slot = 12:
  98. heartshop({crystn}, {crystl}, 64 end crystal, {crystc}, player)
  99.  
  100. if index of event-slot = 13:
  101. heartshop({totemn}, {toteml}, 1 totem of undying, {totemc}, player)
  102.  
  103. if index of event-slot = 14:
  104. heartshop({obsn}, {obsl}, 64 obsidian, {obsc}, player)
  105.  
  106. if index of event-slot = 15:
  107. heartshop({glown}, {glowl}, 64 glowstone, {glowc}, player)
  108.  
  109. on inventory click:
  110. if name of event-inventory is "{@guiaccept}":
  111. cancel event
  112.  
  113. if index of event-slot = 22:
  114. open {heartshop} to player
  115.  
  116. if index of event-slot = 14:
  117. heartbuy(64 respawn anchor, {anchc}, {anchn}, {anchl}, player)
  118. heartbuy(64 glowstone, {glowc}, {glown}, {glowl}, player)
  119. heartbuy(64 obsidian, {obsc}, {obsn}, {obsl}, player)
  120. heartbuy(1 totem of undying, {totemc}, {totemn}, {toteml}, player)
  121. heartbuy(64 end crystal, {crystc}, {crystn}, {crystl}, player)
  122.  
  123. if index of event-slot = 12:
  124. close player's inventory
  125. send ""
  126. send "&9&lSHOP &fyou canceld your order"
  127. send ""
  128.  
  129.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement