local cashmoney = game.ServerStorage.PlayerMoney:FindFirstChild(game.Players.LocalPlayer.Name)
script.Parent.MouseButton1Click:connect(function()
if script.Parent.Parent.Input.Text == 'PROMOCODE' then
cashmoney.Value = cashmoney.Value + 10000
script.Parent.Parent.Input.Text = 'Code Redeemed!'
wait(2)
script.Parent.Parent.Input.Text = 'Enter Code Here'
else
script.Parent.Parent.Input.Text = 'Code Invalid'
wait(2)
script.Parent.Parent.Input.Text = 'Enter Code Here'
end
end)
COMMUNITY QUESTION
How to make this sccript so that once they redeemed the code they cannot do it again?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

6 comments
I would suggest using a datastore, to make sure it's already entered
how would i do that?
I would look on how to do that on youtube or the wiki
I triedall they use is leaderstats
Try inserting a value into each player that joins such as Code1 and just set it's value to 1 if it's been used and save that to the datastore.
tysm