SHARE
TWEET

autosave

a guest Nov 16th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. spawn(function()--Autosave
  2.     while wait(240) do
  3.         saveAll()
  4.         print('autosave')
  5.     end
  6. end)
  7.  
  8. function saveAll()
  9.     for i,v in pairs(game.Players:GetPlayers()) do
  10.         local tycoon = getPlrTycoon(v)
  11.         if tycoon and tycoon.isLoaded.Value == true then
  12.             TycoonSave:SavePlayerTycoon(v,tycoon);
  13.             Events.Autosave:FireClient(v)
  14.         end
  15.     end
  16. 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