execute at @e[type=spider,tag=!nocusmob] run scoreboard players add s skeletonk 1
execute at @e[type=spider,tag=!nocusmob] if score s skeletonk matches 2.. run function rfi:mob/spider/spiderkill
execute at @e[type=spider,tag=!nocusmob] run tag @e[distance=..1] add nocusmob