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


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.20*(-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() 
