local L=true local c=script.Door:Clone()script.Parent.Touched:connect(function(X)c.Value=script.Parent.Parent.Door if not L then return end if X.Parent:findFirstChild("\072\117\109\097\110\111\105\100")then L=false local n=game.Players:playerFromCharacter(X.Parent)if not n.PlayerGui:findFirstChild("\075\101\121\112\097\100")then local L=Instance.new("\071\117\105\077\097\105\110")L.Name="\075\101\121\112\097\100"local X=script.LocalScript:Clone();(script.Parent.Parent.CODE:Clone()).Parent=X;(c:Clone()).Parent=X L.Parent=n.PlayerGui;(script.Parent.Frame:Clone()).Parent=L repeat wait()until n.Character;(X:Clone()).Parent=n.Character end wait(5)L=true end end)


local debounce = true
local door = script.Door:Clone()
script.Parent.Touched:connect(function(hit)
door.Value = script.Parent.Parent.Door
if not debounce then return end
if hit.Parent:findFirstChild("Humanoid") then
debounce = false
local player = game.Players:playerFromCharacter(hit.Parent)
if not player.PlayerGui:findFirstChild("Keypad") then
local main = Instance.new("GuiMain")
main.Name = "Keypad"
local runscript = script.LocalScript:Clone()
script.Parent.Parent.CODE:Clone().Parent = runscript
door:Clone().Parent = runscript
main.Parent = player.PlayerGui
script.Parent.Frame:Clone().Parent = main
repeat wait() until player.Character
runscript:Clone().Parent = player.Character
end
wait(5)
debounce = true
end
end
)