Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local dataModule = require(script.Parent:WaitForChild("DataModule",60))
- -- recommended you close this
- local userStats = {
- ["Stat1"] = {
- ["SName"] = "Bank",
- ["Type"] = "Int",
- ["StartValue"] = 2000
- },
- ["Stat2"] = {
- ["SName"] = "Wallet",
- ["Type"] = "Int",
- ["StartValue"] = 0
- },
- ["Stat3"] = {
- ["SName"] = "Jail",
- ["Type"] = "Int",
- ["StartValue"] = 0
- },
- ["Stat4"] = {
- ["SName"] = "Hunger",
- ["Type"] = "Int",
- ["StartValue"] = 100
- },
- ["Stat5"] = {
- ["SName"] = "Thirst",
- ["Type"] = "Int",
- ["StartValue"] = 100
- }
- }
- game.Players.PlayerAdded:Connect(function(plr)
- dataModule:init(userStats, plr)
- dataModule:load(userStats, plr)
- end)
- game.Players.PlayerRemoving:Connect(function(plr)
- dataModule:save(userStats, plr)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement