if target living entity is set:
loop 10 times:
drawLine particle smokelarge, XYZ 0.3, 0.3, 0.3, center player, target location of target living entity, id "%random number between 0 and 100000%", rainbowMode false, solid false, density 2, length 0, zigZag count 0, height 0, visibleRange 100, displacementXYZ 0, 0, 0, pulseDelay 1
set {target.%player%} to location of target living entity
wait 1.3 second
create a safe explosion of force 5 at {target.%player%}
loop all living entities in radius 4 around {target.%player%}:
damage loop-entity by 3
stop
if target block is set:
loop 10 times:
drawLine particle smokelarge, XYZ 0.3, 0.3, 0.3, center player, target location of target block, id "%random number between 0 and 100000%", rainbowMode false, solid false, density 2, length 0, zigZag count 0, height 0, visibleRange 100, displacementXYZ 0, 0, 0, pulseDelay 1
set {target.%player%} to location of target block
wait 1.3 second
create a safe explosion of force 5 at {target.%player%}
loop all living entities in radius 4 around {target.%player%}:
damage loop-entity by 3
stop
loop 10 times:
drawLine particle smokelarge, XYZ 0.3, 0.3, 0.3, center player, id "%random number between 0 and 100000%", rainbowMode false, solid false, density 2, length 70, zigZag count 0, height 0, visibleRange 100, displacementXYZ 0, 0, 0, pulseDelay 1