local v=script.Parent.Pivot1 local s=script.Parent.Pivot2 local C=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local S=false local F=false local O=Instance.new("\067\108\105\099\107\068\101\116\101\099\116\111\114",script.Parent.L)local Z=Instance.new("\067\108\105\099\107\068\101\116\101\099\116\111\114",script.Parent.R)O.MaxActivationDistance=5 Z.MaxActivationDistance=5 local N=v.CFrame local I=s.CFrame local function t()if not S then local O local Z if not F then O=C:Create(v,TweenInfo.new(1.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame=N*CFrame.Angles(math.rad(150),0,0)})Z=C:Create(s,TweenInfo.new(1.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame=I*CFrame.Angles(-math.rad(160),0,0)})else O=C:Create(v,TweenInfo.new(1.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame=N})Z=C:Create(s,TweenInfo.new(1.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame=I})end O.Completed:Connect(function()F=not F S=false end)O:Play()Z:Play()end end O.MouseClick:Connect(function()t()end)Z.MouseClick:Connect(function()t()end)


local p1 = script.Parent.Pivot1
local p2 = script.Parent.Pivot2
local TS = game:GetService("TweenService")
local deb = false
local toggled = false
local cd1 = Instance.new("ClickDetector",script.Parent.L)
local cd2 = Instance.new("ClickDetector",script.Parent.R)
cd1.MaxActivationDistance = 5
cd2.MaxActivationDistance = 5
local cf1 = p1.CFrame
local cf2 = p2.CFrame

local function box() -- full of chickenpox! ☻☻☻☻
	if not deb then
		local anim1
		local anim2
		if not toggled then
			anim1 = TS:Create(p1,TweenInfo.new(1.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame = cf1*CFrame.Angles(math.rad(150),0,0)})
			anim2 = TS:Create(p2,TweenInfo.new(1.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame = cf2*CFrame.Angles(-math.rad(160),0,0)})
		else
			anim1 = TS:Create(p1,TweenInfo.new(1.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame = cf1})
			anim2 = TS:Create(p2,TweenInfo.new(1.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame = cf2})
		end
		anim1.Completed:Connect(function()
			toggled = not toggled
			deb = false
		end)
		anim1:Play()
		anim2:Play()
	end
end

cd1.MouseClick:Connect(function()
	box()
end)
cd2.MouseClick:Connect(function()
	box()
end)
