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

What is the script for a money system?

Asked by 8 years ago

I am making a RP game, and I need to know how to create a moiney system. (The money preferably being gold) Thanks!

1 answer

Log in to vote
0
Answered by
deris88 146
8 years ago
Edited 8 years ago

Hi there! Leader board is main place where you can display any kind of your game currency!

Lets start:

--first lets create a leaderstats for each player joined the game.
game.Players.PlayerAdded:connect(function(newPlayer)
     local stats = Instance.new('BoolValue')
     stats.Name = 'leaderstats'
     stats.Parent = newPlayer

--Now lets create a gold value for it
    local gold = Instance.new('IntValue')
    gold.Value = 0 --or any other number will give the player that amount of gold when you start the game
    gold.Name = 'Gold'
    gold.Parent = stats
--now you should have Gold in your leader board when you start the game

end)

Hope this helps!

0
Thank you so much! I don't know if I can ever repay you! DarkAssasin0 0 — 8y
0
Lol :D you mustn't. You could just get free model. This script is basic stuff in ROBLOX Lua. deris88 146 — 8y
0
I have one question though. I tried this script and the Gold isn't appearing on the leaderboard. I am not judging your answer. It still helped a lot. But what kind of script do i use and where do I put it? DarkAssasin0 0 — 8y
0
Whops. Its actually gold.Name not gold.name :D deris88 146 — 8y
Ad

Answer this question