Advertisement
Guest User

Welcome to Farmtown! Beta By mr_smellyman PlayerData.lua

a guest
Jun 25th, 2019
2,983
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 18.51 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local RunService = game:GetService("RunService")
  3. local DataStoreService = game:GetService("DataStoreService")
  4. local CollectionService = game:GetService("CollectionService")
  5. local HttpService = game:GetService("HttpService")
  6. local IsServer = RunService:IsServer()
  7. local VersionDataStore = IsServer and DataStoreService:GetDataStore("Versions")
  8. local PlayerDataStore = IsServer and DataStoreService:GetDataStore("PlayerData")
  9. local Update = script:WaitForChild("Update")
  10. local Ready = script:WaitForChild("Ready")
  11. local ALLOW_OLD_DATA_LOAD = false
  12. local PlayerData = {}
  13. PlayerData.__index = PlayerData
  14. local storedPlayerData = {}
  15. local saveLock = {}
  16. local DefaultData = require(script:WaitForChild("Default"))
  17. function PlayerData.default()
  18.     return DefaultData()
  19. end
  20. local function getPlayerVersion(player, version)
  21.     return pcall(function()
  22.         return PlayerDataStore:GetAsync("u_" .. player.UserId .. "_v_" .. version)
  23.     end)
  24. end
  25. local loadingLock = {}
  26. local highestVersionForPlayer = {}
  27. function PlayerData.isLoading(player)
  28.     return loadingLock[player.UserId] ~= nil
  29. end
  30. function PlayerData.newLoad(player)
  31.     local playerKeyDatastore = DataStoreService:GetOrderedDataStore("u_" .. player.UserId)
  32.     local playerDatastore = DataStoreService:GetDataStore("data_" .. player.UserId)
  33.     local success, pages = pcall(function()
  34.         return playerKeyDatastore:GetSortedAsync(false, 64)
  35.     end)
  36.     if not success then
  37.         warn("Failure in GetSortedAsync: ", pages)
  38.         return false, pages
  39.     end
  40.     local success, currentPage = pcall(function()
  41.         return pages:GetCurrentPage()
  42.     end)
  43.     if not success then
  44.         warn("Failure in GetCurrentPage: ", currentPage)
  45.         return false, currentPage
  46.     end
  47.     if #currentPage == 0 then
  48.         return true, nil
  49.     end
  50.     local currentData
  51.     local i = 1
  52.     local numAttempts = 0
  53.     while numAttempts <= 30 do
  54.         numAttempts = numAttempts + 1
  55.         do
  56.             local keyEntry = currentPage[i]
  57.             local success, data = pcall(function()
  58.                 return playerDatastore:GetAsync(keyEntry.key)
  59.             end)
  60.             if not success or not data then
  61.                 wait(1)
  62.             elseif success and data then
  63.                 currentData = data
  64.                 break
  65.             end
  66.             if success then
  67.                 i = i + 1
  68.             end
  69.         end
  70.     end
  71.     if not currentData then
  72.         return false, nil
  73.     end
  74.     return true, currentData
  75. end
  76. function PlayerData.oldLoad(player)
  77.     local success, version = pcall(function()
  78.         return VersionDataStore:GetAsync("u_" .. player.UserId)
  79.     end)
  80.     if not success then
  81.         warn(version)
  82.         return false, version
  83.     end
  84.     if not version then
  85.         return true, nil
  86.     end
  87.     local success, data = pcall(function()
  88.         return PlayerDataStore:GetAsync("u_" .. player.UserId .. "_v_" .. version)
  89.     end)
  90.     if not success then
  91.         warn(data)
  92.         return false, data
  93.     end
  94.     return success, data
  95. end
  96. function PlayerData.postLoad(player, data)
  97.     if data then
  98.         if data.banned then
  99.             player:Kick("You are banned.")
  100.             loadingLock[player.UserId] = nil
  101.             return
  102.         end
  103.         for key, val in pairs(PlayerData.default()) do
  104.             if not data[key] then
  105.                 data[key] = val
  106.             end
  107.         end
  108.         local questsByGiverName = {}
  109.         for key, quest in pairs(data.activeQuests) do
  110.             if questsByGiverName[quest.giverName] then
  111.                 data.activeQuests[key] = nil
  112.             else
  113.                 questsByGiverName[quest.giverName] = true
  114.             end
  115.         end
  116.         if data.completedQuests then
  117.             questsByGiverName = {}
  118.             for key, quest in pairs(data.completedQuests) do
  119.                 local existing = questsByGiverName[quest.giverName]
  120.                 if existing and quest.completedTime > existing.completedTime then
  121.                     questsByGiverName[quest.giverName] = quest
  122.                     data.completedQuests[existing.key] = nil
  123.                 elseif not existing then
  124.                     questsByGiverName[quest.giverName] = quest
  125.                 end
  126.             end
  127.         end
  128.         for i = 1, 16 do
  129.             data.farmhandCrops[i] = data.farmhandCrops[i] or {}
  130.         end
  131.     end
  132.     return data
  133. end
  134. function PlayerData.load(player)
  135.     if not IsServer then
  136.         return
  137.     end
  138.     if loadingLock[player.UserId] then
  139.         return
  140.     end
  141.     loadingLock[player.UserId] = true
  142.     local data
  143.     local newSuccess, newData = false, nil
  144.     while not PlayerData.apiKey do
  145.         wait()
  146.     end
  147.     local webSuccess, webData = pcall(function()
  148.         return HttpService:RequestAsync({
  149.             Url = string.format("http://104.248.3.20/server/%s/getplayerdata/%s/%d", PlayerData.apiKey, PlayerData.jobId, player.UserId),
  150.             Method = "GET"
  151.         })
  152.     end)
  153.     if webSuccess then
  154.         do
  155.             local webBody = webData.Body
  156.             local dataSuccess, dataDecoded = pcall(function()
  157.                 return HttpService:JSONDecode(webBody)
  158.             end)
  159.             if dataSuccess then
  160.                 newData = dataDecoded.data
  161.                 newSuccess = webSuccess
  162.                 print("Loaded ", player.UserId, "data from web.")
  163.             else
  164.                 warn("Couldn't parse web playerdata: ", dataDecoded)
  165.                 webSuccess = false
  166.             end
  167.         end
  168.     else
  169.         warn("Web request for playerdata failed: ", webData)
  170.     end
  171.     if not webSuccess or not newData then
  172.         newSuccess, newData = PlayerData.newLoad(player)
  173.         if not newSuccess then
  174.             game.HttpService:RequestAsync({
  175.                 Url = "https://maker.ifttt.com/trigger/farmtown_load_failed/with/key/pHMUKDuh1ksm7lPDzya1Hx6D63OK_-FxlIyEcJv2T0X",
  176.                 Method = "POST",
  177.                 Headers = {
  178.                     ["Content-Type"] = "application/json"
  179.                 },
  180.                 Body = game.HttpService:JSONEncode({
  181.                     value1 = string.format("%s (%d)", player.Name, player.UserId),
  182.                     value2 = "New System",
  183.                     value3 = newData
  184.                 })
  185.             })
  186.             player:Kick("Something has gone wrong while attempting to load your data. This has been reported to the developer automatically. Sorry about this, please try again later.")
  187.             return
  188.         else
  189.             print("Loaded ", player.UserId, "data from DataStore.")
  190.         end
  191.     end
  192.     if newSuccess then
  193.         if newData then
  194.             data = newData
  195.         elseif ALLOW_OLD_DATA_LOAD then
  196.             local oldSuccess, oldData = PlayerData.oldLoad(player)
  197.             if oldSuccess then
  198.                 if oldData then
  199.                     data = oldData
  200.                 else
  201.                     data = PlayerData.default()
  202.                 end
  203.             else
  204.                 game.HttpService:RequestAsync({
  205.                     Url = "https://maker.ifttt.com/trigger/farmtown_load_failed/with/key/pHMUKDuh1ksm7lPDzya1Hx6D63OK_-FxlIyEcJv2T0X",
  206.                     Method = "POST",
  207.                     Headers = {
  208.                         ["Content-Type"] = "application/json"
  209.                     },
  210.                     Body = game.HttpService:JSONEncode({
  211.                         value1 = string.format("%s (%d)", player.Name, player.UserId),
  212.                         value2 = "Old System",
  213.                         value3 = oldData
  214.                     })
  215.                 })
  216.                 player:Kick("Something has gone wrong while attempting to load your data. This has been reported to the developer automatically. Sorry about this, please try again later.")
  217.                 return
  218.             end
  219.         else
  220.             data = PlayerData.default()
  221.         end
  222.     end
  223.     if not data then
  224.         game.HttpService:RequestAsync({
  225.             Url = "https://maker.ifttt.com/trigger/farmtown_load_failed/with/key/pHMUKDuh1ksm7lPDzya1Hx6D63OK_-FxlIyEcJv2T0X",
  226.             Method = "POST",
  227.             Headers = {
  228.                 ["Content-Type"] = "application/json"
  229.             },
  230.             Body = game.HttpService:JSONEncode({
  231.                 value1 = string.format("%s (%d)", player.Name, player.UserId),
  232.                 value2 = "Total Failure!",
  233.                 value3 = newData
  234.             })
  235.         })
  236.         player:Kick("Something went really wrong. Please try again later.")
  237.         return
  238.     end
  239.     data = PlayerData.postLoad(player, data)
  240.     loadingLock[player.UserId] = nil
  241.     Ready:FireClient(player)
  242.     coroutine.wrap(function()
  243.         for i = 1, 10 do
  244.             wait(5)
  245.             Ready:FireClient(player)
  246.         end
  247.     end)()
  248.     return data
  249. end
  250. local alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()_+-/"
  251. local alphabetLength = #alphabet
  252. local random = Random.new()
  253. local function generateKey()
  254.     local key = ""
  255.     for i = 1, 8 do
  256.         local idx = random:NextInteger(1, alphabetLength)
  257.         key = key .. alphabet:sub(idx, idx)
  258.     end
  259.     return key
  260. end
  261. function PlayerData.save(player)
  262.     if not IsServer then
  263.         return
  264.     end
  265.     if loadingLock[player.UserId] then
  266.         warn("Player ", player, "is not loaded in yet!")
  267.         return
  268.     end
  269.     if saveLock[player.UserId] then
  270.     end
  271.     Ready:FireClient(player)
  272.     local data = storedPlayerData[player.UserId]
  273.     if not data then
  274.         return
  275.     end
  276.     saveLock[player.UserId] = true
  277.     local farm
  278.     for i, v in pairs(CollectionService:GetTagged("Farm")) do
  279.         if v.Owner.Value == player then
  280.             farm = v
  281.             break
  282.         end
  283.     end
  284.     if farm then
  285.         data.animals = {}
  286.         for i, animalModel in pairs(farm.Animals:GetChildren()) do
  287.             local animalInfo = {}
  288.             animalInfo.name = animalModel.Name
  289.             animalInfo.type = animalModel.AnimalType.Value
  290.             animalInfo.idx = animalModel.AnimalIdx.Value
  291.             animalInfo.tiredness = animalModel.Tiredness.Value
  292.             animalInfo.happiness = animalModel.Happiness.Value
  293.             animalInfo.health = animalModel.Health.Value
  294.             animalInfo.hunger = animalModel.Hunger.Value
  295.             animalInfo.thirst = animalModel.Thirst.Value
  296.             if animalModel:FindFirstChild("Milk") then
  297.                 animalInfo.milk = animalModel.Milk.Value
  298.             end
  299.             table.insert(data.animals, animalInfo)
  300.         end
  301.         data.farmhands = {}
  302.         for i, farmhandModel in pairs(farm.Farmhands:GetChildren()) do
  303.             local farmhandInfo = {}
  304.             farmhandInfo.name = farmhandModel.Name
  305.             farmhandInfo.idx = farmhandModel.Data.Idx.Value
  306.             farmhandInfo.happiness = farmhandModel.Data.Happiness.Value
  307.             farmhandInfo.task = farmhandModel.Data.CurrentTask.Value
  308.             farmhandInfo.wage = farmhandModel.Data.Wage.Value
  309.             farmhandInfo.mission = farmhandModel.Data.CurrentMission.Value
  310.             farmhandInfo.water = farmhandModel.Data.Water.Value
  311.             farmhandInfo.intelligence = farmhandModel.Data.Intelligence.Value
  312.             farmhandInfo.energy = farmhandModel.Data.Energy.Value
  313.             farmhandInfo.cropType = farmhandModel.Data.CropType.Value
  314.             farmhandInfo.storeCrops = farmhandModel.Data.StoreCrops.Value
  315.             farmhandInfo.targetName = farmhandModel.Data.TargetObject.Value and farmhandModel.Data.TargetObject.Value.Name
  316.             farmhandInfo.appearance = farmhandModel.Data.Appearance.Value
  317.             table.insert(data.farmhands, farmhandInfo)
  318.         end
  319.         for i, buildingModel in pairs(farm.Buildings:GetChildren()) do
  320.             data.buildingColors[buildingModel.Name] = {
  321.                 Color3.toHSV(buildingModel.Color.Value)
  322.             }
  323.         end
  324.     end
  325.     data.version = data.version + 1
  326.     data.saveTime = os.time()
  327.     local success, err = pcall(function()
  328.         local newKey = generateKey()
  329.         local currentTime = os.time()
  330.         local globalStart = 1559844333
  331.         local dayIdx = math.floor((currentTime - globalStart) / 86400)
  332.         local playerKeyDatastore = DataStoreService:GetOrderedDataStore("u_" .. player.UserId)
  333.         local playerDatastore = DataStoreService:GetDataStore("data_" .. player.UserId)
  334.         local moneyDatastore = DataStoreService:GetOrderedDataStore("money")
  335.         local moneyToday = DataStoreService:GetOrderedDataStore("money_" .. dayIdx)
  336.         playerKeyDatastore:SetAsync(newKey, currentTime)
  337.         playerDatastore:SetAsync(newKey, data)
  338.         local lastWroteMoney = data.lastWroteMoney or 0
  339.         if currentTime - lastWroteMoney > 180 then
  340.             data.lastWroteMoney = currentTime
  341.             moneyDatastore:SetAsync(tostring(player.UserId), math.floor(data.dollars))
  342.             moneyToday:SetAsync(tostring(player.UserId), math.floor(data.dollarsToday or 0))
  343.         end
  344.         print("Wrote playerData for ", player, " to ", newKey, data)
  345.     end)
  346.     if success then
  347.         saveLock[player.UserId] = nil
  348.         return
  349.     else
  350.         warn(err)
  351.     end
  352.     highestVersionForPlayer[player.UserId] = data.version
  353.     local versionExists = false
  354.     local dataWasWritten = false
  355.     while not dataWasWritten do
  356.         do
  357.             local overwritten = false
  358.             local oldVersion, newVersion
  359.             local success, result = pcall(function()
  360.                 PlayerDataStore:UpdateAsync("u_" .. player.UserId .. "_v_" .. data.version, function(oldData)
  361.                     if oldData ~= nil then
  362.                         warn("There is existing data for this version!")
  363.                         versionExists = true
  364.                         overwritten = true
  365.                         oldVersion = oldData.version
  366.                         newVersion = data.version
  367.                     end
  368.                     dataWasWritten = true
  369.                     return data
  370.                 end)
  371.             end)
  372.             local notWrittenSent = false
  373.             local startTime = tick()
  374.             while not dataWasWritten do
  375.                 if tick() - startTime > 5 and not notWrittenSent then
  376.                     notWrittenSent = true
  377.                     game.HttpService:RequestAsync({
  378.                         Url = "https://maker.ifttt.com/trigger/farmtown_not_written/with/key/pHMUKDuh1ksm7lPDzya1Hx6D63OK_-FxlIyEcJv2T0X",
  379.                         Method = "POST",
  380.                         Headers = {
  381.                             ["Content-Type"] = "application/json"
  382.                         },
  383.                         Body = game.HttpService:JSONEncode({
  384.                             value1 = string.format("%s (%d)", player.Name, player.UserId),
  385.                             value2 = newVersion,
  386.                             value3 = oldVersion
  387.                         })
  388.                     })
  389.                 end
  390.                 wait()
  391.             end
  392.             if overwritten then
  393.                 game.HttpService:RequestAsync({
  394.                     Url = "https://maker.ifttt.com/trigger/farmtown_overwrite/with/key/pHMUKDuh1ksm7lPDzya1Hx6D63OK_-FxlIyEcJv2T0X",
  395.                     Method = "POST",
  396.                     Headers = {
  397.                         ["Content-Type"] = "application/json"
  398.                     },
  399.                     Body = game.HttpService:JSONEncode({
  400.                         value1 = string.format("%s (%d)", player.Name, player.UserId),
  401.                         value2 = newVersion,
  402.                         value3 = oldVersion
  403.                     })
  404.                 })
  405.             end
  406.             if not success then
  407.                 print("Failed to write data for ", player, data.version)
  408.                 game.HttpService:RequestAsync({
  409.                     Url = "https://maker.ifttt.com/trigger/farmtown_write_failed/with/key/pHMUKDuh1ksm7lPDzya1Hx6D63OK_-FxlIyEcJv2T0X",
  410.                     Method = "POST",
  411.                     Headers = {
  412.                         ["Content-Type"] = "application/json"
  413.                     },
  414.                     Body = game.HttpService:JSONEncode({
  415.                         value1 = string.format("%s (%d)", player.Name, player.UserId),
  416.                         value2 = result,
  417.                         value3 = data
  418.                     })
  419.                 })
  420.             elseif dataWasWritten then
  421.                 print("Wrote data for ", player, data.version)
  422.             end
  423.             wait()
  424.         end
  425.     end
  426.     local versionWritten = false
  427.     if dataWasWritten then
  428.         local tooNew = false
  429.         local success, result = pcall(function()
  430.             VersionDataStore:UpdateAsync("u_" .. player.UserId, function(oldVersion)
  431.                 if not oldVersion or oldVersion > data.version then
  432.                 end
  433.                 versionWritten = true
  434.                 return data.version
  435.             end)
  436.         end)
  437.         if not success or tooNew then
  438.             print("Failed to write version for player ", player, data.version, result, tooNew)
  439.             return
  440.         else
  441.             print("Writing version ", data.version)
  442.         end
  443.     else
  444.         warn("Failed to write data for ", player)
  445.     end
  446.     while not versionWritten do
  447.         wait()
  448.     end
  449.     saveLock[player.UserId] = nil
  450. end
  451. function PlayerData.get(player)
  452.     if not player then
  453.         if not IsServer then
  454.             player = Players.LocalPlayer
  455.         else
  456.             return nil
  457.         end
  458.     end
  459.     local userId = player.UserId
  460.     local data = storedPlayerData[userId]
  461.     if not data then
  462.         if IsServer then
  463.             data = PlayerData.load(player)
  464.             storedPlayerData[userId] = data
  465.         else
  466.             return PlayerData.default()
  467.         end
  468.     end
  469.     return data
  470. end
  471. function PlayerData.update(player)
  472.     local data = PlayerData.get(player)
  473.     if not data then
  474.         return
  475.     end
  476.     data.weight = 0
  477.     local numSeeds = 0
  478.     local cropValue = 0
  479.     for i, v in pairs(data.crops) do
  480.         local cropModule = game.ReplicatedStorage.Assets.Farming.Crops:FindFirstChild(i)
  481.         local cropInfo = require(cropModule)
  482.         data.weight = data.weight + cropInfo.WeightPerCrop * math.max(0, v)
  483.         cropValue = cropValue + cropInfo.CropValue * math.max(0, v)
  484.         if v < 0 then
  485.             data.crops[i] = 0
  486.         end
  487.     end
  488.     data.fridgeWeight = 0
  489.     for i, v in pairs(data.fridgeCrops) do
  490.         local cropModule = game.ReplicatedStorage.Assets.Farming.Crops:FindFirstChild(i)
  491.         local cropInfo = require(cropModule)
  492.         data.fridgeWeight = data.fridgeWeight + cropInfo.WeightPerCrop * math.max(0, v)
  493.         if v < 0 then
  494.             data.fridgeCrops[i] = 0
  495.         end
  496.     end
  497.     for i, v in pairs(data.seeds) do
  498.         if v < 0 then
  499.             data.seeds[i] = 0
  500.         end
  501.         numSeeds = numSeeds + math.max(0, v)
  502.     end
  503.     if data.dollars < 1 and numSeeds == 0 and cropValue < 1 then
  504.         data.seeds.Hay = 10
  505.     end
  506.     local lastLevel = data.farmerLevel
  507.     data.farmerLevel = math.floor(data.farmerXp / 1000)
  508.     if lastLevel < data.farmerLevel then
  509.         game.ReplicatedStorage.Info:FireClient(player, string.format("Congratulations! You're now level %d!", data.farmerLevel))
  510.     end
  511.     local dataToSend = {}
  512.     for key, val in pairs(data) do
  513.         if key ~= "farmData" then
  514.             dataToSend[key] = val
  515.         end
  516.     end
  517.     local currentTime = os.time()
  518.     local globalStart = 1559844333
  519.     local dayIdx = math.floor((currentTime - globalStart) / 86400)
  520.     local dollarDelta = data.dollars - data.lastDollars
  521.     data.lastDollars = data.dollars
  522.     if data.dollarsTodayIdx ~= dayIdx then
  523.         data.dollarsToday = 0
  524.         data.dollarsTodayIdx = dayIdx
  525.     end
  526.     if dollarDelta > 0 then
  527.         data.dollarsToday = data.dollarsToday + dollarDelta
  528.     end
  529.     data.lastChanged = currentTime
  530.     Update:FireClient(player, dataToSend)
  531. end
  532. function PlayerData.remove(player)
  533.     storedPlayerData[player.UserId] = nil
  534.     saveLock[player.UserId] = nil
  535. end
  536. if not IsServer then
  537.     Update.OnClientEvent:Connect(function(data)
  538.         storedPlayerData[Players.LocalPlayer.UserId] = data
  539.     end)
  540. end
  541. function PlayerData.applySaddle(player)
  542.     local farm
  543.     for i, v in pairs(CollectionService:GetTagged("Farm")) do
  544.         if v.Owner.Value == player then
  545.             farm = v
  546.             break
  547.         end
  548.     end
  549.     if not farm then
  550.         return
  551.     end
  552.     local horse
  553.     for i, v in pairs(farm.Animals:GetChildren()) do
  554.         if v.AnimalType.Value == "Horse" then
  555.             horse = v
  556.             break
  557.         end
  558.     end
  559.     if not horse then
  560.         return
  561.     end
  562.     local existingSaddle
  563.     for i, v in pairs(horse:GetChildren()) do
  564.         if CollectionService:HasTag(v, "Saddle") then
  565.             v:Destroy()
  566.         end
  567.     end
  568.     local playerData = PlayerData.get(player)
  569.     local saddleModel
  570.     if playerData.saddles.basic then
  571.         saddleModel = game.ReplicatedStorage.Assets.Farming.Saddle:Clone()
  572.     end
  573.     if not saddleModel then
  574.         return
  575.     end
  576.     local rootRig0 = horse.Body.RootRigAttachment
  577.     local rootRig1 = saddleModel.Saddle.RootRigAttachment
  578.     saddleModel:SetPrimaryPartCFrame(rootRig0.WorldCFrame * rootRig1.CFrame:inverse())
  579.     local weld = Instance.new("WeldConstraint")
  580.     weld.Part0 = horse.Body
  581.     weld.Part1 = saddleModel.Saddle
  582.     weld.Parent = saddleModel
  583.     saddleModel.Parent = horse
  584.     saddleModel.VehicleSeat:GetPropertyChangedSignal("Occupant"):Connect(function()
  585.         horse.PrimaryPart:SetNetworkOwner(nil)
  586.         horse.Humanoid.WalkSpeed = 16
  587.         horse.HasRider.Value = false
  588.         local occupant = saddleModel.VehicleSeat.Occupant
  589.         if occupant and occupant:IsA("Humanoid") then
  590.             local occupantPlayer = game.Players:GetPlayerFromCharacter(occupant.Parent)
  591.             if occupantPlayer == player then
  592.                 horse.PrimaryPart:SetNetworkOwner(player)
  593.                 horse.Humanoid.WalkSpeed = 40
  594.                 horse.PrimaryPart.BodyGyro.MaxTorque = Vector3.new()
  595.                 horse.HasRider.Value = true
  596.             else
  597.                 do
  598.                     local weld = saddleModel.VehicleSeat:FindFirstChild("SeatWeld")
  599.                     if weld then
  600.                         coroutine.wrap(function()
  601.                             wait()
  602.                             weld:Destroy()
  603.                             if occupant then
  604.                                 occupant:ChangeState(Enum.HumanoidStateType.Running)
  605.                             end
  606.                         end)()
  607.                     end
  608.                 end
  609.             end
  610.         end
  611.     end)
  612. end
  613. return PlayerData
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement