xp = script.Parent.Parent.Parent.Parent.Parent.leaderstats.XP
lvl = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Lvl

while true do
if lvl.Value < game.Workspace.RPGScript.LevelCap.Value then
script.Parent.Text = "XP: " .. xp.Value .. " / " .. lvl.Value * 100 .. " (" ..math.floor((xp.Value/(lvl.Value*100))*100).. "%)"
else
script.Parent.Text = "XP: " .. xp.Value .. " / MAX (100%)"
end
wait(0.1)
end

and

wait(1)
script.Parent.Parent.Character.Humanoid.Health = script.Parent.Parent.Character.Humanoid.MaxHealth
script:Remove()