Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function enchanterOpen(p: player):
- execute console command "playsound minecraft:entity.bat.takeoff master %{_p}% ~ ~ ~ 100000 1"
- wait 1 tick
- if lore of {_p}'s tool isn't set:
- set lore of {_p}'s tool to " "
- if lore of {_p}'s tool doesn't contain "Haste":
- 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)
- else if lore of {_p}'s tool contains "&eHaste I&e":
- 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)
- else if lore of {_p}'s tool contains "&eHaste II&e":
- format gui slot 10 of {_p} with a gold pickaxe named "&6Haste" with lore "||&7MAX LEVEL||&7"
- if lore of {_p}'s tool doesn't contain "Speed":
- 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)
- else if lore of {_p}'s tool contains "&9Speed I&9":
- 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)
- else if lore of {_p}'s tool contains "&9Speed II&9":
- 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)
- else if lore of {_p}'s tool contains "&9Speed III&9":
- format gui slot 11 of {_p} with a gold boots named "&9Speed" with lore "||&7MAX LEVEL, you're Sonic!||&7"
- function enchanterEnchant(p: player, e: String, n: Number, s: Number):
- if {_p}'s tool is a pickaxe:
- if {_e} is "Haste I":
- if {_p}'s balance is greater than {_n} - 1:
- remove {_n} from {_p}'s balance
- set lore of {_p}'s tool to "%lore of {_p}'s tool%||&e%{_e}%&e"
- execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
- else:
- close {_p}'s inventory
- execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
- send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
- if {_e} is "Haste II":
- if {_p}'s balance is greater than {_n} - 1:
- remove {_n} from {_p}'s balance
- replace all "Haste I" in lore of {_p}'s tool with "Haste II"
- execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
- else:
- close {_p}'s inventory
- execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
- send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
- if {_e} is "Speed I":
- if {_p}'s balance is greater than {_n} - 1:
- remove {_n} from {_p}'s balance
- set lore of {_p}'s tool to "%lore of {_p}'s tool%||&9%{_e}%&9"
- execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
- else:
- close {_p}'s inventory
- execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
- send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
- if {_e} is "Speed II":
- if {_p}'s balance is greater than {_n} - 1:
- remove {_n} from {_p}'s balance
- replace all "Speed I" in lore of {_p}'s tool with "Speed II"
- execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
- else:
- close {_p}'s inventory
- execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
- send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
- if {_e} is "Speed III":
- if {_p}'s balance is greater than {_n} - 1:
- remove {_n} from {_p}'s balance
- replace all "Speed II" in lore of {_p}'s tool with "Speed III"
- execute console command "playsound entity.player.levelup master %{_p}% ~ ~ ~ 100000000 2"
- else:
- close {_p}'s inventory
- execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
- send "&cYou need atleast $%{_n}% to enchant your pickaxe with %{_e}%!" to {_p}
- if lore of {_p}'s tool doesn't contain "Haste":
- 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)
- else if lore of {_p}'s tool contains "&eHaste I&e":
- 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)
- else if lore of {_p}'s tool contains "&eHaste II&e":
- format gui slot 10 of {_p} with a gold pickaxe named "&6Haste" with lore "||&7MAX LEVEL||&7"
- if lore of {_p}'s tool doesn't contain "Speed":
- 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)
- else if lore of {_p}'s tool contains "&9Speed I&9":
- 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)
- else if lore of {_p}'s tool contains "&9Speed II&9":
- 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)
- else if lore of {_p}'s tool contains "&9Speed III&9":
- format gui slot 11 of {_p} with a gold boots named "&9Speed" with lore "||&7MAX LEVEL, you're Sonic!||&7"
- else:
- send "&cYou must be holding a Pickaxe!" to {_p}
- close {_p}'s inventory
- execute console command "/playsound minecraft:entity.blaze.hurt master %{_p}% ~ ~ ~ 100000000 1.3"
- on rightclick on enchantment_table:
- cancel event
- open chest with 4 rows named "Pickaxe Enchanter" to player
- enchanterOpen(player)
- every tick:
- loop all players:
- if lore of loop-player's tool contains "&eHaste I&e":
- execute console command "effect %loop-player% haste 1000000 0"
- else if lore of loop-player's tool contains "&eHaste II":
- execute console command "effect %loop-player% haste 1000000 1"
- else if lore of loop-player's tool doesn't contain "&eHaste":
- execute console command "effect %loop-player% haste 0"
- else if loop-player's tool isn't a pickaxe:
- execute console command "effect %loop-player% haste 0"
- if lore of loop-player's tool contains "&9Speed I&9":
- execute console command "effect %loop-player% speed 1000000 0"
- else if lore of loop-player's tool contains "&9Speed II&9":
- execute console command "effect %loop-player% speed 1000000 1"
- else if lore of loop-player's tool contains "&9Speed III&9":
- execute console command "effect %loop-player% speed 1000000 2"
- else if lore of loop-player's tool doesn't contain "&9Speed":
- execute console command "effect %loop-player% speed 0"
- else if loop-player's tool isn't a pickaxe:
- execute console command "effect %loop-player% speed 0"
- on mine:
- lore of player's tool contains "Explosive"
- create a fake explosion at event-block
- if lore of player's tool contains "&cExplosive I&c":
- loop blocks in radius 1.5:
- loop-block is end stone
- execute console command "setblock %x-loc of loop-block% %y-loc of loop-block% %z-loc of loop-block% air 0 destroy"
- add 1 + {booster.%player%} to {xp.%player%}
- if lore of player's tool contains "&cExplosive II&c":
- loop blocks in radius 2.5:
- loop-block is end stone
- execute console command "setblock %x-loc of loop-block% %y-loc of loop-block% %z-loc of loop-block% air 0 destroy"
- add 1 + {booster.%player%} to {xp.%player%}
- if lore of player's tool contains "&cExplosive III&c":
- loop blocks in radius 3.5:
- loop-block is end stone
- execute console command "setblock %x-loc of loop-block% %y-loc of loop-block% %z-loc of loop-block% air 0 destroy"
- add 1 + {booster.%player%} to {xp.%player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement