script.Parent.MouseButton1Click:connect(function()
if script.Parent.Storage.Redeemedb.Value == true then
script.Parent.Parent.Input.Text = "Already Redeemed!"
wait(2)
script.Parent.Parent.Input.Text = "Enter Code Here"
else
if script.Parent.Storage.Redeemedb.Value == false and script.Parent.Parent.Input.Text == "tankman" then
game.Players.LocalPlayer.Character.Humanoid.MaxHealth = 200
script.Parent.Storage.Redeemedb.Value = true
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
end)
How would i make it to check ifits true or false then if its false check the code and if its entered wrong do code invalid and if its entered right it changes the bool to true so they cant redeem it again. right now all its doing is ill enter the wrong code on purpose then it says already redeemed how would I fix this script :(

2 comments
Make the Value not true?
like how to make it do when its redeemed its true so it say already redeemed that specific code then if they enter the wrong code then it sais code invalid.