SHARE
TWEET

Untitled

a guest Apr 20th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. local datastore = game:GetService("DataStoreService")
  3. local ds1 = datastore:GetDataStore("RankSaveSystem")
  4.  
  5. game.Players.PlayerAdded:connect(function(plr)
  6.  local folder = Instance.new("Folder", plr)
  7.  folder.Name = "leaderstats"
  8.  local rank = Instance.new("StringValue", folder)
  9.  rank.Name = "Rank"
  10.  
  11.  rank.Value = ds1:GetAsync(plr.UserId) or 0
  12.  ds1:SetAsync(plr.UserId, rank.Value)
  13.  
  14.  
  15.  rank.Changed:connect(function()
  16.   ds1:SetAsync(plr.UserId, rank.Value)
  17.  
  18.  
  19.  end)
  20.  
  21.  
  22.  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