function startHub()
	local ammoScale = 1
	local s = GetFloat("options.game.campaign.ammo")
	if s == -1 then
		ammoScale = 0
	else
		ammoScale = ammoScale + s/100
	end
	
	if GetBool("savegame.mod.mission.ravine_bridge.complete") and not GetBool("savegame.mod.creditsdone") then
		StartLevel("final", "MOD/time_travel.xml", "outro")
		return
	elseif GetBool("savegame.mod.creditsdone") and GetBool("savegame.mod.mission.town_cars.complete") then
		StartLevel("hub9", "MOD/hub.xml", "hub9")
		return
	end
	
	if GetBool("savegame.mod.mission.town_cars.complete") then
		StartLevel("hub9", "MOD/hub.xml", "hub9")
		return
	end
	
	if GetBool("savegame.mod.mission.ravine_motivational.complete") then
		StartLevel("hub8", "MOD/hub.xml", "hub8")
		return
	end

	if GetBool("savegame.mod.mission.town_grease.complete") then
		StartLevel("hub7", "MOD/hub.xml", "hub7")
		return
	end

	if GetBool("savegame.mod.mission.ravine_tornado.complete") then
		StartLevel("hub6", "MOD/hub.xml", "hub6")
		return
	end
	
	if GetBool("savegame.mod.mission.town_destruction.complete") then
		StartLevel("hub5", "MOD/hub.xml", "hub5")
		return
	end
		
	if GetBool("savegame.mod.mission.ravine_heist.complete") then
		StartLevel("hub4", "MOD/hub.xml", "hub4")
		return
	end
	
	if GetBool("savegame.mod.mission.town_explosive.complete") then
		StartLevel("hub3", "MOD/hub.xml", "hub3")
		return
	end

	
	if GetBool("savegame.mod.mission.town_heist.complete") then
		StartLevel("hub2", "MOD/hub.xml", "hub2")
		return
	else
		if GetBool("savegame.mod.backintime") then
			StartLevel("hub1", "MOD/hub.xml", "hub1")
		else
			StartLevel("start", "MOD/hub_lockelle.xml", "tutorial")
		end
	end
end
