local U=script.Parent.Pivot local N=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local u=false local M=Instance.new("\067\108\105\099\107\068\101\116\101\099\116\111\114",script.Parent.Door)M.MaxActivationDistance=4 local G=false M.MouseClick:Connect(function()if not u then u=true local M if not G then M=N:Create(U,TweenInfo.new(.6,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame=U.CFrame*CFrame.Angles(math.rad(140),0,0)})else M=N:Create(U,TweenInfo.new(.6,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame=U.CFrame*CFrame.Angles(-math.rad(140),0,0)})end M.Completed:Connect(function()G=not G u=false end)M:Play()end end)


local pivot = script.Parent.Pivot
local TS = game:GetService("TweenService")

local deb = false
local CD = Instance.new("ClickDetector",script.Parent.Door)
CD.MaxActivationDistance = 4

local toggle = false
CD.MouseClick:Connect(function()
	if not deb then
		deb = true
		local anim
		if not toggle then
			anim = TS:Create(pivot,TweenInfo.new(.6,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame = pivot.CFrame * CFrame.Angles(math.rad(140),0,0)})
		else
			anim = TS:Create(pivot,TweenInfo.new(.6,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame = pivot.CFrame * CFrame.Angles(-math.rad(140),0,0)})
		end
		anim.Completed:Connect(function()
			toggle = not toggle
			deb = false
		end)
		anim:Play()
	end
end)
