Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can you help me with finding a variable?

**I found this script for a money stat but I do not know the variable to increase or decrease the value of money, here is the script: **

print("Cash Leaderboard Loaded")


function onPlayerEntered(newPlayer)

	stats = Instance.new("IntValue")
	stats.Name = "leaderstats"

	cash = Instance.new("IntValue")
	cash.Name = "Money"       --name of currency (e.g. cash, money, resources, bucks, etc.)
	cash.Value = 1000      --starting money.

	cash.Parent = stats
	stats.Parent = newPlayer
end



game.Players.ChildAdded:connect(onPlayerEntered)

1 answer

✓ Accepted answer

If you want to increase it in the same script use

Cash.Value = Cash.value + 10

Or whatever number you choose

This discussion is preserved as it was. New answers, comments, and votes are closed.