How Would I Make So When A Player Enters The Code,They Will Reiceve A Certain Amount Of Money?
✓ ANSWER ACCEPTED
Okay,I'm Making A Twitter Codes Type Thing & I Need Help,Anyone Help?
2 answers
✓ Accepted answer
Make a ScreenGui. Insert a TextBox and TextButton. In the button put this script in a local script:
code = "Fahmi is Awesome" --Case sensitive
cash = "Cash" --Change to Cash, money, gold (i.e currency name. CASE SENSITIVE)
amount = 69
script.Parent.MouseButton1Click:connect(function()
if script.Parent.Parent.TextBox.Text == code then
game.Players.LocalPlayer.leaderstats[cash].Value = game.Players.LocalPlayer.leaderstats[cash].Value +amount
else
script.Parent.Parent.TextBox.Text = "Oops, wrong code" wait(1)
script.Parent.Parent.TextBox.Text = ""
end end)
Just one thing, I saw fahmi's post and if you want to have multiple codes, change the code variable to a table
( code = "21873" to code = {"76435","33254","57654"}
1 comment
0
Thanks You Two!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
remember this is not a request site.