
# -> Add value
$scoreboard players add @s OverlyRealistic.Player.Stats.Carbs $(amount)

# -> Advancement
advancement grant @s only overly_realistic:advancements/livelyhood/full_of_carbs

# -> Clamp amount
execute if score @s OverlyRealistic.Player.Stats.Carbs matches 51.. run \
    scoreboard players set @s OverlyRealistic.Player.Stats.Carbs 50

# -> Remove debuff
attribute @s attack_speed modifier remove overly_realistic:low_carbs_attack_speed_debuff
