Naruto: (long ending, don't read if you don't want a wall of text)
Madara fights Killer Bee and Naruto and after Killer Bee and Naruto realize it's hopeless, Madara takes the Hachibi and kills Killer Bee. Naruto keeps on fighting but in vain, and Madara prepares his final attack to take Kurama from Naruto. On the last second, Sasuke arrives and saves Naruto. The two decide to work together since they're literally fighting the second sage of the six paths in edo form. The two combine their efforts and start a powerful counter attack, after which Madara realizes to get serious and unleashes Perfect Susano'o and takes control of the battle. Naruto is able to fight evenly with Madara temporarily, but is still defeated since he only represents half the power of the Rikudou Sennin. Madara boasts about how the Uchiha have become nothing like they were in power and starts badmouthing Itachi. As Sasuke is reaching his boiling point, his anger, this time from wanting to protect the Uchiha name that Itachi entrusted him with, awakens his Rinnegan. Sasuke finally understands that to obtain power, a shinobi must have something their willing to protect. Naruto, the Rikudou's body, and Sasuke, the Rikudou's eyes, fight Madara evenly before Naruto and Sasuke launch their most powerful attacks on Madara, and Madara unleashes his meteor to counter their combined attack. The explosion causes a large pile of smoke, which Sasuke and Naruto use to their advantage. Naruto fires a Rasenshiruken at Madara which Madara couldn't see, therefore is hit. As he's regenerating, Sasuke uses the sealing sword of Itachi's susano'o thanks to having Itachi's eyes. Madara smiles, acknowledging Naruto and Sasuke together access the true power of the Rikudou Sennin.
Everyone arrives at the battlefield just as Madara is saying those words and is being sealed. Naruto and Sasuke realize everyone is there when everyone cheers for the two saving the shinobi world. However, the shinobi alliance tries to deal with Sasuke and that's when Naruto tells them he will. Naruto is shocked to hear Tsunade's voice, seeing the 5 Kage are alive and well. Tsunade looks at Naruto's growth and thinks to herself she'll appoint Naruto as Hokage after this battle. Naruto and Sasuke fight their final fight, this time out of respect for one another. Their power is so great that they change the landscape just like Hashirama and Madara's fight, and everyone is in awe of this power. Sasuke asks Naruto why Naruto is wasting his time on Sasuke instead of using that time to become Hokage. Naruto answers that if he can't save his friend, he doesn't deserve to become Hokage. Before the two exchange their most powerful jutsu, Sasuke puts Naruto in a genjutsu to let him know he wishes to follow Itachi's path, one where a nameless shinobi protects the village from the shadows. Naruto understands and explains his plan, and the two exchange their most powerful jutsu. After the smoke clears, Sasuke is nowhere to be seen, and Naruto is seen laying on the floor motionless.
While everyone is mourning for Naruto's supposed death for saving the shinobi world from Madara and killing Sasuke, Tsunade goes to Naruto and attempts to see how he died, but she finds out he's alive. Naruto stands up and everyone is happy he's alive. Naruto sheds tears of happiness but when everyone asks why Naruto is crying, Naruto tells them Sasuke is dead. Everyone rejoices in that an s rank criminal is dead. Once everyone is back to their villages, Tsunade unites everyone in the village and has Naruto stand on the Hokage monument, declaring Naruto as Konoha's 6th Hokage. Naruto smiles as two Rinnegan eyes are seen in the darkness. It's left to the reader what Naruto said to Sasuke and what his plan was.