Answered by
5 years ago Edited 5 years ago
Hope I helped :] you made typos
01 | PointData = game:GetService( "DataStoreService" ):GetDataStore( "PointData" ) |
02 | RebirthData = game:GetService( "DataStoreService" ):GetDataStore( "RebirthData" ) |
03 | plr = game.Players.LocalPlayer |
05 | game.Players.PlayerAdded:Connect( function (plr) |
06 | local LB Instance.new ( "IntValue" ) |
10 | local p = Instance.new ( "IntValue" ) |
13 | p.Value = PointData:GetAsync(plr.userId) or 0 |
15 | local r = Instance.new ( "IntValue" ) |
18 | r.Value = RebirthData:GetAsync(plr.userId) or 0 |
25 | game.Players.PlayerRemoved:Connect( function (plr) |
26 | PointData:SetAsync(plr.userId, plr.leaderstats.Points.Value) |
27 | RebirthData:SetAsync(plr.userId, plr.leaderstats.Rebirths.Value) |