sub "kaydet":
set {_x} to 0
loop blocks within {pos1} to {pos2}:
add 1 to {_x}
if {_x} is 50:
set {_x} to 0
wait 1 ticks
if loop-block is not air:
set {blok::%location of loop-block%::tip} to type of block at loop-block
sub "yenile":
set {_x} to 0
loop blocks within {pos1} to {pos2}:
if {_x} is 100:
set {_x} to 0
wait 1 ticks
else if {blok::%location of loop-block%::tip} is set:
if type of loop-block is not {blok::%location of loop-block%::tip}:
add 1 to {_x}
set block at loop-block to {blok::%location of loop-block%::tip}
else:
if loop-block is not air:
add 1 to {_x}
set block at loop-block to air
on rightclick with wooden shovel:
clicked block is set
cancel event
set {pos2} to location of clicked block
send "&d2. yer seçildi."
on leftclick with wooden shovel:
clicked block is set
cancel event
set {pos1} to location of clicked block
send "&d1. yer seçildi."
command /arenakaydet:
trigger:
invoke "kaydet"
command /arenayenile:
trigger:
invoke "yenile"