So, I've got this script made which gives you 10 Money on the leaderboard every 3 seconds.
print("Money Leaderboard")
function onPlayerEntered(newPlayer)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local mins = Instance.new("IntValue")
mins.Name = "Money" --You can put Cash, Gold, Etc.
mins.Value = 0 --How much you will start on.
mins.Parent = stats
stats.Parent = newPlayer
while true do
wait(2) --Wait time for income.
mins.Value = mins.Value + 10 --This is how much is given.
end
end
game.Players.ChildAdded:connect(onPlayerEntered)
How would I make the value depend on your current team?

3 comments
The script doesn't work. Workspace.Income:20: 'then' expected near 'mins'
Sorry; fixed that.
The script still doesn't work if I try switching teams.