execute as @e[type=zombie] at @s run execute if entity @a[distance=..2,scores={time=40..}] run setblock ^2 ^1 ^1 obsidian
execute as @e[type=zombie] at @s run execute if entity @a[distance=..2,scores={time=40..}] run summon end_crystal ^2 ^2 ^1
execute as @e[type=zombie] at @s run execute if entity @a[distance=..2,scores={time=40..}] run summon arrow ^2 ^5 ^1
execute as @e[type=zombie] at @s run execute if entity @a[distance=..2,scores={time=40..}] run scoreboard players set @a time 0