tag @s[scores={attribute_point=1..}] add can_upgrade

tag @s[tag=can_upgrade,tag=elf,scores={stat_str=5..}] remove can_upgrade

tellraw @s[tag=elf, scores={stat_str=5.., attribute_point=1..}] {"rawtext":[{"text":"§cElves reached the Strength limit!"}]}

tag @s[tag=can_upgrade, tag=dwarf, scores={stat_str=6..}] remove can_upgrade

tellraw @s[tag=dwarf, scores={stat_str=6.., attribute_point=1..}] {"rawtext":[{"text":"§cDwarves reached the Strength limit!"}]}

tag @s[tag=can_upgrade, scores={stat_str=10..}] remove can_upgrade

tellraw @s[scores={stat_str=10..,attribute_point=1..}] {"rawtext":[{"text":"§cMaximum Level Reached!"}]}

scoreboard players remove @s[tag=can_upgrade] attribute_point 1
scoreboard players add @s[tag=can_upgrade] stat_str 1
tellraw @s[tag=can_upgrade] {"rawtext":[{"text":"§aStrength Increased!"}]}
playsound random.levelup @s[tag=can_upgrade]

tellraw @s[scores={attribute_point=..0}] {"rawtext":[{"text":"§cNot enough points!"}]}

tag @s[tag=can_upgrade] remove can_upgrade