How to make this sccript so that once they redeemed the code they cannot do it again?
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)