local Lvl=p.leaderstats.Lvl--P is a player
local Get=Game:GetService("DataStoreService"):GetDataStore("Points"):GetASync(p.Name.."Lvl")
if Get then
Lvl.Value=Get
elseif not Get then
Game:GetService("DataStoreService"):GetDataStore("Points"):SetASync(p.Name.."Lvl", 1)
Lvl.Value=1
end
Thank you for your time. I'm afraid if I test it I might mess something up, seeing as it saves...
EDIT: Here's the full script. I'd be very grateful if you could read it and let me know if you see any obvious errors.
while not script.Parent.Parent.Parent.Parent.leaderstats.Lvl do wait() end
local p=script.Parent.Parent.Parent.Parent
local Lvl=p.leaderstats.Lvl
local Exp=Instance.new("IntValue")
Exp.Parent=script.Parent
Exp.Value=0
local Get=Game:GetService("DataStoreService"):GetDataStore("Points"):GetAsync(p.Name.."Lvl")
if Get then
Lvl.Value=Get
elseif not Get then
Game:GetService("DataStoreService"):GetDataStore("Points"):SetAsync(p.Name.."Lvl", 1)
Lvl.Value=1
end
local Goals={50, 100, 250, 500, 750, 1000, 2500, 5000, 10000}
function Raise()
for i, v in ipairs(Goals) do
if Exp.Value==v then
Game:GetService("DataStoreService"):GetDataStore("Points"):IncrementAsync(p.Name.."Lvl")
Lvl.Value=i
script.Parent.Bar.Size=Udim2.new(0, 0, 0, 20)
Exp.Value=0
end
end
if Exp.Value~=0 then
script.Parent.Bar.Size=Udim2.new(0, 140/Exp.Value, 0, 20)
end
end
while true do
wait(3)
Exp.Value=Exp.Value+1
Raise()
end

2 comments
Try creating a separate test place to test things, like DataStore. That, and I don't believe "ASync" would be valid for setting or getting as the method only has the "A" captialized, and methods (as with most things in lua, or most programming/scripting languages) are case sensitive.
Thanks :) I just checked and it should be SetAsync, GetAsync instead