-- i know this is a bad code ♥♦♣♠

local toggle1 = false
local deb1 = false
local toggle2 = false
local deb2 = false

local function drawer1()
	if not deb1 then
		deb1 = true
		local anim
		if not toggle1 then
			anim = TS:Create(cab1,TweenInfo.new(.6,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame = cab1.CFrame * CFrame.new(0,0,.95)})
		else
			anim = TS:Create(cab1,TweenInfo.new(.6,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame = cab1.CFrame * CFrame.new(0,0,-.95)})
		end
		anim.Completed:Connect(function()
			toggle1 = not toggle1
			deb1 = false
		end)
		anim:Play()
	end
end

local function drawer2()
	if not deb2 then
		deb2 = true
		local anim
		if not toggle2 then
			anim = TS:Create(cab2,TweenInfo.new(.6,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame = cab2.CFrame * CFrame.new(0,0,.95)})
		else
			anim = TS:Create(cab2,TweenInfo.new(.6,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame = cab2.CFrame * CFrame.new(0,0,-.95)})
		end
		anim.Completed:Connect(function()
			toggle2 = not toggle2
			deb2 = false
		end)
		anim:Play()
	end
end

CD1.MouseClick:Connect(function()
	drawer1()
end)
CD1_2.MouseClick:Connect(function()
	drawer1()
end)

CD2.MouseClick:Connect(function()
	drawer2()
end)
CD2_2.MouseClick:Connect(function()
	drawer2()
end)
