local DSS = game:GetService("DataStoreService") local Points = DSS:GetDataStore("Points")
game.Players.PlayerAdded:Connect(function(plr) local pPoints = Points:GetAsync(plr.UserId) or 10 local leaderstats = Instance.new("Folder",plr) leaderstats.Name = "leaderstats" local PointsValue = Instance.new("NumberValue") PointsValue.Name = "Points" PointsValue.Value = pPoints PointsValue.Parent = leaderstats while wait(300) do PointsValue.Value = PointsValue.Value +5 end PointsValue.Changed:connect(function(v) Points:SetAsync(plr.UserId,v) print("Points Saved!") end) end)
(I got help from a youtube video)
Also, how can I make this add points after a successful purchase?
local ID = 00000000 local MarketplaceService = game:GetService("MarketplaceService")
script.Parent.MouseButton1Click:Connect(function() MarketplaceService:PromptGamePassPurchase(game.Players.LocalPlayer,ID) end)
(Help from somewhere else)
Sorry if I'm asking too much!! All the Discord servers I'm in won't help, and I can't seem to figure it out.

2 comments
Please format your code, and tell us which parts aren't working/erroring.
Did my answer work? If yes, do accept it.