After defeating Valerie and receiving the Fairy Badge from her, Shauna and Trevor ask you come to the Poké Ball Factory.
Visit the Factory
The Poké Ball Factory is north of Laverre City. Shauna and Trevor are standing outside, saying that someone won't let them into the factory. Shauna runs north to try to get in again. Then your neighbor and Tierno arrive. You see a Team Flare Grunt chasing Shauna and Trevor out of the factory. Tierno runs off to help them, and your neighbor says to check out the factory while the guard is gone.
Go north through the gates, then go east into a shrub maze. Turn on your Dowsing Machine to find a hidden Hyper Potion in the maze. To the south, there is a Max Revive.
Now go west and into the shrub maze there. Turn on your Dowsing Machine to find a hidden Poké Ball in the maze. To the north, there is a hidden Burn Heal, and south of that, you find a Max Ether.
Use your Dowsing Machine and go north of the western shrub maze, between the fence and the building, to find a hidden Dusk Ball.
Now go into the glass doors of the factory.
Inside the Factory
Your neighbor will deal with the grunt just inside the factory. There is another Grunt if you go up the stairs to the east. This Grunt has a level 37 Toxicroak.
Go north of your neighbor and walk onto the conveyor belt. You'll stop to the right of a Team Flare Grunt. This Grunt has a level 36 Mightyena and a level 36 Golbat.
Go north from that Grunt to get a Quick Ball.
Now go south and step onto the conveyor belt. If it sends you back to the left, walk up one square and step onto the conveyor belt from there. After the conveyor belt drops you off this time, walk one square to the left and then walk south onto the conveyor belt again. When you are dropped off, go south, then east. There is a Grunt here who has a level 36 Scraggy and a level 36 Mightyena.
Now walk behind the Grunt and go south. You'll find a Metal Coat.
Go north from there and get on the conveyor belt. When it drops you off, go east, then north to find a Timer Ball.
Go south from there and walk up the stairs to the ledge. Go west, then north. You'll find a small room. Go inside and talk to the girl in the dark shirt to get your pokémon healed up.
If you go east from the small room, there is a Team Flare Grunt who has a level 37 Swalot.
Now go southwest. There are some stairs leading down to a machine. Check on it to switch the direction of the conveyor belt. After you switch the direction, the machine will glow red. Go down the stairs to the right and get on the conveyor belt. From the place where it drops you off, go north and up the stairs to the right. You'll reach another small room in the northeast corner. Go into the room.
Team Flare Admin and Scientists
In the room, you are challenged by a Team Flare Admin who has a level 37 Scraggy (very weak to Fairy attacks) and a level 38 Houndoom.
After the battle, the two Team Flare Scientists are about to challenge you in an unfair fight, but your neighbor shows up to help you in the double battle. Your neighbor asks if you're ready. If not, you can say No and do whatever preparations are necessary. Feel free to leave the room and go heal up.
When you're ready, go back and talk to your neighbor. Your neighbor's pokémon are a level 37 Meowstic, a level 39 starter that is strong against your starter, and a level 37 Absol.
Celosia (the purple-haired scientist) has a level 41 Manectric, which is weak to Ground moves. Bryony (the green-haired scientist) has a level 41 Liepard, which is weak to Fighting, Bug, and Fairy moves.
After you defeat Celosia and Bryony, Team Flare leaves the factory. The president of the factory gives you the choice of taking a Master Ball or a Big Nugget. It actually doesn't matter which you choose, because the president will decide to give you both items anyway.
The Master Ball always succeeds in catching the pokémon that you throw it at, so you should save it for a pokémon that is really hard to catch. The only other way to get a Master Ball is at the Loto-ID Center in Lumiose City by getting an exact match, but this is very unlikely. The Big Nugget doesn't do anything, but you can sell it for a large amount of money. There may also be somebody in the game who will buy the Big Nugget for a higher price than at Pokémon Centers.
Now go to the exit of the Poké Ball Factory. Your friends will come in and say that Dendemille Town is next on the map. Leave the Factory and you will receive a Holo Clip reporting the attack on the Poké Ball Factory. Go south into Laverre City. You can use the east exit from the city to reach Route 15: Brun Way.