
execute run effect give @s speed 1 1 true
execute if entity @e[tag=fly1,type=armor_stand,distance=..3] run effect give @e[distance=..5,nbt=!{SelectedItem:{tag:{fly:1}}},type=!armor_stand] slowness 1 2 true
execute if entity @e[tag=fly1,type=armor_stand,distance=..3] run effect give @e[distance=..5,nbt=!{SelectedItem:{tag:{fly:1}}},tag=type1,type=!armor_stand] instant_damage 1 1 true
execute if entity @e[tag=fly1,type=armor_stand,distance=..3] run effect give @e[distance=..5,tag=type2,type=!armor_stand] instant_health 1 1 true
execute if entity @e[type=armor_stand,distance=..3] at @e[type=#impact_projectiles,distance=..3] run scoreboard players set @s sw 5
execute if entity @e[type=armor_stand,distance=..3] at @e[type=#impact_projectiles,distance=..3] run particle flame ~ ~ ~ 0 0 0 0.1 3
execute if entity @e[type=armor_stand,distance=..3] at @e[type=#impact_projectiles,distance=..3] run tag @e[tag=fly,type=armor_stand,tag=!fly1,limit=1,sort=random,distance=..5] add fly1
execute if entity @e[type=armor_stand,distance=..3] at @e[type=#impact_projectiles,distance=..3] run tp @e[tag=fly1,type=armor_stand,tag=!fly1,limit=1,sort=random,distance=..5] ^ ^ ^1.5
execute if entity @e[type=armor_stand,distance=..3] at @e[type=wither_skull,distance=..3] run tp @e[tag=fly1,type=armor_stand,tag=!fly1,limit=1,sort=random,distance=..5] ~ ~2 ~

execute if entity @e[type=armor_stand,distance=..3] at @e[type=#impact_projectiles,distance=..3] run particle flash ~ ~ ~ 0 0 0 1 1
execute if entity @e[type=armor_stand,distance=..3] at @e[type=#impact_projectiles,distance=..3] run particle flame ~ ~ ~ 0 0 0 0.1 3
execute if entity @e[type=armor_stand,distance=..3] if entity @e[type=#impact_projectiles,distance=..3] run playsound block.anvil.place voice @a ~ ~ ~ 0.5 2
execute if entity @e[type=armor_stand,distance=..3] run kill @e[type=#impact_projectiles,distance=..3]
execute if entity @e[tag=fly1,distance=..2] run scoreboard players add @s re 2
