-- medical station containing NOTHING because we DON'T LIKE GRUNTS that ARE INJURED.


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)
