for g,R in pairs({})do local Z=false for g,R in pairs(R.Parts:GetChildren())do if R.Name=="\072\097\110\100\108\101"then local g=Instance.new("\067\108\105\099\107\068\101\116\101\099\116\111\114",R)g.MaxActivationDistance=8.5 g.MouseClick:connect(function()Z=not Z if Z then R.DoorOpen:Play()wait(.2)R.Parent.Parent.sHinge1.W.DesiredAngle=1.5 R.Parent.Parent.sHinge2.W.DesiredAngle=-3 R.Parent.Parent.sHinge3.W.DesiredAngle=-1.5 R.Parent.Parent.sHinge4.W.DesiredAngle=3 else R.Parent.Parent.sHinge1.W.DesiredAngle=0 R.Parent.Parent.sHinge2.W.DesiredAngle=0 R.Parent.Parent.sHinge3.W.DesiredAngle=0 R.Parent.Parent.sHinge4.W.DesiredAngle=0 R.DoorClose:Play()wait(1.1)R.Parent.Parent.oHinge1.W.DesiredAngle=0 R.Parent.Parent.oHinge2.W.DesiredAngle=0 end end)end end end
--Rears--

for _, v in pairs({}) do
	local open1 = false
	for _, a in pairs(v.Parts:GetChildren()) do
		if a.Name == "Handle" then
			local CL = Instance.new("ClickDetector", a)
			CL.MaxActivationDistance = 8.5
			CL.MouseClick:connect(function()
				open1 = not open1
				if open1 then
					a.DoorOpen:Play()
					wait(0.2)
					a.Parent.Parent.sHinge1.W.DesiredAngle = 1.5
					a.Parent.Parent.sHinge2.W.DesiredAngle = -3
					a.Parent.Parent.sHinge3.W.DesiredAngle = -1.5
					a.Parent.Parent.sHinge4.W.DesiredAngle = 3
				else
					a.Parent.Parent.sHinge1.W.DesiredAngle = 0
					a.Parent.Parent.sHinge2.W.DesiredAngle = 0
					a.Parent.Parent.sHinge3.W.DesiredAngle = 0
					a.Parent.Parent.sHinge4.W.DesiredAngle = 0
					a.DoorClose:Play()
					wait(1.1)
					a.Parent.Parent.oHinge1.W.DesiredAngle = 0
					a.Parent.Parent.oHinge2.W.DesiredAngle = 0
				end
			end)
		end
	end
end
