permission={"\070\101\098\114\117\097\114\057\050";"\076\117\109\112\105\122\101\114\115\116\111\101\114\101\114"}function checkOkToLetIn(j)for Z=1,#permission,1 do if string.upper(j)==string.upper(permission[Z])then return true end end return false end local j=script.Parent function onTouched(Z)print("\068\111\111\114 \072\105\116")local h=Z.Parent:findFirstChild("\072\117\109\097\110\111\105\100")if h~=nil then print("\072\117\109\097\110 \116\111\117\099\104\101\100 \100\111\111\114")if checkOkToLetIn(h.Parent.Name)then print("\072\117\109\097\110 \112\097\115\115\101\100 \116\101\115\116")j.Transparency=.5 j.CanCollide=false wait(1.5)j.CanCollide=true j.Transparency=0 else h.Health=0 end end end script.Parent.Touched:connect(onTouched)
-- list of account names allowed to go through the door.
permission = { "Februar92", "Lumpizerstoerer" } --Put your friends name's here. You can add more.

function checkOkToLetIn(name)
	for i = 1, #permission do
		-- convert strings to all upper case, otherwise we will let in,
		-- "Telamon," but not, "tELAMON," or, "telamon."
		-- Why? Because, "Telamon," is how it is spelled in the permissions.
		if string.upper(name) == string.upper(permission[i]) then
			return true
		end
	end
	return false
end

local Door = script.Parent

function onTouched(hit)
	print("Door Hit")
	local human = hit.Parent:findFirstChild("Humanoid")
	if human ~= nil then
		-- a human has touched this door!
		print("Human touched door")
		-- test the human's name against the permission list
		if checkOkToLetIn(human.Parent.Name) then
			print("Human passed test")
			Door.Transparency = 0.5
			Door.CanCollide = false
			wait(1.5) -- this is how long the door is open
			Door.CanCollide = true
			Door.Transparency = 0
		else
			human.Health = 0 -- delete this line of you want a non-killing VIP door
		end
	end
end

script.Parent.Touched:connect(onTouched)
