Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- guiname: &9&lXBUST
- guiaccept: &9&lXBUST &7| &bOrder pending
- totemn: "<##3489eb>&lᴛᴏᴛᴇᴍ"
- toteml: "", "&7Hold in off hand", "&7to use the &fTotem"
- totemc: 1
- glown: "<##3489eb>&lɢʟᴏᴡsᴛᴏɴᴇ"
- glowl: "", "&7glowstone", "&7greatest lamp ever know"
- glowc: 1
- obsn: "<##3489eb>&lᴏʙsɪᴅɪᴀɴ"
- obsl: "", "&7Is this gonna be", "&7your path into &fhell &7?"
- obs: 1
- crystn: "<##3489eb>&lᴄʀʏsᴛᴀʟ"
- crystl: "", "&fMagic &7light", "&7The best killer bomb ever know"
- crystc: 1
- anchn: "<##3489eb>&lᴀɴᴄʜᴏʀ"
- anchl: "", "&7u die in hell", "&7and u wanna stay", "&7here is your solution"
- anch: 1
- variables:
- {dark} = blue stained glass pane
- {light} = light blue stained glass pane
- command /test:
- trigger:
- if player's max health >= 1:
- set {_acceptg} to a new chest inventory with 3 rows with name "{@guiaccept}"
- set slot 2, 3, 4, 5, 6, 20, 21, 23 and 24 of {_acceptg} to {light} named "&9"
- set slot 0, 1, 7, 8, 9, 17, 18, 19, 25 and 26 of {_acceptg} to {dark} named "&b"
- set slot 14 of {_acceptg} to lime stained glass pane named "<##3489eb>&lᴀᴄᴄᴇᴘᴛ" with lore "", "&7Click to &aAccept", "&7Your order"
- set slot 13 of {_acceptg} to {_item} named {_name} with lore {_lore}
- set slot 12 of {_acceptg} to red stained glass pane named "<##3489eb>&lᴄᴀɴᴄᴇʟ" with lore "", "&7Click to &cCancel", "&7Your order"
- set slot 22 of {_acceptg} to arrow named "&c&lʙᴀᴄᴋ"
- open {_acceptg} to player
- else:
- send "" to player
- send "&9&lSHOP &fU have only 1 heart left" to player
- send "" to player
- command /shop:
- trigger:
- set {_heartshop} to a new chest inventory with 3 rows with name "{@guiname}"
- set slot 2, 3, 4, 5, 6, 20, 21, 23 and 24 of {_heartshop} to {light} named "&9"
- set slot 0, 1, 7, 8, 9, 17, 18, 19, 25 and 26 of {_heartshop} to {dark} named "&b"
- set slot 15 of {_heartshop} to 64 glowstone named {glown} with lore "", "&7Click to buy", "&9&lCost &b1 heart"
- set slot 14 of {_heartshop} to 64 obsidian named {obsn} with lore "", "&7Click to buy", "&9&lCost &b1 heart"
- set slot 13 of {_heartshop} to totem of undying named {totemn} with lore "", "&7Click to buy", "&9&lCost &b1 heart"
- set slot 12 of {_heartshop} to 64 end crystal named {crystn} with lore "", "&7Click to buy", "&9&lCost &b1 heart"
- set slot 11 of {_heartshop} to 64 respawn anchor named {anchn} with lore "", "&7Click to buy", "&9&lCost &b1 heart"
- set slot 22 of {_heartshop} to barrier named "&c&lᴇxɪᴛ"
- open {_heartshop} to player
- function heartshop(name: text, lore: text, item: item, cost: integer, pl: player):
- if {pl}'s max health >= {_cost}:
- set {_acceptg} to a new chest inventory with 3 rows with name "{@guiaccept}"
- set slot 2, 3, 4, 5, 6, 20, 21, 23 and 24 of {_acceptg} to {light} named "&9"
- set slot 0, 1, 7, 8, 9, 17, 18, 19, 25 and 26 of {_acceptg} to {dark} named "&b"
- set slot 14 of {_acceptg} to lime stained glass pane named "<##3489eb>&lᴀᴄᴄᴇᴘᴛ" with lore "", "&7Click to &aAccept", "&7Your order"
- set slot 13 of {_acceptg} to {_item} named {_name} with lore {_lore}
- set slot 12 of {_acceptg} to red stained glass pane named "<##3489eb>&lᴄᴀɴᴄᴇʟ" with lore "", "&7Click to &cCancel", "&7Your order"
- set slot 22 of {_acceptg} to arrow named "&c&lʙᴀᴄᴋ"
- open {_acceptg} to {pl}
- else:
- send "" to {pl}
- send "&9&lSHOP &fU have only 1 heart left" to {pl}
- send "" to {pl}
- function heartbuy(items: item, costb: integer, bn: text, bl: text, pla: player):
- if slot 13 of {pla}'s current inventory is {_items}:
- if {pla} has enough space for 1 barrier:
- remove {_costb} from {pla}'s max health
- give {pla} {_itemb} named {_bn} with lore {_bl}
- send "" to {pla}
- send "&9&lSHOP &fyou succesfuly bought &b1 %{_bn}%" to {pla}
- send "" to {pla}
- else:
- send "" to {pla}
- send "&9&lSHOP &fyou dont have enough space" to {pla}
- send "" to {pla}
- on inventory click:
- if name of event-inventory is "{@guiname}":
- cancel event
- if index of event-slot = 22:
- close player's inventory
- if index of event-slot = 11:
- heartshop({anchn}, {anchl}, 64 respawn anchor, {anchc}, player)
- if index of event-slot = 12:
- heartshop({crystn}, {crystl}, 64 end crystal, {crystc}, player)
- if index of event-slot = 13:
- heartshop({totemn}, {toteml}, 1 totem of undying, {totemc}, player)
- if index of event-slot = 14:
- heartshop({obsn}, {obsl}, 64 obsidian, {obsc}, player)
- if index of event-slot = 15:
- heartshop({glown}, {glowl}, 64 glowstone, {glowc}, player)
- on inventory click:
- if name of event-inventory is "{@guiaccept}":
- cancel event
- if index of event-slot = 22:
- open {heartshop} to player
- if index of event-slot = 14:
- heartbuy(64 respawn anchor, {anchc}, {anchn}, {anchl}, player)
- heartbuy(64 glowstone, {glowc}, {glown}, {glowl}, player)
- heartbuy(64 obsidian, {obsc}, {obsn}, {obsl}, player)
- heartbuy(1 totem of undying, {totemc}, {totemn}, {toteml}, player)
- heartbuy(64 end crystal, {crystc}, {crystn}, {crystl}, player)
- if index of event-slot = 12:
- close player's inventory
- send ""
- send "&9&lSHOP &fyou canceld your order"
- send ""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement