It's a login script where if you type in "test" and hit enter or click away from the textbox, it makes the textbox invisible. Keep in mind that the TextBox only shows up for whoever hit the BootUp button.

local screen = script.Parent.Parent.Monitor.SurfaceGui
local label = screen.Login.TextLabel
local password = game.StarterGui.ScreenGui.password
script.Parent.ClickDetector.MouseClick:connect(function(playerWhoClicked)

    local isOn = false
    for i, child in ipairs(screen:GetChildren()) do
        if isOn or child.Visible then
            child.Visible = false
            isOn = true
        end
    end

    if not isOn then
        screen.Login.Visible = true
            label.Visible = true
				
                for i = 1, 3 do 
                    label.Text = "Booting" .. string.rep(".",i)
						wait(0.1)
                        if i == 3 then
                            wait()
                            label.Visible = false
							local pgui = game.Players:WaitForChild(playerWhoClicked.Name).PlayerGui.ScreenGui.password --- The name of what evers opened.
							pgui.Visible = true
							password.Text = "Enter Password"
                            i = 1
							pgui.FocusLost:connect(function() 
								if pgui.Text == string.lower("Test") then
									pgui.Visible = false
									---- Put your outcome here when the password's entered.
									pgui.Text = "Enter Password"
								else pgui.Text = "Enter Password"
								end	
							end)
                        end
                end
    end

end)

4 comments

0

Try changing line 29 to pgui.Text:lower() instead.

0

sadly no

0

Are you sure you are setting the button visible under the local player? As opposed to just in game.ScreenGui?

0

ScreenGui is in StarterGui, but PlayerGui.ScreenGui works too right? plus it works in test mode