on load: register new shaped recipe for sponge of fortune 10 named "&6Stoniarka" with lore "&7Pozostalo uzyc: &f100/100" using cobblestone, cobblestone, cobblestone, cobblestone, diamond block, cobblestone, cobblestone, cobblestone, cobblestone on place of sponge: name of player's tool is "&6Stoniarka" set {_uzycia} to 1st line of lore od player's tool replace all "&7Pozostalo uzyc: &f" with "" in {_uzycia} replace all "/100" with "" in {_uzycia} set {_uzycia} to {_uzycia} parsed as integer {_uzycia} > 0 send "&aPostawiles stoniarke! Posiada ona %{_uzycia}% uzyc. Mozesz ja zniszczyc za pomoca zlotego kiolfa." set {stoniarka::%location of event-block%} to {_uzycia} set {stoniarkaloc::%location of event-block%} to location of event-block wait 2 ticks set event-block to stone on break of stone: {stoniarka::%location of event-block%} is set {stoniarkaloc::%location of event-block%} is set if player's tool is gold pickaxe: drop sponge named "&6Stoniarka" with lore "&7Pozostalo uzyc: &f%{stoniarka::%location of event-block%}%/100" at player clear {stoniarka::%location of event-block%} clear {stoniarkaloc::%location of event-block%} send "&cStoniarka zostala zniszczona." stop remove 1 from {stoniarka::%location of event-block%} if {stoniarka::%location of event-block%} < 0: send "&cWytrzymalosc stoniarki wlasnie sie wyczerpala." clear {stoniarka::%location of event-block%} clear {stoniarkaloc::%location of event-block%} stop wait 1 second set block at {stoniarkaloc::%location of event-block%} to stone