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

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)
