--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
)