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

Okay,I'm Making A Twitter Codes Type Thing & I Need Help,Anyone Help?

Asked by 8 years ago

How Would I Make So When A Player Enters The Code,They Will Reiceve A Certain Amount Of Money?

0
remember this is not a request site. lukeb50 631 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago

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)

Ad
Log in to vote
0
Answered by
Kyokamii 133
8 years ago

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"}

0
Thanks You Two! iiEffects 25 — 8y

Answer this question