local C=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local s=TweenInfo.new(.7,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,false,0)local p=script.Parent.Open local A=script.Parent.Close local E=script.Parent.ClickDetector local K=script.Parent.Parent.Center local W=script.Parent.Parent.Parent.Door2Origin local z=script.Parent.Parent.Parent.Door2ToGo local b=false local k=false E.MouseClick:Connect(function()if b==false and k==false then k=true b=true;(C:Create(K,s,{CFrame=z.CFrame})):Play()p:Play()wait(.7)k=false elseif b==true and k==false then k=true b=false;(C:Create(K,s,{CFrame=W.CFrame})):Play()wait(.5)A:Play()wait(.2)k=false end end)
--// Scripted by Trackplayer
--// Do not edit the code if you don't know what are you doing.

local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(0.7, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0)

local openSound = script.Parent.Open
local closeSound = script.Parent.Close

local click = script.Parent.ClickDetector

local center = script.Parent.Parent.Center
local origin = script.Parent.Parent.Parent.Door2Origin
local toGo = script.Parent.Parent.Parent.Door2ToGo

local isOpen = false
local isMoving = false

click.MouseClick:Connect(function()
	if isOpen == false and isMoving == false then
		isMoving = true
		isOpen = true

		TweenService:Create(center, Info, { CFrame = toGo.CFrame }):Play()
		openSound:Play()

		wait(0.7)
		isMoving = false
	elseif isOpen == true and isMoving == false then
		isMoving = true
		isOpen = false

		TweenService:Create(center, Info, { CFrame = origin.CFrame }):Play()

		wait(0.5)
		closeSound:Play()

		wait(0.2)
		isMoving = false
	end
end)
