on place:
if player's tool is emerald ore named "&bMetin &3&lWalki":
set event-block to emerald ore
wait 3 second
if event-block is emerald ore:
if {hp::%location of event-block%} is not set:
set {hp::%location of event-block%} to 100
on mine:
if event-block is emerald ore:
if {hp::%location of event-block%} is set:
remove 1 from {hp::%location of event-block%}
if {hp::%location of event-block%} > 0:
cancel event
send "&bMetin &3Walki &f- &2Zycie ( %{hp::%location of event-block%}% )"
if {hp::%location of event-block%} <= 0:
send "rozwaliles metina"
drop (diamond and emerald and coal) at event-block
clear {hp::%location of event-block%}