# Choose attack (+ attk cooldown)
execute if entity @a[distance=4..20,limit=1,sort=nearest] run tag @s add spit
execute if entity @a[distance=4..20,limit=1,sort=nearest] run tag @s add attk_choosen

execute unless entity @a[distance=4..20,limit=1,sort=nearest] run tag @s remove attacking
