--

Ways = {
front = CFrame.new(0,0,0),
back = CFrame.Angles(0,math.rad(180),0),
top = CFrame.Angles(math.rad(90),0,0),
bottom = CFrame.Angles(-math.rad(90),0,0),
left = CFrame.Angles(0,math.rad(90),0),
right = CFrame.Angles(0,-math.rad(90),0)
}
Side = function(MC,Way)
if not Ways[Way:lower()] then return end
return MC*Ways[Way:lower()]
end


GBCF = function(CF,AddV)
local AddedAm = Side(CF,"front").lookVector*AddV.z+Side(CF,"top").lookVector*AddV.y+Side(CF,"right").lookVector*AddV.x
return CF+AddedAm
end


Close = false
Opened = false
Button = script.Parent.Button
Parts = script.Parent.Parts
cc = Instance.new("ClickDetector",Button)
cc.archivable = false
cc.MouseClick:connect(function()
print("MouseClick")
if Opened then Close = true return end
Opened = true