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

Check if its false or true?

Asked by 8 years ago
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 :(

0
Make the Value not true? User#6546 35 — 8y
0
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. sentry3 6 — 8y

Answer this question