$execute if entity @a[nbt={active_effects:[{id:"minecraft:poison"}]}] run effect give @s regeneration $(x) 1 true
$execute if entity @a[nbt={active_effects:[{id:"minecraft:wither"}]}] run effect give @s regeneration $(x) 1 true
$execute if entity @a[nbt={active_effects:[{id:"minecraft:slowness"}]}] run effect give @s speed $(x) 1 true
$execute if entity @a[nbt={active_effects:[{id:"minecraft:weakness"}]}] run effect give @s strength $(x) 1 true
$execute if entity @a[nbt={active_effects:[{id:"minecraft:mining_fatigue"}]}] run effect give @s haste $(x) 1 true
$execute if entity @a[nbt={active_effects:[{id:"minecraft:nausea"}]}] run effect give @s night_vision $(x) 0 true
$execute if entity @a[nbt={active_effects:[{id:"minecraft:blindness"}]}] run effect give @s night_vision $(x) 0 true
$execute if entity @a[nbt={active_effects:[{id:"minecraft:hunger"}]}] run effect give @s saturation $(x) 0 true
$execute if entity @a[nbt={active_effects:[{id:"minecraft:darkness"}]}] run effect give @s night_vision $(x) 0 true