--Show a specific page

function module:ShowSpecificPage(pageName, subPageName)
	for a,b in pairs(pages:GetChildren()) do
		if b.Name == pageName then
			if currentPage == b then
				b.Visible = true
			else
				tweenPages(UDim2.new(-1,0,0,0), b, true)
			end
			local subPages = subPageOrders[b.Name]
			if subPages then
				local oldPos
				local newPos
				for i,v in pairs(subPages) do
					local subPage = b[v]
					if subPage.Name == subPageName then
						newPos = i
					elseif subPage.Position.X.Scale == 0 then
						oldPos = i
					end
				end
				--
				if oldPos == nil then
					for i = 1, #subPages do
						if i ~= newPos then
							oldPos = i
						end
					end
				end
				--
				if pageName == "Admin" and currentPage.Name == "Admin" then
					spawn(function() main:GetModule("PageAdmin"):UpdatePages() end)
				end
				module:OpenMainFrame()
				if b:FindFirstChild("NavigateButtons") then
					navigateNewPage(b, oldPos, newPos, "Left", true)
				end
			end
		else
			b.Visible = false	
		end
	end
end
module:ShowSpecificPage("Home")


