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

Can anyone help me with a money take away script and a money gainer script?

i have a money script:

function onPlayerEntered(newPlayer)

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

	local cash = Instance.new("IntValue")
	cash.Name = "Cash"
	cash.Value = 35000

	cash.Parent = stats
	stats.Parent = newPlayer
end



game.Players.ChildAdded:connect(onPlayerEntered)

what should i put in there that would give me money every 5 minutes. and if i buy something it takes money out?

1 answer

Im not gonna give the code but it would need a while true do loop then a wait time and after that you would give the player the cash.

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