I'm trying to make so exploded blocks go back to the players inventory but isn't working (its being dropped on ground), here's my code:
on block break:
chance of 100%:
if player's tool is a pickaxe:
loop blocks from the block 1 in front of the player to the block 20 in front of the player:
create explosion of force 2 at loop-block
give loop-block to player
set loop-block to air
wait 1 tick
on block break:
chance of 100%:
if player's tool is a pickaxe:
loop blocks from the block 1 in front of the player to the block 20 in front of the player:
create explosion of force 2 at loop-block
give loop-block to player
set loop-block to air
wait 1 tick