local cum_leaking_entity = nil

for _, ch in ipairs(EntityGetAllChildren(GetUpdatedEntityID()) or {}) do
	if EntityGetName(ch) == "ln_cum_leaking" then
		cum_leaking_entity = ch
		break
	end
end

if cum_leaking_entity == nil then
	local damage = ComponentGetValue2(EntityGetFirstComponent(GetUpdatedEntityID(), "DamageModelComponent"), "max_hp") / 100

	if ComponentGetValue2(EntityGetFirstComponent(GetUpdatedEntityID(), "DamageModelComponent"), "hp") > damage then
		EntityInflictDamage(GetUpdatedEntityID(), damage, "DAMAGE_CURSE", "cum addiction withdrawal", "NORMAL", 0, 0, GetUpdatedEntityID())
	end
else
	local heal = ComponentGetValue2(EntityGetFirstComponent(GetUpdatedEntityID(), "DamageModelComponent"), "max_hp") / 1000
	EntityInflictDamage(GetUpdatedEntityID(), -heal, "DAMAGE_HEALING", "cum heal", "NORMAL", 0, 0, GetUpdatedEntityID())
end