for K,D in pairs(Navigation.Main:GetChildren())do if D:IsA("\084\101\120\116\066\117\116\116\111\110")then D.MouseButton1Click:connect(function()if not Tweening then Tweening=true Navigation:TweenPosition(UDim2.new(-1,0,0,0),Direction,Style,Time)Main[D.Name]:TweenPosition(UDim2.new(0,0,0,0),Direction,Style,Time)wait(Time)Tweening=false end end)end end for K,D in pairs(Main:GetChildren())do D.Back.MouseButton1Click:connect(function()if not Tweening then Tweening=true Navigation:TweenPosition(UDim2.new(0,0,0,0),Direction,Style,Time)Main[D.Name]:TweenPosition(UDim2.new(1,0,0,0),Direction,Style,Time)wait(Time)Tweening=false end end)end
-- Navigation
for _, NavButton in pairs(Navigation.Main:GetChildren()) do
	if NavButton:IsA("TextButton") then
		NavButton.MouseButton1Click:connect(function()
			if not Tweening then
				Tweening = true
				Navigation:TweenPosition(UDim2.new(-1, 0, 0, 0), Direction, Style, Time)
				Main[NavButton.Name]:TweenPosition(UDim2.new(0, 0, 0, 0), Direction, Style, Time)
				wait(Time)
				Tweening = false
			end
		end)
	end
end

for _, Frame in pairs(Main:GetChildren()) do
	Frame.Back.MouseButton1Click:connect(function()
		if not Tweening then
			Tweening = true
			Navigation:TweenPosition(UDim2.new(0, 0, 0, 0), Direction, Style, Time)
			Main[Frame.Name]:TweenPosition(UDim2.new(1, 0, 0, 0), Direction, Style, Time)
			wait(Time)
			Tweening = false
		end
	end)
end
