Following the Team Flare incident, Lumiose City is getting back to normal whilst Ash, Serena and Bonnie work to rebuild the Lumiose Gym alongside Meyer and hope to get it up and running again the next day. Clemont is busy working on a new Clembot and manages to get it working, and the two introduce themselves. In a cafe, Team Rocket is speaking to Giovanni, who has heard of Team Flare's downfall, and Team Rocket take a lot of credit for bringing it down. Giovanni requests a full report, and the trio promise to return to Headquarters once the airport reopens, and decide to bring back a surprise for him as well, in the form of Pikachu.
Joining the others in their conversation, Clemont informs them that the new Clembot has none of the memories of the old Clembot. As they talk, a trainer called Alvin shows up to challenge the Gym, who having watched the Lumiose Conference, is excited to meet Ash in person. Clemont introduces himself as the Gym Leader, causing Alvin to wonder about Clembot. Clemont explains the entire incident of Clembot's destruction, causing Alvin to be sad; Alvin explains he had previously challenged the gym, but was defeated, and has been training hard since then so he can battle Clembot again. Clemont explains that Clembot won't have any memory from before, but Alvin is intent on his wish. So, due to the battlefield not being ready, Clemont asks Alvin to come back the next day to battle, and Alvin agrees. After he leaves, Meyer informs the group that Professor Sycamore has called them to meet Alain who is coming back.
At Professor Sycamore's lab, a clumsy Mairin is seen tripping over Chespie when Ash and his friends arrive. Mairin is surprised to see them and explains that she has decided to throw a party on account of Alain's homecoming. Clemont and Bonnie smell something burning. In the kitchen, Mairin moans about the burnt food as the others offer to help prepare for the party. Professor Sycamore drives a still distant Alain back to his lab. As the others prepare for Alain's return, Bonnie can't help but wonder how Squishy is doing but Ash assures her that Squishy shall be doing fine. Later, Alain and Professor Sycamore return and Mairin welcomes him home.
During their lunch, Chespin and Pancham get into another fight over food, but Chespie manages to break it up. Professor Sycamore hears the Lumiose Gym is reopening and Bonnie informs him about the challenger. Professor Sycamore inquires the group on their future plans, and Ash claims that he plans to return to Kanto and start his journey afresh. Later, Alain visits the Pokémon in Professor Sycamore's lab, who are pleased to see him. Ash joins him, saying it's been a while since he saw them. Garchomp comes over and greets Alain as well, as Ash asks Alain what his plans for the future are; the latter, who still feels guilty over helping Lysandre even though he was unaware of his true intentions, is unsure. Ash tries to cheer him and asks him to battle again in the future. Alain promises to do so, just as an alarm starts blaring. Joining the others, they discover that Team Rocket has captured Pikachu. After reciting their motto, Jessie and James send out Gourgeist and Inkay to battle Ash's Greninja and Alain's Charizard. A battle ensues, during which Greninja frees Pikachu with Cut and destroys the device. With the efforts of Greninja and Charizard, Team Rocket is sent blasting off, and Ash thanks Alain for his help.
The next day, Clembot is ready for his battle against Alvin. Meyer acts as the referee, and the battle begins with Clembot sending out Magnemite for the battle. Alvin responds by sending out his Vivillon as Clembot comments that Vivillon is at a disadvantage against Magnemite. Magnemite starts the battle with Electro Ball, but Vivillon counters with Flash to blind Magnemite, and uses Quiver Dance. As Clembot wonders what to do, Clemont tells him to remain calm, focused and observant to predict his opponent's next move. As Clembot tries to reflect on Clemont's advice, Alvin has Vivillon put Magnemite to sleep with Sleep Powder and knock it out with an Energy Ball. Clemont reminds Clembot to not get nervous and keep his eyes open at all times. Clembot sends out Magneton as the next Pokémon. Vivillon starts with Sleep Powder, but Magneton uses Rain Dance to dispel the Sleep Powder, and knocks out the Scale Pokémon with Thunder. Next, Alvin uses Pyroar to attack with Flamethrower, but another Thunder quickly faints Pyroar. Clembot claims to Clemont that the feeling of victory is good, as Alvin sends out Cubone as his last Pokémon. The Lonely Pokémon starts the round with Bonemerang, which Magneton counters with Sonic Boom. Cubone successfully knocks the Magnet Pokémon out with Brick Break. As Clembot recalls Magneton, Clemont says it is upsetting to lose but adds that by losing, one can learn to become stronger. Clembot takes his advice and sends out Heliolisk. Determined to get the Voltage Badge, Alvin commands his Cubone to use Brick Break, but the Generator Pokémon dodges the attack. Clembot commands Heliolisk to use Dragon Tail, but Cubone blocks and uses Bone Rush. Heliolisk counters with Focus Blast, heavily damaging Cubone. A determined Alvin remembers Clembot's advice from before, and commands Cubone to use Bonemerang. Heliolisk counters with Focus Blast but the Bonemerang breaks through and knocks out Heliolisk, giving Alvin the win. Clembot claims that he found the battle to be enjoyable, and gives Alvin his Voltage badge. Ash congratulates Alvin, and Serena and Bonnie commend Clembot and the Pokémon for their brilliant battling skills. Clembot thanks them for the cheer, and informs Clemont that he wishes to learn more about Pokémon, which Clemont happily agrees to.
Later, Professor Sycamore takes it upon himself to give away the medals to the Kalos League finalists due to the Kalos League award ceremony never being completed. Bonnie suggests awarding everyone for their efforts in stopping Team Flare instead of just Alain and Ash, which is well appreciated. Giving Ash and Alain their medals, the Professor invites Alain to be his assistant again; however, the latter is still unhappy and guilty of his work with Team Flare and declines. Professor Sycamore tries to convince him by stating that he and Lumiose City could use his help, and Alain finally accepts. Later the group, along with their Pokémon, receive medals for their assistance and a photograph is taken. That night, a crowd gathers around Prism Tower to witness the Gym reopening. A countdown commences and Meyer pulls a switch to turn the lights on and the fireworks go off. As they celebrate the Gym reopening, Clemont asks Serena what her future plans are, but she states that she is not certain, as she remembers Palermo's offer from before.