Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- waterbucket: 5
- coal: 3
- wheat: 1
- bread: 3
- oaksaplings: 1
- iron: 10
- phantom: 10
- emerald: 20
- lavabucket: 8
- carrot: 2
- potato: 2
- spawnegg: 75
- grassblock: 15
- charcoal: 1
- diamond: 50
- sand: 5
- gravel: 10
- sugarcane: 2
- cactus: 3
- redstone: 15
- command /shop:
- trigger:
- open gui "shop" to player
- on load:
- create a gui with id "shop" with virtual chest with 2 rows named "&0&lshop":
- make gui 0 with barrier named "&cexit the shop":
- close player's inventory
- make gui 3 with bonemeal named "&anon-buyable items":
- delete gui "shop.%player%"
- open gui "shopnonbuyitems" to player
- make gui 4 with diamond named "&aores":
- delete gui "shop.%player%"
- open gui "shopores" to player
- make gui 5 with skeleton spawn egg named "&aspawn eggs":
- delete gui "shop.%player%"
- open gui "shopspawneggs" to player
- make gui 9 with water bucket named "&6water &f(${@waterbucket})" with lore "right click to sell" and "left click to buy":
- if clicked type is left mouse button:
- if player's balance is more than or equal to {@waterbucket}:
- send action bar "&6you got a water bucket for {@waterbucket} money" to player
- give player 1 water bucket
- remove {@waterbucket} from player's balance
- else:
- send action bar "&6you dont have enough money to get a water bucket" to player
- if clicked type is right mouse button:
- if player has water bucket:
- remove 1 water bucket from player's inventory
- add {@waterbucket} to player's balance
- send action bar "&6you got {@waterbucket} money for selling a water bucket" to player
- else:
- send action bar "&6you have no water buckets" to player
- make gui 10 with lava bucket named "&6lava &f(${@lavabucket})" with lore "right click to sell" and "left click to buy":
- if clicked type is left mouse button:
- if player's balance is more than or equal to {@lavabucket}:
- send action bar "&6you got a lava bucket for {@lavabucket} money" to player
- give player 1 lava bucket
- remove {@lavabucket} from player's balance
- else:
- send action bar "&6you dont have enough money to get a lava bucket" to player
- if clicked type is right mouse button:
- if player has lava bucket:
- remove 1 lava bucket from player's inventory
- add {@lavabucket} to player's balance
- send action bar "&6you got {@lavabucket} money for selling a lava bucket" to player
- else:
- send action bar "&6you have no lava buckets" to player
- make gui 11 with carrot named "&6carrot &f(${@carrot})" with lore "right click to sell" and "left click to buy":
- if clicked type is left mouse button:
- if player's balance is more than or equal to {@carrot}:
- send action bar "&6you got a carrot for {@carrot} money" to player
- give player 1 carrot
- remove {@carrot} from player's balance
- else:
- send action bar "&6you dont have enough money to get a carrot" to player
- if clicked type is right mouse button:
- if player has carrot:
- remove 1 carrot from player's inventory
- add {@carrot} to player's balance
- send action bar "&6you got {@carrot} money for selling a carrot" to player
- else:
- send action bar "&6you have no carrots" to player
- make gui 12 with potato named "&6potato &f(${@potato})" with lore "right click to sell" and "left click to buy":
- if clicked type is left mouse button:
- if player's balance is more than or equal to {@potato}:
- send action bar "&6you got a potato for {@potato} money" to player
- give player 1 potato
- remove {@potato} from player's balance
- else:
- send action bar "&6you dont have enough money to get a potato" to player
- if clicked type is right mouse button:
- if player has potato:
- remove 1 potato from player's inventory
- add {@potato} to player's balance
- send action bar "&6you got {@potato} money for selling a potato" to player
- else:
- send action bar "&6you have no potatos" to player
- make gui 13 with grass block named "&6grass block &f(${@grassblock})" with lore "right click to sell" and "left click to buy":
- if clicked type is left mouse button:
- if player's balance is more than or equal to {@grassblock}:
- send action bar "&6you got a grass block for {@grassblock} money" to player
- give player 1 grass block
- remove {@grassblock} from player's balance
- else:
- send action bar "&6you dont have enough money to get a grass block" to player
- if clicked type is right mouse button:
- if player has grass block:
- remove 1 grass block from player's inventory
- add {@grassblock} to player's balance
- send action bar "&6you got {@grassblock} money for selling a grass block" to player
- else:
- send action bar "&6you have no grass blocks" to player
- make gui 14 with gravel named "&6gravel &f(${@gravel})" with lore "right click to sell" and "left click to buy":
- if clicked type is left mouse button:
- if player's balance is more than or equal to {@gravel}:
- send action bar "&6you got gravel for {@gravel} money" to player
- give player 1 gravel
- remove {@gravel} from player's balance
- else:
- send action bar "&6you dont have enough money to get gravel" to player
- if clicked type is right mouse button:
- if player has gravel:
- remove 1 gravel from player's inventory
- add {@gravel} to player's balance
- send action bar "&6you got {@gravel} money for selling gravel" to player
- else:
- send action bar "&6you have no gravel" to player
- make gui 15 with sand named "&6sand &f(${@sand})" with lore "right click to sell" and "left click to buy":
- if clicked type is left mouse button:
- if player's balance is more than or equal to {@sand}:
- send action bar "&6you got sand for {@sand} money" to player
- give player 1 sand
- remove {@sand} from player's balance
- else:
- send action bar "&6you dont have enough money to get sand" to player
- if clicked type is right mouse button:
- if player has sand:
- remove 1 sand from player's inventory
- add {@sand} to player's balance
- send action bar "&6you got {@sand} money for selling sand" to player
- else:
- send action bar "&6you have no sand" to player
- make gui 16 with cactus named "&6cactus &f(${@cactus})" with lore "right click to sell" and "left click to buy":
- if clicked type is left mouse button:
- if player's balance is more than or equal to {@cactus}:
- send action bar "&6you got cactus for {@cactus} money" to player
- give player 1 cactus
- remove {@cactus} from player's balance
- else:
- send action bar "&6you dont have enough money to get cacti" to player
- if clicked type is right mouse button:
- if player has cactus:
- remove 1 cactus from player's inventory
- add {@cactus} to player's balance
- send action bar "&6you got {@cactus} money for selling a cacti" to player
- else:
- send action bar "&6you have no cacti" to player
- make gui 17 with sugar cane named "&6sugar cane &f(${@sugarcane})" with lore "right click to sell" and "left click to buy":
- if clicked type is left mouse button:
- if player's balance is more than or equal to {@sugarcane}:
- send action bar "&6you got sugar cane for {@sugarcane} money" to player
- give player 1 sugar cane
- remove {@sugarcane} from player's balance
- else:
- send action bar "&6you dont have enough money to get sugar cane" to player
- if clicked type is right mouse button:
- if player has sugar cane:
- remove 1 sugar cane from player's inventory
- add {@sugarcane} to player's balance
- send action bar "&6you got {@sugarcane} money for selling sugar cane" to player
- else:
- send action bar "&6you have no sugar cane" to player
- #
- #
- #NON-BUYABLE ITEMS GUI
- #
- #
- on load:
- create a gui with id "shopnonbuyitems" with virtual chest with 1 rows named "&0&lshop: non-buyable items":
- make gui 0 with barrier named "&cgo back":
- close player's inventory
- open gui "shop" to player
- delete gui "shopnonbuyitems.%player%"
- make gui 2 with wheat named "&6wheat &f(${@wheat})" with lore "left or right click to sell":
- if player has wheat:
- remove 1 wheat from player's inventory
- add {@wheat} to player's balance
- send action bar "&6you got {@wheat} money for selling wheat" to player
- else:
- send action bar "&6you have no wheat" to player
- make gui 3 with paper named "&6phantom membrane &f(${@phantom})" with lore "left or right click to sell":
- if player has phantom membrane:
- remove 1 phantom membrane from player's inventory
- add {@phantom} to player's balance
- send action bar "&6you got {@phantom} money for selling phantom membrane" to player
- else:
- send action bar "&6you have no phantom membrane" to player
- make gui 4 with charcoal named "&6charcoal &f(${@charcoal})" with lore "left or right click to sell":
- if player has charcoal:
- remove 1 charcoal from player's inventory
- add {@charcoal} to player's balance
- send action bar "&6you got {@charcoal} money for selling charcoal" to player
- else:
- send action bar "&6you have no charcoal" to player
- #
- #
- #ORES GUI
- #
- #
- on load:
- create a gui with id "shopores" with virtual chest with 1 rows named "&0&lshop: ores":
- make gui 0 with barrier named "&cgo back":
- close player's inventory
- open gui "shop" to player
- delete gui "shopores.%player%"
- make gui 2 with coal named "&6coal &f(${@coal})" with lore "right click to sell" and "left click to buy":
- if clicked type is left mouse button:
- if player's balance is more than or equal to {@coal}:
- send action bar "&6you got coal for {@coal} money" to player
- give player 1 coal
- remove {@coal} from player's balance
- else:
- send action bar "&6you dont have enough money to get coal" to player
- if clicked type is right mouse button:
- if player has coal:
- remove 1 coal from player's inventory
- add {@coal} to player's balance
- send action bar "&6you got {@coal} money for selling coal" to player
- else:
- send action bar "&6you have no coal" to player
- make gui 3 with iron ore named "&6iron &f(${@iron})" with lore "right click to sell" and "left click to buy":
- if clicked type is left mouse button:
- if player's balance is more than or equal to {@iron}:
- send action bar "&6you got iron for {@iron} money" to player
- give player 1 iron ore
- remove {@iron} from player's balance
- else:
- send action bar "&6you dont have enough money to get iron" to player
- if clicked type is right mouse button:
- if player has iron ore:
- remove 1 iron ore from player's inventory
- add {@iron} to player's balance
- send action bar "&6you got {@iron} money for selling iron" to player
- else:
- send action bar "&6you have no iron" to player
- make gui 4 with emerald named "&6emerald &f(${@emerald})" with lore "right click to sell" and "left click to buy":
- if clicked type is left mouse button:
- if player's balance is more than or equal to {@emerald}:
- send action bar "&6you got emerald for {@emerald} money" to player
- give player 1 iron ore
- remove {@emerald} from player's balance
- else:
- send action bar "&6you dont have enough money to get emerald" to player
- if clicked type is right mouse button:
- if player has emerald:
- remove 1 emerald from player's inventory
- add {@emerald} to player's balance
- send action bar "&6you got {@emerald} money for selling emerald" to player
- else:
- send action bar "&6you have no emerald" to player
- make gui 5 with diamond named "&6diamond &f(${@diamond})" with lore "right click to sell" and "left click to buy":
- if clicked type is left mouse button:
- if player's balance is more than or equal to {@diamond}:
- send action bar "&6you got diamond for {@diamond} money" to player
- give player 1 diamond
- remove {@diamond} from player's balance
- else:
- send action bar "&6you dont have enough money to get diamond" to player
- if clicked type is right mouse button:
- if player has diamond:
- remove 1 diamond from player's inventory
- add {@diamond} to player's balance
- send action bar "&6you got {@diamond} money for selling diamond" to player
- else:
- send action bar "&6you have no diamonds" to player
- make gui 6 with redstone named "&6redstone &f(${@redstone})" with lore "right click to sell" and "left click to buy":
- if clicked type is left mouse button:
- if player's balance is more than or equal to {@redstone}:
- send action bar "&6you got redstone for {@redstone} money" to player
- give player 1 redstone
- remove {@redstone} from player's balance
- else:
- send action bar "&6you dont have enough money to get redstone" to player
- if clicked type is right mouse button:
- if player has redstone:
- remove 1 redstone from player's inventory
- add {@redstone} to player's balance
- send action bar "&6you got {@redstone} money for selling redstone" to player
- else:
- send action bar "&6you have no redstone" to player
- #
- #
- #SPAWN eg GUI
- #
- #
- on load:
- create a gui with id "shopspawneggs" with virtual chest with 1 rows named "&0&lshop: spawn eggs":
- make gui 0 with barrier named "&cgo back":
- close player's inventory
- open gui "shop" to player
- delete gui "shopspawneggs.%player%"
- make gui 2 with cow spawn egg named "&6cow &f(${@spawnegg})" with lore "left or right click to buy":
- if player's balance is more than or equal to {@spawnegg}:
- send action bar "&6you got cow spawn egg for {@spawnegg} money" to player
- give player 1 cow spawn egg
- remove {@spawnegg} from player's balance
- else:
- send action bar "&6you dont have enough money to get cow spawn egg" to player
- make gui 3 with pig spawn egg named "&6pig &f(${@spawnegg})" with lore "left or right click to buy":
- if player's balance is more than or equal to {@spawnegg}:
- send action bar "&6you got pig spawn egg for {@spawnegg} money" to player
- give player 1 pig spawn egg
- remove {@spawnegg} from player's balance
- else:
- send action bar "&6you dont have enough money to get pig spawn egg" to player
- make gui 4 with chicken spawn egg named "&6chicken &f(${@spawnegg})" with lore "left or right click to buy":
- if player's balance is more than or equal to {@spawnegg}:
- send action bar "&6you got chicken spawn egg for {@spawnegg} money" to player
- give player 1 chicken spawn egg
- remove {@spawnegg} from player's balance
- else:
- send action bar "&6you dont have enough money to get chicken spawn egg" to player
- make gui 5 with sheep spawn egg named "&6sheep &f(${@spawnegg})" with lore "left or right click to buy":
- if player's balance is more than or equal to {@spawnegg}:
- send action bar "&6you got sheep spawn egg for {@spawnegg} money" to player
- give player 1 sheep spawn egg
- remove {@spawnegg} from player's balance
- else:
- send action bar "&6you dont have enough money to get sheep spawn egg" to player
- on quit:
- delete gui "shopnonbuyitems.%player%"
- delete gui "shop.%player%"
- delete gui "shopores.%player%"
- delete gui "shopspawneggs.%player%"
Advertisement
Add Comment
Please, Sign In to add comment