After obtaining the Red Orb from Mt. Pyre and battling Grunts in Slateport, you follow Team Aqua to their hideout in Lilycove City.
Team Aqua Hideout 1F
Go north from the entrance of the hideout and go through the door.
Go north, then west. Step on the green tile to be warped to a small room where you can get a Nugget. Step on the green tile to exit this room.
Go northeast and step on the tile there to go to another room. In this room, there are two Grunts that you can battle. The south one has a level 35 Grimer and a level 35 Carvanha. The north one has a level 37 Golbat.
Step on the southwest tile in this room to go to a room with beds. You can rest in the beds to heal your pokémon. Go west in that same room to get a Full Restore. Then step on the warp tile to leave this room.
Use the stairs in the northwest to go to the basement.
Team Aqua Hideout B1F
Go south to find an Escape Rope.
Go northwest into the meteorite lab. Step on the northeast warp tile. You will be in the library. Go west to find a Max Elixir. Then step on the warp tile again to leave the library.
Go southwest to leave the lab area. You can battle a Grunt here. He has a level 34 Mightyena and a level 36 Golbat.
Go west to find another warp tile. Step on it, then go northeast into another lab. Go to the northwest corner of this lab to find a Nest Ball.
Step on the southwest warp tile in this lab to reach another area. Step on the next warp tile, then go south to find a PP Max, then go north and step on the warp tile again. Use the next warp tile to return to the lab.
In this lab, step on the southeast warp tile, then step on the next tile. Go southeast in this room to find TM97 Dark Pulse. Then go back and step on the warp tiles to return to the lab.
From the lab, go south and then east. You can battle a Team Aqua Grunt who has a level 35 Carvanha and a level 35 Grimer.
Go north from that Grunt and step on the warp tile to go to another room.
There is a Master Ball that you can get now. It always successfully catches the wild pokémon that you throw it at, making it useful for legendary pokémon that are hard to catch. If you don't get it now, you won't be able to get it anymore after you defeat the Team Aqua Admin in the hideout later!
Team Aqua Hideout B2F
If you want the Master Ball, go south from that Grunt and step on the warp tile to reach a room with many warp tiles. First, step on the right or left warp tile to go to the next row. Then step on the middle warp tile to go to the next row. Then step on the warp tile on the left to go to the next row. Finally, go around the middle tile and step on the far left one to go to the next area.
Go northeast to find four items. The bottom right and top left items are actually Electrodes. You can battle these pokémon and catch them, or just knock them out. You have to battle at least one Electrode to get the Master Ball. The bottom left item is a Nugget, and the top right item is a Master Ball.
Go back and step on the warp tile to leave this room. You will be back in the room with many warp tiles. First, step on the middle warp tile, then step on the right or left warp tile. You should be at the top of the room. Step on the northernmost warp tile to leave this room.
Go north and east. You must battle a Grunt to the east who has a level 37 Mightyena.
Go east from that grunt and step on the warp tile there to go to another area.
Team Aqua Hideout B4F
Go northeast to battle a Grunt who has a level 37 Carvanha.
Then go east and you will have to have a horde battle with five Grunts at once. They each have a level 18 Poochyena.
Go southeast to find a Max Revive.
Then go north to battle Team Aqua Admin Matt. He has a level 39 Sharpedo.
Go north and then west, and step on the warp tile. Then go south and use Surf to leave the hideout.
Now that you have defeated Matt, you can Surf east from Lilycove City to reach Route 124.