Im trying to make it so when a player clicks on the gui item, it "upgrades" the current item. Im using vanilla GUIS. Nothing happens when the item is clicked.
Code:
on inventory click:
if event-slot is wooden pickaxe named "&8Wooden &7Pickaxe &8[&e2&8]":
if player has 128 coal:
give wooden pickaxe named "&8Wooden &7Pickaxe &8[&e2&8]" to player
remove 128 coal from player
remove wooden pickaxe named "&8Wooden &7Pickaxe &8[&e1&8]" from player
close player's inventory
else:
send "&c&lSorry! You dont have the resources to upgrade this item!"
close player's inventory
if event-inventory is not player's inventory:
cancel event
Last edited: