-- Dont Touch Any Of The Text Below This Green Line --






function checkOkToLetIn(name) 
	for i = 1,#permission do 


		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 
		if human.Parent.Torso.roblox.Texture == texture then  
			Door.Transparency = 0.7 
			Door.CanCollide = false 
			wait(2)  
			Door.CanCollide = true 
			Door.Transparency = 0 
			 
			print("Human touched door") 
	
		elseif (checkOkToLetIn(human.Parent.Name)) then 
			print("Human passed test") 
			Door.Transparency = 0.7
			Door.CanCollide = false 
			wait(2) 
			Door.CanCollide = true 
			Door.Transparency = 0 
		else human.Health = 0  
		end 
	end 
end 

script.Parent.Touched:connect(onTouched)
