SHARE
TWEET

data okee

TruongDu Jan 18th, 2020 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local DataStore = game:GetService("DataStoreService"):GetDataStore("OnePieceBeliTest_1")
  2.  
  3. game.Players.PlayerAdded:Connect(function(player)
  4.     local beli = Instance.new("IntValue", player)
  5.     beli.Name = "Beli"
  6.    
  7.     local getData
  8.     local success, errormsg pcall(function()
  9.             getData = DataStore:GetAsync(player.UserId)
  10.     end)
  11.     if success then
  12.         beli.Value = getData
  13.     end
  14.    
  15. end)
  16.  
  17. game.Players.PlayerRemoving:Connect(function(player)
  18.     DataStore:GetAsync(player.UsetId, player:WaitForChild("Beli").Value)
  19. 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