Advertisement
Guest User

no

a guest
May 27th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. break:
  2. event-block = coal ore:
  3. if player isn't sneaking:
  4. cancel event
  5. add 5 to player's balance
  6. send action bar "&f&l -&b&l + $5&f&l -" to player
  7. else:
  8. if player is op:
  9. set event-block to air
  10. event-block = iron ore:
  11. if player isn't sneaking:
  12. cancel event
  13. add 10 to player's balance
  14. send action bar "&f&l -&b&l + $10&f&l -" to player
  15. else:
  16. if player is op:
  17. set event-block to air
  18.  
  19. command /upg:
  20. trigger:
  21. player's held item = any pickaxe:
  22. send ""
  23. send " &cOpening upgrade shop"
  24. send ""
  25. upg(player)
  26. else:
  27. send ""
  28. send " &cPlease hold your pickaxe"
  29. send ""
  30.  
  31. function upg(p: player):
  32. play "BLOCK_CHEST_OPEN" to {_p}
  33. set {_uuid} to uuid of {_p}
  34. open virtual chest with 1 row named " &cUpgrade Shop" to {_p}
  35. set {_9} to 0
  36. loop 9 times:
  37. format gui slot {_9} of {_p} with black stained glass named "&a"
  38. add 1 to {_9}
  39. format gui slot 2 of {_p} with paper of efficiency 1 with no nbt named "&cEfficiency" with lore "&bCost:&7 $%{ecost::%{_uuid}%}%", "&bAdds:&7 $175" and "&bMax:&7 10" to run:
  40. if {_p}'s balance >= {ecost::%{_uuid}%}:
  41. if level of efficiency of {_p}'s tool < 10:
  42. add 175 to {ecost::%{_uuid}%}
  43. send "" to {_p}
  44. send " &cPurchased&b&l +1&c Efficiency" to {_p}
  45. send "" to {_p}
  46. send " &cNew price >&b&l %{ecost::%{_uuid}%}%" to {_p}
  47. send "" to {_p}
  48. enchant the tool of {_p} with "efficiency %level of efficiency of {_p}'s tool +1%" parsed as a enchantment type
  49. add 175 to {ecost::%{_uuid}%}
  50. subtract {ecost::%{_uuid}%} from {_p}'s balance
  51. else:
  52. send "" to {_p}
  53. send " &cEfficiency level is maxed!" to {_p}
  54. send "" to {_p}
  55. close {_p}'s inventory
  56. play "BLOCK_CHEST_CLOSE" to {_p}
  57. else:
  58. set {_needed} to {ecost::%{_uuid}%} - {_p}'s balance
  59. send "" to {_p}
  60. send " &cNot enough money!" to {_p}
  61. send "" to {_p}
  62. send " &cYou need >&b&l %{_needed}%&c more!" to {_p}
  63. send "" to {_p}
  64. close {_p}'s inventory
  65. play "BLOCK_CHEST_CLOSE" to {_p}
  66. format gui slot 4 of {_p} with paper of efficiency 1 with no nbt named "&cExplosive" with lore "&bCost:&7 $%{explosivecost::%{_uuid}%}%", "&bAdds:&7 $350" and "&bMax:&7 3" to run:
  67. if {_p}'s balance >= {explosivecost::%{_uuid}%}:
  68. if {exp::%{_uuid}%} < 3:
  69. send "" to {_p}
  70. send " &cPurchased&b&l +1&c Explosive" to {_p}
  71. send "" to {_p}
  72. send " &cNew price >&b&l %{explosivecost::%{_uuid}%}%" to {_p}
  73. send "" to {_p}
  74. add 350 to {explosivecost::%{_uuid}%}
  75. subtract {explosivecost::%{_uuid}%} from {_p}'s balance
  76. add 30 to {echance::%{_uuid}%}
  77. add 1 to {exp::%{_uuid}%}
  78. else:
  79. send "" to {_p}
  80. send " &cExplosive level is maxed!" to {_p}
  81. send "" to {_p}
  82. close {_p}'s inventory
  83. play "BLOCK_CHEST_CLOSE" to {_p}
  84. else:
  85. set {_needed} to {explosivecost::%{_uuid}%} - {_p}'s balance
  86. send "" to {_p}
  87. send " &cNot enough money!" to {_p}
  88. send "" to {_p}
  89. send " &cYou need >&b&l $%{_needed}%&c more!" to {_p}
  90. send "" to {_P}
  91.  
  92. on inventory close:
  93. player's inventory name = " &cUpgrade Shop":
  94. play "BLOCK_CHEST_CLOSE" to player
  95.  
  96. command /e:
  97. trigger:
  98. set {explosivecost::%player's uuid%} to 500
  99. set {exp::%player's uuid%} to 0
  100. delete {echance::%player's uuid%}
  101. set {ecost::%player's uuid%} to 250
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement