execute if score count_mobs darkmobs matches 0.. run effect give @s minecraft:weakness 99999 0
execute if score count_mobs darkmobs matches 0.. run effect give @s minecraft:absorption 99999 4
execute if score count_mobs darkmobs matches 0.. run effect give @s minecraft:speed 99999 1


tag @s add not_mob1
scoreboard players add count_mobs darkmobs 1
execute if score count_mobs darkmobs matches 1.. run scoreboard players set count_mobs darkmobs 0
