This is a script to go along with my GUI that makes you need to input the correct password to get into the game.
tries = 0
function onButton1Down()
local passwordvalue = script.Parent.Parent.Password.Value
if script.Parent.Parent.TextBox.Text == passwordvalue or script.Parent.Parent.TextBox.Text == passwordvalue:lower() or script.Parent.Parent.TextBox.Text == passwordvalue:upper() then
script.Parent.Parent.Right.Visible = true
script.Parent.Parent.Status.Visible = false
wait(1)
script.Parent.Parent.Parent.Visible = false
else script.Parent.Parent.Status.Text = "Wrong Passcode"
tries =tries +1
script.Parent.Parent.Status.Visible = true
wait(0.1)
script.Parent.Parent.Status.Visible = false
wait(0.1)
script.Parent.Parent.Status.Visible = true
wait(0.1)
script.Parent.Parent.Status.Visible = false
wait(0.1)
script.Parent.Parent.Status.Visible = true
if tries == 7 then
script.Parent.Parent.Status.Text = "Incorrect too many times!"
wait(1)
script.Parent.Parent.Status.Text = "You are locked out!"
wait(1)
script.Parent.Parent.Status.Text = "Incorrect to many times!"
wait(1)
script.Parent.Parent.Status.Text = "You are locked out!"
wait(1)
script.Parent.Parent.Status.Text = "Incorrect to many times!"
wait(1)
script.Parent.Parent.Status.Text = "You are locked out!"
wait(1)
script.Parent.Parent.Password:Destroy()
script.Parent.Parent.TextBox:Destroy()
script.Parent.Parent.GameLocked.Script:Destroy()
wait(0.1)
script.Parent.Parent.GameLocked.Text = "Locked Out! Bye Bye!"
function died()
wait(3)
script.Parent.Parent.Password:Destroy()
script.Parent.Parent.Submit:Destroy()
end
end
end
end
script.Parent.MouseButton1Down:connect(onButton1Down)
script.Parent.Parent.Parent.Parent.Parent.Parent.Died:connect(died) --This target would be a player in the "Players" folder.

7 comments
How would I implement it into this script?
Is it a local script?
No.
Woah o.0 why so many dislikes on my comment? I didnt request a script e.e
Is the script a button in a part, or a gui?
The script is in a Textbutton
Mk, Well copy the hole script and paste it into a local script instead then do what i showed