execute if entity @s[tag=!dark_curse] run scoreboard players add @s n_effects 1

execute if entity @s[tag=!dark_curse] run scoreboard players operation @s dark_curse = duration n_effects
execute if entity @s[tag=dark_curse] if score @s dark_curse < duration n_effects run scoreboard players operation @s dark_curse = duration n_effects

execute unless score @s dark_curse_2 matches ..0 unless score @s dark_curse_2 matches 0.. run scoreboard players set @s dark_curse_2 1

execute at @s run playsound custom.effect.dark_curse ambient @a ~ ~ ~ 1 .55

tag @s add dark_curse
