$execute unless entity @s[scores={svm_ep.ability_points=$(cost)..}] run return run function svm_ep:system/message/not_enough_ability_points {"cost":"$(cost)"}

$scoreboard players remove @s svm_ep.ability_points $(cost)
$scoreboard players add @s $(score) 1

function svm_ep:menu/unlock/upgrade_success