Gunitlo
It would be funny if the MC uses the contract release seal to seize control of all the reanimated shinobi. Then, the reanimations can’t be ended by the original caster. He could have them all rescind the reanimation contract like Madara did. Using the reanimated shinobi, he could attack Pain and finish them off. After reanimating Pain using Edo Tensei, you can order him to perform Rinne Rebirth on all the reanimated shinobi. Tell them about Kaguya and the other Otsusukis and why you’re trying to unite the shinobi world.