function getItems()for Y,i in pairs(script.Parent:GetChildren())do if i:IsA("\066\097\115\101\080\097\114\116")and i.Name=="\066\097\114"then table.insert(_items,i)end end end function main()local Y=door door=0 script.Parent.Button.BrickColor=BrickColor.new("\078\101\119 \089\101\108\108\101\114")for i=0,5,.05 do for i,U in pairs(_items)do U.CFrame=U.CFrame*CFrame.new(.05*-Y,0,0)end wait()end if Y==-1 then script.Parent.Button.BrickColor=BrickColor.new("\082\101\097\108\108\121 \114\101\100")elseif Y==1 then script.Parent.Button.BrickColor=BrickColor.new("\066\114\105\103\104\116 \103\114\101\101\110")end door=Y end script.Parent.Button.Click.MouseClick:connect(function()if door==0 then return end door=door*-1 main()end)getItems()
--				-1 = Closed
--				0 = Active
--				1 = Open

function getItems()
	for _, v in pairs(script.Parent:GetChildren()) do
		if (v:IsA("BasePart")) and (v.Name == "Bar") then
			table.insert(_items, v)
		end
	end
end

function main()
	local d = door
	door = 0
	script.Parent.Button.BrickColor = BrickColor.new("New Yeller")
	for i = 0, 5, 0.05 do
		for _, v in pairs(_items) do
			v.CFrame = v.CFrame * CFrame.new((0.05 * -d), 0, 0)
		end
		wait()
	end
	if d == -1 then
		script.Parent.Button.BrickColor = BrickColor.new("Really red")
	elseif d == 1 then
		script.Parent.Button.BrickColor = BrickColor.new("Bright green")
	end
	door = d
end

script.Parent.Button.Click.MouseClick:connect(function()
	if door == 0 then
		return
	end
	door = (door * -1)
	main()
end)

getItems()
