70sOn7

Villager MineX

Nov 22nd, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on right click on villager:
  2. cancel event
  3. execute console command "/sshop %player%"
  4.  
  5. on right click on crafting table:
  6. cancel event
  7. execute console command "/sshop %player%"
  8.  
  9. command /shop:
  10. trigger:
  11. if sender has permission "villager.instant":
  12. make console execute "/sshop %player%"
  13. else:
  14. send "&8(&b&l!&8) &3Opening in &b3 &3seconds!"
  15. wait 17 ticks
  16. send "&8(&b&l!&8) &3Opening in &b2 &3seconds!"
  17. wait 17 ticks
  18. send "&8(&b&l!&8) &3Opening in &b1 &3second!"
  19. wait 17 ticks
  20. make console execute "/sshop %player%"
  21.  
  22. command /sshop <player>:
  23. permission: *
  24. trigger:
  25. wait 1 tick
  26. open chest with 3 rows named "&3Shop" to argument 1
  27. wait 1 tick
  28. format slot 11 of argument 1 with sunflower named "&7* &6Token &7*" with lore "||&bClick to trade for tokens!||" to run "tokens %arg-1%"
  29. format slot 13 of argument 1 with wooden pickaxe named "&6Pickaxe" with lore "&bGet your pickaxe here!" to run "pickaxe %arg-1%"
  30. format slot 15 of argument 1 with barrier named "&cNot Here" with lore "||&cNOT HERE||" to close
  31.  
  32. command /tokens <player>:
  33. permission: *
  34. trigger:
  35. wait 1 tick
  36. open chest with 3 row named "&6Armor" to argument 1
  37. wait 1 tick
  38. format slot 10 of argument 1 with sunflower named "&7* &61/2 Token &7*"||&715x Stone||" with lore "to run "tokenb %arg-1% stone"
  39. format slot 12 of argument 1 with 2 sunflowers named "&7* &6Token &7*" with lore "||&720x Coal||" to run "tokenb %arg-1% coal"
  40. format slot 14 of argument 1 with 3 sunflowers named "&7* &6Token &7*" with lore "||&73 1/2 Tokens||" to run "tokenb %arg-1% trade"
  41. format slot 16 of argument 1 with book named "&bTransaction Payments" with lore "&7||Right Click||" to run "tokenm %arg-1%"
  42. format slot 18 of argument 1 with arrow named "&6Back" with lore "&7Go back" to run "sshop %arg-1%"
  43.  
  44. command /pickaxe <player>:
  45. permission: *
  46. trigger:
  47. wait 1 tick
  48. make console execute "/menu grab @p lvl1"
  49.  
  50. command /tokenb <player> <text>:
  51. permission: *
  52. trigger:
  53. if arg-2 is "stone":
  54. if arg 1's inventory contains 15 stone:
  55. remove 15 stone from arg 1's inventory
  56. make console execute "/essentials:give %arg-1% sunflower 1 name:&7*_&61/2_Token_&7*"
  57. else:
  58. send "&8(&b&l!&b) &3You do not have &b15 &3stone!" to arg 1
  59. if arg-2 is "coal":
  60. if arg 1's inventory contains 20 coal:
  61. remove 20 coal from arg 1's inventory
  62. make console execute "/essentials:give %arg-1% sunflower 2 name:&7*_&6Token_&7*"
  63. else:
  64. send "&8(&b&l!&b) &3You do not have &b20 &3coal!" to arg 1
  65. if arg-2 is "trade":
  66. if arg 1's inventory contains 3 sunflower named "&7* &61/2 Token &7*":
  67. remove 3 sunflower from arg 1's inventory named "&7* &61/2 Token &7*":
  68. make console execute "/essentials:give %arg-1% sunflower 1 name:&7*_&6Token_&7*"
  69. else:
  70. send "&8(&b&l!&b) &3You do not have &b3 &31/2 Tokens!" to arg 1
  71.  
  72. command /tokenm <player>:
  73. permission: *
  74. trigger:
  75. wait 1 tick
  76. open chest with 3 rows named "&bTransaction Payments" to argument 1
  77. wait 1 tick
  78. format slot 13 of argument 1 with book named "&bPayment of $25" with lore "||&72 Tokens||" to run "tokenmb %arg-1% 25"
  79. format slot 15 of argument 1 with book named "&bPayment of $100" with lore "||&77 Tokens||" to run "tokenmb %arg-1% 100"
Add Comment
Please, Sign In to add comment