Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago

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?

Closed as Not Constructive by lukeb50, hiimgoodpack, and Andorks

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 6 years ago

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.

Ad