local MoneyStore = game:GetService("DataStoreService"):GetDataStore("MoneyData") game.Players.PlayerAdded:Connect(function(plr) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = plr local money = Instance.new("IntValue") money.Name = "Coins" money.Value = MoneyStore:GetAsync(plr.UserId) or 0 money.Parent = leaderstats end) game.Players.PlayerRemoving:Connect(function(plr) MoneyStore:SetAsync(plr.UserId, plr.leaderstats.Coins.Value) end)