function repair(p: player): if {_p)'s lvl is greater than 29: repair {_p}'s tool set {_p}'s lvl to ({_p}'s lvl - 30) send "&aNaprawiles przedmiot!" to {_p} else: send "&cMasz za maly poziom exp. Wymagany 30!" to {_p} on right click on anvil: cancel event open chest with 1 rows named "&eKowadlo:" to player set player's current inventory's slot 5 to anvil named "&eKliknij i napraw!" with lore "&7Koszt: &e30 poziom exp.||&7Przedmiot: &e%player's tool%" on inventory click: if inventory name of current inventory of player is "&eKowadlo:": if clicked slot is 5: repair(player)