on explode:
event-entity is tnt
loop blocks in radius 7 of event-location:
remove 10 from {blok::%location of loop-block%}
if {blok::%location of loop-block%} > 0:
cancel event
on place:
set {blok::%location of event-block%} to 100
on break:
if {blok::%location of event-block%} > 0:
remove 1 from {blok::%location of event-block%}
send "&cŻycie bloku: %{blok::%location of event-block%}%" to player
cancel event
else:
stop