Advertisement
epicgamermoment

server

Mar 22nd, 2021
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. local dataModule = require(script.Parent:WaitForChild("DataModule",60))
  2.  
  3. -- recommended you close this
  4. local userStats = {
  5. ["Stat1"] = {
  6. ["SName"] = "Bank",
  7. ["Type"] = "Int",
  8. ["StartValue"] = 2000
  9. },
  10. ["Stat2"] = {
  11. ["SName"] = "Wallet",
  12. ["Type"] = "Int",
  13. ["StartValue"] = 0
  14. },
  15. ["Stat3"] = {
  16. ["SName"] = "Jail",
  17. ["Type"] = "Int",
  18. ["StartValue"] = 0
  19. },
  20. ["Stat4"] = {
  21. ["SName"] = "Hunger",
  22. ["Type"] = "Int",
  23. ["StartValue"] = 100
  24. },
  25. ["Stat5"] = {
  26. ["SName"] = "Thirst",
  27. ["Type"] = "Int",
  28. ["StartValue"] = 100
  29. }
  30. }
  31.  
  32. game.Players.PlayerAdded:Connect(function(plr)
  33. dataModule:init(userStats, plr)
  34. dataModule:load(userStats, plr)
  35. end)
  36.  
  37. game.Players.PlayerRemoving:Connect(function(plr)
  38. dataModule:save(userStats, plr)
  39. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement