So, I am a noob at scripting and I have no idea how to script a data save script. But, I need one for my game.
local dataStore = game:GetService("DataStoreService"):GetDataStore("MoneyData") starterMoney = 0 game.Players.PlayerAdded:Connect(function(plr) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = plr local money = Instance.new("IntValue") money.Name = "Money" --Put your currency money.Value = dataStore:GetAsync(plr.UserId) or starterMoney money.Parent = leaderstats end) game.Players.PlayerRemoving:Connect(function(plr) dataStore:SetAsync(plr.UserId, plr.leaderstats.Money.Value) end)