Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

(GUI)How to make a frame appear when i type the pass code and press enter ?

local code = script.Parent.Parent.Code
local z = script.Parent.Parent.zero
local o = script.Parent.Parent.one
local t = script.Parent.Parent.two
local th = script.Parent.Parent.three
local f = script.Parent.Parent.four
local fi = script.Parent.Parent.five
local s = script.Parent.Parent.six
local se = script.Parent.Parent.seven
local e = script.Parent.Parent.eight
local n = script.Parent.Parent.nine
local erase = script.Parent.Parent.Erase

function Click()
	if code.Text == "1337" then --Change "1337" to whatever number you want the code to be.
		code.Text = "Granted"
		script.Disabled = true
		z.Script.Disabled = true
		o.Script.Disabled = true
		t.Script.Disabled = true
		th.Script.Disabled = true
		f.Script.Disabled = true
		fi.Script.Disabled = true
		s.Script.Disabled = true
		se.Script.Disabled = true
		e.Script.Disabled = true
		n.Script.Disabled = true
		erase.Script.Disabled = true
	else
		code.Text = "Denied"
		z.Script.Disabled = true
		o.Script.Disabled = true
		t.Script.Disabled = true
		th.Script.Disabled = true
		f.Script.Disabled = true
		fi.Script.Disabled = true
		s.Script.Disabled = true
		se.Script.Disabled = true
		e.Script.Disabled = true
		n.Script.Disabled = true
		erase.Script.Disabled = true
		wait(3)
		code.Text = ""
		z.Script.Disabled = false
		o.Script.Disabled = false
		t.Script.Disabled = false
		th.Script.Disabled = false
		f.Script.Disabled = false
		fi.Script.Disabled = false
		s.Script.Disabled = false
		se.Script.Disabled = false
		e.Script.Disabled = false
		n.Script.Disabled = false
		erase.Script.Disabled = false
	end
end

script.Parent.MouseButton1Down:connect(Click)

1 answer

Your code was really bulky and hard to read, so here is a script that should work:

code = "1337"
textbox = script.Parent.TextBox
textbutton = script.Parent.TextButton
textbutton.MouseButton1Down:Connect(function()
if textbox.Text == code then
	print("Accepted")
	--put the rest of your code here
else
	print("Denied")
	--put the rest of your code here
end
end)

4 comments

0

but this wont open another frame

1

Yes it can. I told you to put the rest of your code in there. Maybe double check your code.

0

Plus, why are you making it so many scripts get disabled? What do the scripts contain anyway?

0

Just put your code in the accepted part. If failed then just fire a event

This discussion is preserved as it was. New answers, comments, and votes are closed.