#$xp add @p[scores={playerID=$(pid)}] $(XpPoint) points

execute store result score #xpPercentage sgrave run data get storage sgrave:settings xpPercentage
$scoreboard players set #XpPoint sgrave $(XpPoint)
scoreboard players operation #XpPoint sgrave *= #xpPercentage sgrave
scoreboard players operation #XpPoint sgrave /= #constant.100 sgrave

execute store result storage sgrave:temp XpPoint int 1 run scoreboard players get #XpPoint sgrave

function snapgrave:response/retrieve/xp/run with storage sgrave:temp