SHARE
TWEET

Untitled

a guest Jul 16th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PointData = game:GetService("DataStoreService"):GetDataStore("PointData")
  2. PrestigeData = game:GetService("DataStoreService"):GetDataStore("PrestigeData")
  3.  
  4. game.Players.PlayerAdded:Connect(function(plr)
  5.     local LB = Instance.new("IntValue")
  6.     LB.Name = "leaderstats"
  7.    
  8.     local p = Instance.new("IntValue")
  9.     p.Name = "Points"
  10.     p.Value = PointData:GetAsync(plr.userId) or 0
  11.    
  12.     local r = Instance.new("IntValue")
  13.     r.Name = "Prestige"
  14.     r.Value = PrestigeData:GetAsync(plr.userId) or 0
  15.  
  16.     LB.Parent = plr
  17.     p.Parent = LB
  18.     r.Parent = LB
  19. end)
  20.  
  21. game.Players.PlayerRemoving:Connect(function(plr)
  22.     PointData:SetAsync(plr.userId, plr.leaderstats.Points.Value)
  23.     PrestigeData:SetAsync(plr.userId, plr.leaderstats.Prestige.Value)
  24. end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top