``local dataStore = game:GetService("DataStoreService"):GetDataStore("MushroomsData")
starterMushrooms = 0 --This is the starter money
game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = plr
local money = Instance.new("IntValue")
money.Name = "Mushrooms"
money.Value = dataStore:GetAsync(plr.UserId) or starterMushrooms
money.Parent = leaderstats
end)
game.Players.PlayerRemoving:Connect(function(plr)
dataStore:SetAsync(plr.UserId, plr.leaderstats.Mushrooms.Value)
end)``

1 comment
I really need another currency which is "Cash" but aint getting it work pls anyone help