Advertisement
Guest User

Shop Skript FIXED

a guest
Oct 19th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. Options:
  2.  
  3. # Price of each grass block:
  4. {@GrassPrice} : 25
  5. # Price of each cobblestone block:
  6. {@CobblePrice} : 20
  7.  
  8. command /shop:
  9. trigger:
  10. open chest with 3 rows named "&8&lSHOP" to player
  11. format slot 12 of player with grass_block named "&r&a&lGRASS BLOCK" with lore "&r&aCost: &r&7$%{@GrassPrice}%" to run [make console execute command /1buygrass %player%]
  12. format slot 14 of player with cobble_stone named "&r&a&lCOBBLESTONE" with lore "&r&aCost: &r&7$%{@CobblePrice}%" to run [make console execute command /1buycobble %player%]
  13. format slot 26 of player with barrier named "&r&c&lCLOSE" with lore "&r&cClick to close menu." to close
  14.  
  15. command /1buygrass [<player>]:
  16. permission: shop.admin
  17. permission message: &r&cPlease use /shop instead.
  18. trigger:
  19. if player's balance is less than "%{@GrassPrice}%":
  20. send "&r&8» &r&7You do not have enough money."
  21. stop
  22. if player's balance is more than "%{@GrassPrice - 0.01%":
  23. take {@GrassPrice} from the player's balance
  24. make console execute command "/give %player% grass 1"
  25. send "&r&8» &r&7You have successfully bought &a1x grass block &r&7for &a$%{@GrassPrice}%&r&7!"
  26. stop
  27.  
  28. command /1buycobble [<player>]:
  29. permission: shop.admin
  30. permission message: &r&cPlease use /shop instead.
  31. trigger:
  32. if player's balance is less than "%{@CobblePrice}%":
  33. send "&r&8» &r&7You do not have enough money."
  34. stop
  35. if player's balance is more than "%{@GrassPrice - 0.01%":
  36. take {@CobblePrice} from the player's balance
  37. make console execute command "/give %player% cobblestone 1"
  38. send "&r&8» &r&7You have successfully bought &a1x cobblestone &r&7for &a$%{@CobblePrice}%&r&7!"
  39. stop
  40.  
  41. #
  42. # SKRIPT ORIGINALLY MADE BY GAOLEON, REDONE TO WORK BY MUSHROOM300!
  43. #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement