Advertisement
Heio

Untitled

Feb 24th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.14 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 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)
  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.  
  21. function enchanterEnchant(p: player, e: String, n: Number, s: Number):
  22. if {_p}'s tool is a pickaxe:
  23. if {_e} is "Haste I":
  24. if {_p}'s balance is greater than {_n} - 1:
  25. remove {_n} from {_p}'s balance
  26. set lore of {_p}'s tool to "%lore of {_p}'s tool%||&e%{_e}%&e"
  27. execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
  28. else:
  29. close {_p}'s inventory
  30. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  31. send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
  32. if {_e} is "Haste II":
  33. if {_p}'s balance is greater than {_n} - 1:
  34. remove {_n} from {_p}'s balance
  35. replace all "Haste I" in lore of {_p}'s tool with "Haste II"
  36. execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
  37. else:
  38. close {_p}'s inventory
  39. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  40. send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
  41. if {_e} is "Speed I":
  42. if {_p}'s balance is greater than {_n} - 1:
  43. remove {_n} from {_p}'s balance
  44. set lore of {_p}'s tool to "%lore of {_p}'s tool%||&9%{_e}%&9"
  45. execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
  46. else:
  47. close {_p}'s inventory
  48. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  49. send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
  50. if {_e} is "Speed II":
  51. if {_p}'s balance is greater than {_n} - 1:
  52. remove {_n} from {_p}'s balance
  53. replace all "Speed I" in lore of {_p}'s tool with "Speed II"
  54. execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
  55. else:
  56. close {_p}'s inventory
  57. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  58. send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
  59. if {_e} is "Speed III":
  60. if {_p}'s balance is greater than {_n} - 1:
  61. remove {_n} from {_p}'s balance
  62. replace all "Speed II" in lore of {_p}'s tool with "Speed III"
  63. execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
  64. else:
  65. close {_p}'s inventory
  66. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  67. send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
  68. if lore of {_p}'s tool doesn't contain "Haste":
  69. 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)
  70. else if lore of {_p}'s tool contains "&eHaste I&e":
  71. 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)
  72. else if lore of {_p}'s tool contains "&eHaste II&e":
  73. format gui slot 10 of {_p} with a gold pickaxe named "&6Haste" with lore "||&7MAX LEVEL||&7"
  74. if lore of {_p}'s tool doesn't contain "Speed":
  75. 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)
  76. else if lore of {_p}'s tool contains "&9Speed I&9":
  77. 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)
  78. else if lore of {_p}'s tool contains "&9Speed II&9":
  79. 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)
  80. else if lore of {_p}'s tool contains "&9Speed III&9":
  81. format gui slot 11 of {_p} with a gold boots named "&9Speed" with lore "||&7MAX LEVEL, you're Sonic!||&7"
  82. else:
  83. send "&cYou must be holding a Pickaxe!" to {_p}
  84. close {_p}'s inventory
  85. execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
  86.  
  87. on rightclick on enchantment_table:
  88. cancel event
  89. open chest with 4 rows named "Pickaxe Enchanter" to player
  90. enchanterOpen(player)
  91.  
  92. every tick:
  93. loop all players:
  94. if lore of loop-player's tool contains "&eHaste I&e":
  95. execute console command "effect %loop-player% haste 1000000 0"
  96. else if lore of loop-player's tool contains "&eHaste II":
  97. execute console command "effect %loop-player% haste 1000000 1"
  98. else if lore of loop-player's tool doesn't contain "&eHaste":
  99. execute console command "effect %loop-player% haste 0"
  100. else if loop-player's tool isn't a pickaxe:
  101. execute console command "effect %loop-player% haste 0"
  102. if lore of loop-player's tool contains "&9Speed I&9":
  103. execute console command "effect %loop-player% speed 1000000 0"
  104. else if lore of loop-player's tool contains "&9Speed II&9":
  105. execute console command "effect %loop-player% speed 1000000 1"
  106. else if lore of loop-player's tool contains "&9Speed III&9":
  107. execute console command "effect %loop-player% speed 1000000 2"
  108. else if lore of loop-player's tool doesn't contain "&9Speed":
  109. execute console command "effect %loop-player% speed 0"
  110. else if loop-player's tool isn't a pickaxe:
  111. execute console command "effect %loop-player% speed 0"
  112.  
  113. on mine:
  114. lore of player's tool contains "Explosive"
  115. create a fake explosion at event-block
  116. if lore of player's tool contains "&cExplosive I&c":
  117. loop blocks in radius 1.5:
  118. loop-block is end stone
  119. execute console command "setblock %x-loc of loop-block% %y-loc of loop-block% %z-loc of loop-block% air 0 destroy"
  120. add 1 + {booster.%player%} to {xp.%player%}
  121. if lore of player's tool contains "&cExplosive II&c":
  122. loop blocks in radius 2.5:
  123. loop-block is end stone
  124. execute console command "setblock %x-loc of loop-block% %y-loc of loop-block% %z-loc of loop-block% air 0 destroy"
  125. add 1 + {booster.%player%} to {xp.%player%}
  126. if lore of player's tool contains "&cExplosive III&c":
  127. loop blocks in radius 3.5:
  128. loop-block is end stone
  129. execute console command "setblock %x-loc of loop-block% %y-loc of loop-block% %z-loc of loop-block% air 0 destroy"
  130. add 1 + {booster.%player%} to {xp.%player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement