Codes={1234;1337;9001}Input=""InputDisabled=false Code=true Panel=script.Parent if Code then Panel.Code.Material="\078\101\111\110"end function DoInput(Z)if InputDisabled or not Code then return end if string.len(Input)~=4 then Input=Input..Z end if string.len(Input)==4 then local Z=false for q,C in pairs(Codes)do if tostring(C)==Input then Z=true end end if Z then Panel.Code.Material="\083\109\111\111\116\104\080\108\097\115\116\105\099"Panel.Access.Material="\078\101\111\110"YourFunc()else Panel.Code.Material="\083\109\111\111\116\104\080\108\097\115\116\105\099"Panel.Denied.Material="\078\101\111\110"end wait(2)Input=""if Code then Panel.Code.Material="\078\101\111\110"end Panel.Access.Material="\083\109\111\111\116\104\080\108\097\115\116\105\099"Panel.Denied.Material="\083\109\111\111\116\104\080\108\097\115\116\105\099"end end function YourFunc()script.Parent.Parent.Open.Value=true end for Z,q in pairs(script.Parent:GetChildren())do if q.Name:sub(1,3)=="\066\084\078"then q.ClickDetector.mouseClick:connect(function()DoInput(tonumber(q.Name:sub(4)))end)end end for Z,q in pairs(script.Parent:GetChildren())do if q.Name:sub(1,2)=="\066\084"then q.ClickDetector.mouseClick:connect(function()Panel.Main.Beep:Play()end)end end
--Itochu Code Panel Script
Codes = { 1234, 1337, 9001 } --Your code(Support multiple codes)
Input = ""

InputDisabled = false
Code = true

Panel = script.Parent

if Code then
	Panel.Code.Material = "Neon"
end

function DoInput(Data)
	if InputDisabled or not Code then
		return
	end
	if string.len(Input) ~= 4 then
		Input = Input .. Data
	end
	if string.len(Input) == 4 then
		local Accepted = false
		for _, l in pairs(Codes) do
			if tostring(l) == Input then
				Accepted = true
			end
		end
		if Accepted then
			Panel.Code.Material = "SmoothPlastic"
			Panel.Access.Material = "Neon"
			YourFunc()
		else
			Panel.Code.Material = "SmoothPlastic"
			Panel.Denied.Material = "Neon"
		end
		wait(2)
		Input = ""
		if Code then
			Panel.Code.Material = "Neon"
		end
		Panel.Access.Material = "SmoothPlastic"
		Panel.Denied.Material = "SmoothPlastic"
	end
end

function YourFunc() --Script your function here
	script.Parent.Parent.Open.Value = true --For Teknikk Automatic Door
end

for _, l in pairs(script.Parent:GetChildren()) do
	if l.Name:sub(1, 3) == "BTN" then
		l.ClickDetector.mouseClick:connect(function()
			DoInput(tonumber(l.Name:sub(4)))
		end)
	end
end

for _, l in pairs(script.Parent:GetChildren()) do
	if l.Name:sub(1, 2) == "BT" then
		l.ClickDetector.mouseClick:connect(function()
			Panel.Main.Beep:Play()
		end)
	end
end
