on load: register new shaped recipe for gold shovel named "&e&lMagiczna lopata" of unbreaking 10 with lore "&7Pozostalo uzyc: &f2/2", "", "&e&lTa lopata moze niszczyc TYLKO bedrocka" and "&e&lgdy, naciszniesz prawy przycisk myszy" and using emerlad block, diamond block, emerald block, diamond block, diamonf shovel, diamond block, emerlad block, diamond block, emerald block on rightclick with gold shovel: name of player's tool is "&e&lMagiczna lopata" set {_uzycia} to 1st line of player's tool replace all "&7Pozostalo uzyc: &f" with "" in {_uzycia} replace all "/2" with "" in {_uzycia} set {_uzycia} to {_uzycia} parsed as integer if target block is not bedrock: send "&cMusisz patrzec na bedrock!" stop if y-coord of target block <= 1: send "&cNie mozesz tego uzyc na najnizszej warstwie!" stop set target blocck to air remove 1 from {_uzycia} if {_uzycia} > 0: set 1st line of lore of player's tool to "&7Pozostalo uzyc: &f%{_uzycia}%/2" stop remove player's tool from player