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.
To access .Died you have to do Player.Character.Humanoid.Died:connect