
# -> Remove existing attributes
attribute @s entity_interaction_range modifier remove overly_realistic:random_spawn_modifier
attribute @s block_interaction_range modifier remove overly_realistic:random_spawn_modifier
attribute @s movement_speed modifier remove overly_realistic:random_spawn_modifier
attribute @s attack_damage modifier remove overly_realistic:random_spawn_modifier
attribute @s attack_speed modifier remove overly_realistic:random_spawn_modifier
attribute @s block_break_speed modifier remove overly_realistic:random_spawn_modifier
attribute @s sneaking_speed modifier remove overly_realistic:random_spawn_modifier
attribute @s scale modifier remove overly_realistic:random_spawn_modifier
attribute @s max_health modifier remove overly_realistic:random_spawn_modifier

# -> Attribute apply
$attribute @s entity_interaction_range modifier add overly_realistic:random_spawn_modifier $(entity_block_interaction_range) add_value
$attribute @s block_interaction_range modifier add overly_realistic:random_spawn_modifier $(entity_block_interaction_range) add_value
$attribute @s movement_speed modifier add overly_realistic:random_spawn_modifier $(movement_speed) add_value
$attribute @s attack_damage modifier add overly_realistic:random_spawn_modifier $(attack_damage) add_value
$attribute @s attack_speed modifier add overly_realistic:random_spawn_modifier $(attack_speed) add_value
$attribute @s block_break_speed modifier add overly_realistic:random_spawn_modifier $(block_break_speed) add_value
$attribute @s sneaking_speed modifier add overly_realistic:random_spawn_modifier $(sneaking_speed) add_value
$attribute @s scale modifier add overly_realistic:random_spawn_modifier $(scale) add_value
$attribute @s max_health modifier add overly_realistic:random_spawn_modifier $(max_health) add_value

# -> Stamina apply
execute store result score @s OverlyRealistic.Player.Stats.MaxStamina run \
    random value 25..100
scoreboard players set @s OverlyRealistic.Player.Stats.Stamina 52

# -> Apply health
effect give @s instant_health 5 200 true