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

How can i make a money system that add $0.50 to a textlabel each time i get a kill?

I kept trying and tryping to make a script that, whenever you kill someone you get 0.50 cents or $0.50 from killing them and it will keep adding up.

I put it as a startergui with screengui and inside of it is a imagelabel, then a textlabel telling you how many coins you have so is there anyone willing to help me figure this out all i really want it to do is just add $0.50 to the textlabel each time you get a kill i tired adding a killing script from youtube but it adds the money into a leaderboard and not text label.

3 comments

1

I would like to stress that this is not a good way to go about doing this, not only because it is inefficient and hacky but because it is exploitable. If the only thing that matters is a textlabel, then the client could simply exploit the text. Please rethink your design.

1

Instead, the textlabel should only reflect the data which is securely stored on the server with no direct client interaction.

0

He's right. This is exploitable and is not recommended unless you want it badly enough.

1 answer

Just add this in a localscript inside of your textlabel and it should work. Let me know if you have any problems. Its 2am and I dont feel like testing it but will check it in the morning. BTW you also need to set your leaderstats up so it can add .50 to the leaderstats. To do that just find a leaderstat script and make sure to name the leaderstat Money

player = game.Players.LocalPlayer
Money = player.leaderstats.Money

Money.changed:connect(function()
script.Parent.Text = Money 
end)

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