Advertisement
Heio

Untitled

Feb 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.50 KB | None | 0 0
  1. function enchanterOpen(p: player):
  2. execute console command "playsound minecraft:entity.bat.takeoff master %{_p}% ~ ~ ~ 100000 1"
  3. wait 1 tick
  4. if lore of {_p}'s tool isn't set:
  5. set lore of {_p}'s tool to " "
  6. if lore of {_p}'s tool doesn't contain "Haste":
  7. format gui slot 10 of {_p} with a gold pickaxe named "&6Haste" with lore "||&e$40,000||&7||&7Adds some speed to your pickaxe!||&7" to run function enchanterEnchant({_p}, "Haste I", 40000, 10)
  8. else if lore of {_p}'s tool contains "&eHaste I&e":
  9. format gui slot 10 of {_p} with a gold pickaxe named "&6Haste" with lore "||&e$75,000||&7||&7Adds some speed to your pickaxe!||&7" to run function enchanterEnchant({_p}, "Haste II", 75000, 10)
  10. else if lore of {_p}'s tool contains "&eHaste II&e":
  11. format gui slot 10 of {_p} with a gold pickaxe named "&6Haste" with lore "||&7MAX LEVEL||&7"
  12. if lore of {_p}'s tool doesn't contain "Speed":
  13. format gui slot 11 of {_p} with a leather boots named "&9Speed" with lore "||&e$15,000||&7||&7On your way of becoming Sonic!||&7" to run function enchanterEnchant({_p}, "Speed I", 15000, 11)
  14. else if lore of {_p}'s tool contains "&9Speed I&9":
  15. format gui slot 11 of {_p} with a iron boots named "&9Speed" with lore "||&e$25,000||&7||&7On your way of becoming Sonic!||&7" to run function enchanterEnchant({_p}, "Speed II", 25000, 11)
  16. else if lore of {_p}'s tool contains "&9Speed II&9":
  17. format gui slot 11 of {_p} with a diamond boots named "&9Speed" with lore "||&e$45,000||&7||&7On your way of becoming Sonic!||&7" to run function enchanterEnchant({_p}, "Speed II", 45000, 11)
  18. else if lore of {_p}'s tool contains "&9Speed III&9":
  19. format gui slot 11 of {_p} with a gold boots named "&9Speed" with lore "||&7MAX LEVEL, you're Sonic!||&7"
  20. if lore of {_p}'s tool doesn't contain "Explosive":
  21. format gui slot 11 of {_p} with a tnt named "&9Speed" with lore "||&e$250,000||&7||&7Cmon, put some dinamite on your pickaxe!||&7" to run function enchanterEnchant({_p}, "Explosive I", 250000, 12)
  22. else if lore of {_p}'s tool contains "&cExplosive I&c":
  23. format gui slot 11 of {_p} with a tnt named "&cExplosive" with lore "||&e$450,000||&7||&7Cmon, put some dinamite on your pickaxe!||&7" to run function enchanterEnchant({_p}, "Explosive II", 450000, 12)
  24. else if lore of {_p}'s tool contains "&cExplosive II&c":
  25. format gui slot 11 of {_p} with a tnt named "&cExplosive" with lore "||&e$1,000,000||&7||&7Cmon, put some dinamite on your pickaxe!||&7" to run function enchanterEnchant({_p}, "Explosive III", 1000000, 12)
  26. else if lore of {_p}'s tool contains "&cExplosive III&c":
  27. format gui slot 11 of {_p} with a tnt named "&cExplosive" with lore "||&7MAX LEVEL||&7"
  28.  
  29. function enchanterEnchant(p: player, e: String, n: Number, s: Number):
  30. if {_p}'s tool is a pickaxe:
  31. if {_e} is "Haste I":
  32. if {_p}'s balance is greater than {_n} - 1:
  33. remove {_n} from {_p}'s balance
  34. set lore of {_p}'s tool to "%lore of {_p}'s tool%||&e%{_e}%&e"
  35. execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
  36. else:
  37. close {_p}'s inventory
  38. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  39. send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
  40. if {_e} is "Haste II":
  41. if {_p}'s balance is greater than {_n} - 1:
  42. remove {_n} from {_p}'s balance
  43. replace all "Haste I" in lore of {_p}'s tool with "Haste II"
  44. execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
  45. else:
  46. close {_p}'s inventory
  47. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  48. send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
  49. if {_e} is "Speed I":
  50. if {_p}'s balance is greater than {_n} - 1:
  51. remove {_n} from {_p}'s balance
  52. set lore of {_p}'s tool to "%lore of {_p}'s tool%||&9%{_e}%&9"
  53. execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
  54. else:
  55. close {_p}'s inventory
  56. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  57. send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
  58. if {_e} is "Speed II":
  59. if {_p}'s balance is greater than {_n} - 1:
  60. remove {_n} from {_p}'s balance
  61. replace all "Speed I" in lore of {_p}'s tool with "Speed II"
  62. execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
  63. else:
  64. close {_p}'s inventory
  65. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  66. send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
  67. if {_e} is "Speed III":
  68. if {_p}'s balance is greater than {_n} - 1:
  69. remove {_n} from {_p}'s balance
  70. replace all "Speed II" in lore of {_p}'s tool with "Speed III"
  71. execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
  72. else:
  73. close {_p}'s inventory
  74. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  75. send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
  76. if {_e} is "Explosive I":
  77. if {_p}'s balance is greater than {_n} - 1:
  78. remove {_n} from {_p}'s balance
  79. set lore of {_p}'s tool to "%lore of {_p}'s tool%||&c%{_e}%&c"
  80. execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
  81. else:
  82. close {_p}'s inventory
  83. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  84. send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
  85. if {_e} is "Explosive II":
  86. if {_p}'s balance is greater than {_n} - 1:
  87. remove {_n} from {_p}'s balance
  88. replace all "Explosive I" in lore of {_p}'s tool with "Explosive II"
  89. execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
  90. else:
  91. close {_p}'s inventory
  92. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  93. send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
  94. if {_e} is "Explosive III":
  95. if {_p}'s balance is greater than {_n} - 1:
  96. remove {_n} from {_p}'s balance
  97. replace all "Explosive II" in lore of {_p}'s tool with "Explosive III"
  98. execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
  99. else:
  100. close {_p}'s inventory
  101. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  102. send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
  103. if lore of {_p}'s tool doesn't contain "Haste":
  104. format gui slot 10 of {_p} with a gold pickaxe named "&6Haste" with lore "||&e$40,000||&7||&7Adds some speed to your pickaxe!||&7" to run function enchanterEnchant({_p}, "Haste I", 40000, 10)
  105. else if lore of {_p}'s tool contains "&eHaste I&e":
  106. format gui slot 10 of {_p} with a gold pickaxe named "&6Haste" with lore "||&e$75,000||&7||&7Adds some speed to your pickaxe!||&7" to run function enchanterEnchant({_p}, "Haste II", 75000, 10)
  107. else if lore of {_p}'s tool contains "&eHaste II&e":
  108. format gui slot 10 of {_p} with a gold pickaxe named "&6Haste" with lore "||&7MAX LEVEL||&7"
  109. if lore of {_p}'s tool doesn't contain "Speed":
  110. format gui slot 11 of {_p} with a leather boots named "&9Speed" with lore "||&e$15,000||&7||&7On your way of becoming Sonic!||&7" to run function enchanterEnchant({_p}, "Speed I", 15000, 11)
  111. else if lore of {_p}'s tool contains "&9Speed I&9":
  112. format gui slot 11 of {_p} with a iron boots named "&9Speed" with lore "||&e$25,000||&7||&7On your way of becoming Sonic!||&7" to run function enchanterEnchant({_p}, "Speed II", 25000, 11)
  113. else if lore of {_p}'s tool contains "&9Speed II&9":
  114. format gui slot 11 of {_p} with a diamond pickaxe named "&9Speed" with lore "||&e$45,000||&7||&7On your way of becoming Sonic!||&7" to run function enchanterEnchant({_p}, "Speed II", 45000, 11)
  115. else if lore of {_p}'s tool contains "&9Speed III&9":
  116. format gui slot 11 of {_p} with a gold boots named "&9Speed" with lore "||&7MAX LEVEL, you're Sonic!||&7"
  117. else:
  118. send "&cYou must be holding a Pickaxe!" to {_p}
  119. close {_p}'s inventory
  120. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  121.  
  122. on rightclick on enchantment_table:
  123. cancel event
  124. open chest with 4 rows named "Pickaxe Enchanter" to player
  125. enchanterOpen(player)
  126.  
  127. every tick:
  128. loop all players:
  129. if lore of loop-player's tool contains "&eHaste I&e":
  130. execute console command "effect %loop-player% haste 1000000 0"
  131. else if lore of loop-player's tool contains "&eHaste II":
  132. execute console command "effect %loop-player% haste 1000000 1"
  133. else if lore of loop-player's tool doesn't contain "&eHaste":
  134. execute console command "effect %loop-player% haste 0"
  135. else if loop-player's tool isn't a pickaxe:
  136. execute console command "effect %loop-player% haste 0"
  137. if lore of loop-player's tool contains "&9Speed I&9":
  138. execute console command "effect %loop-player% speed 1000000 0"
  139. else if lore of loop-player's tool contains "&9Speed II&9":
  140. execute console command "effect %loop-player% speed 1000000 1"
  141. else if lore of loop-player's tool contains "&9Speed III&9":
  142. execute console command "effect %loop-player% speed 1000000 2"
  143. else if lore of loop-player's tool doesn't contain "&9Speed":
  144. execute console command "effect %loop-player% speed 0"
  145. else if loop-player's tool isn't a pickaxe:
  146. execute console command "effect %loop-player% speed 0"
  147.  
  148. on mine:
  149. lore of player's tool contains "Explosive"
  150. if lore of player's tool contains "&cExplosive I&c":
  151. loop blocks in radius 1.5:
  152. loop-block is end stone
  153. execute console command "setblock %x-loc of loop-block% %y-loc of loop-block% %z-loc of loop-block% air 0 destroy"
  154. add 1 + {booster.%player%} to {xp.%player%}
  155. if lore of player's tool contains "&cExplosive II&c":
  156. loop blocks in radius 2.5:
  157. loop-block is end stone
  158. execute console command "setblock %x-loc of loop-block% %y-loc of loop-block% %z-loc of loop-block% air 0 destroy"
  159. add 1 + {booster.%player%} to {xp.%player%}
  160. if lore of player's tool contains "&cExplosive III&c":
  161. loop blocks in radius 3.5:
  162. loop-block is end stone
  163. execute console command "setblock %x-loc of loop-block% %y-loc of loop-block% %z-loc of loop-block% air 0 destroy"
  164. add 1 + {booster.%player%} to {xp.%player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement