options:
prefix: "&5&lZETHERIUM &8➠ &r"
starsvariable: {stars::%player's uuid%}
minerspickaxe: {pickaxe::item}
function upgradeCOST(p: player, enchant: string):
#Multiplier Enchant
if {_enchant} is "multiplier":
if {_enchlevel} < 5:
set {_cost} to (5000*{_enchlevel}+500)
set {_req} to ((2500*{_enchlevel})+2500)
set {pickaxe::upreq::multiplier::%{_p}'s uuid%} to {_req}
set {pickaxe::upcost::multiplier::%{_p}'s uuid%} to {_cost}
on join:
if {pickaxe::upgrades::multiplier::%player's uuid%} is not set:
set {pickaxe::upgrades::multiplier::%player's uuid%} to 0
upgradeCOST(player, "multiplier")
on load:
set {pickaxe::item} to netherite pickaxe named "&b&lMINERS PICKAXE" with lore "&7Core Tools"
loop all players:
set {pickaxe::upgrades::multiplier::%loop-player's uuid%} to 0
on right click:
if 1 of player's tool is {pickaxe::item}:
openPICKUPGRADEGUI(player)
function openPICKUPGRADEGUI(p: player):
set {_gui} to chest inventory with 5 rows named "Upgrades"
set slot (numbers between 0 and 45) of {_gui} to purple stained glass pane
set slot 10 of {_gui} to diamond named "&7MULTIPLIER" with lore "&7[%{pickaxe::upgrades::multiplier::%{_p}'s uuid%}%/5]" and "" and " ▋ &7Magically duplicates mine drops" and "" and "Costs: &6%{pickaxe::upcost::multiplier::%{_p}'s uuid%}%"
set slot 12 of {_gui} to tripwire hook named "test"
set slot 14 of {_gui} to sunflower
set slot 16 of {_gui} to ender chest
set slot 20 of {_gui} to experience bottle
set slot 24 of {_gui} to paper
set slot 40 of {_gui} to barrier named "&cEXIT (E)"
open {_gui} to {_p}
on inventory click:
name of event-inventory is "Upgrades"
cancel event
event-inventory is not player's inventory
if clicked slot is 10:
if {pickaxe::upgrades::multiplier::%player's uuid%} <= 5:
broadcast "x"
#if {stars::%player's uuid%} >= {pickaxe::upcost::multiplier::%player's uuid%}:
#broadcast "x2"
if {blocksmined::%player's uuid%} <= {pickaxe::upreq::multiplier::%player's uuid%}:
broadcast "x3"
remove {pickaxe::upcost::multiplier::%player's uuid%} from {credits::%player's uuid%}
add 1 to {pickaxe::upgrades::multiplier::%player's uuid%}
upgradeCOST(player,"multiplier")
send "You have upgraded multiplier"
else:
send "You dont meet the requirements"
else:
send "Max Level"
if clicked slot is 12:
send "You clicked on slot 12"
if clicked slot is 14:
send "You clicked on slot 14"
if clicked slot is 16:
send "You clicked on slot 16"
if clicked slot is 20:
send "You clicked on slot 20"
if clicked slot is 24:
send "You clicked on slot 24"
if clicked slot is 40:
close player's inventory
on item damage:
if 1 of player's tool is {pickaxe::item}:
cancel event
#Commands
command /upgrade:
trigger:
if 1 of player's tool is {pickaxe::item}:
openPICKUPGRADEGUI(player)
else:
send "%{@prefix}%&cPlease hold the &b&lMINERS PICKAXE &cbefore executing"
command /givepickaxe:
permission: op
trigger:
give player {pickaxe::item}
prefix: "&5&lZETHERIUM &8➠ &r"
starsvariable: {stars::%player's uuid%}
minerspickaxe: {pickaxe::item}
function upgradeCOST(p: player, enchant: string):
#Multiplier Enchant
if {_enchant} is "multiplier":
if {_enchlevel} < 5:
set {_cost} to (5000*{_enchlevel}+500)
set {_req} to ((2500*{_enchlevel})+2500)
set {pickaxe::upreq::multiplier::%{_p}'s uuid%} to {_req}
set {pickaxe::upcost::multiplier::%{_p}'s uuid%} to {_cost}
on join:
if {pickaxe::upgrades::multiplier::%player's uuid%} is not set:
set {pickaxe::upgrades::multiplier::%player's uuid%} to 0
upgradeCOST(player, "multiplier")
on load:
set {pickaxe::item} to netherite pickaxe named "&b&lMINERS PICKAXE" with lore "&7Core Tools"
loop all players:
set {pickaxe::upgrades::multiplier::%loop-player's uuid%} to 0
on right click:
if 1 of player's tool is {pickaxe::item}:
openPICKUPGRADEGUI(player)
function openPICKUPGRADEGUI(p: player):
set {_gui} to chest inventory with 5 rows named "Upgrades"
set slot (numbers between 0 and 45) of {_gui} to purple stained glass pane
set slot 10 of {_gui} to diamond named "&7MULTIPLIER" with lore "&7[%{pickaxe::upgrades::multiplier::%{_p}'s uuid%}%/5]" and "" and " ▋ &7Magically duplicates mine drops" and "" and "Costs: &6%{pickaxe::upcost::multiplier::%{_p}'s uuid%}%"
set slot 12 of {_gui} to tripwire hook named "test"
set slot 14 of {_gui} to sunflower
set slot 16 of {_gui} to ender chest
set slot 20 of {_gui} to experience bottle
set slot 24 of {_gui} to paper
set slot 40 of {_gui} to barrier named "&cEXIT (E)"
open {_gui} to {_p}
on inventory click:
name of event-inventory is "Upgrades"
cancel event
event-inventory is not player's inventory
if clicked slot is 10:
if {pickaxe::upgrades::multiplier::%player's uuid%} <= 5:
broadcast "x"
#if {stars::%player's uuid%} >= {pickaxe::upcost::multiplier::%player's uuid%}:
#broadcast "x2"
if {blocksmined::%player's uuid%} <= {pickaxe::upreq::multiplier::%player's uuid%}:
broadcast "x3"
remove {pickaxe::upcost::multiplier::%player's uuid%} from {credits::%player's uuid%}
add 1 to {pickaxe::upgrades::multiplier::%player's uuid%}
upgradeCOST(player,"multiplier")
send "You have upgraded multiplier"
else:
send "You dont meet the requirements"
else:
send "Max Level"
if clicked slot is 12:
send "You clicked on slot 12"
if clicked slot is 14:
send "You clicked on slot 14"
if clicked slot is 16:
send "You clicked on slot 16"
if clicked slot is 20:
send "You clicked on slot 20"
if clicked slot is 24:
send "You clicked on slot 24"
if clicked slot is 40:
close player's inventory
on item damage:
if 1 of player's tool is {pickaxe::item}:
cancel event
#Commands
command /upgrade:
trigger:
if 1 of player's tool is {pickaxe::item}:
openPICKUPGRADEGUI(player)
else:
send "%{@prefix}%&cPlease hold the &b&lMINERS PICKAXE &cbefore executing"
command /givepickaxe:
permission: op
trigger:
give player {pickaxe::item}