``local dataStore = game:GetService("DataStoreService"):GetDataStore("MushroomsData")
starterMushrooms = 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 = "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)
I also want another currency which is "Cash" But i aint getting it to work..