execute if score @s total_score > #score_max mem run scoreboard players operation #score_max mem = @s total_score