India is a huge spoiler. India does not accept that there is any difference in the intention of either the Paki army or the Taliban. India will treat an attack from either entity as one and the same. Given India's strategic depth and size, whatever losses India faces, in a desperate situation neither the Paki army nor the Taliban will emerge victorious in an all out, direct confrontation. If the war goes nuclear the end result will be the same and the long term Islamist nuclear aspirations in Pakistan will be badly mauled in a debilitating war with India, no matter how much India is damaged in return. Such a war would essentially be suicidal. Even if India is badly damaged, US goals for Afghanistan will be met more easily.
India also deserves some credit for being the only player that has consistently been concerned about human development in the subcontinent - i.e roads, education and healthcare. The Pakistani army have not given a damn about that in their own country and the US has played ball with them, making the army stronger while not giving a rat's ass for human development in a Pakistan that is now inching towards 180 million people. The US has never been interested in human development of anyone other than Americans. For others funding and arms are provided to meet immediate tactical goals for the US. To be fair, the Afghans too were interested in their own human development until the US-Pakistan alliance (Soviet invasion '80s) allowed the Taliban to rape Afghanistan. So both Pakistan and the US, for their own individual interest were responsible for unleashing the Taliban on Afghanistan.
It is precisely the fact that India has stood as a solid wall against Pakistaniyat and Islamic extremism that has caused Pakistan to expand towards Afghanistan. This coincided with US anti-Soviet aims. But that led to 9-11, and now the US is the confounding factor in Afghanistan. That is why the Paki army-Taliban combine want the US out of Afghanistan, and that is what explains their game of"Pay us (the army) or we will lose to the Taliban" For the first time there is a coinciding of US and Indian interests in Afghanistan and keeping the Taliban out, while developing Afghanistan.
Pakistan resists this by claiming that India is out to surround Pakistan by its presence in Afghanistan. Pakistan also claims that it is unable to fight the Taliban because of India, and Pakistan claims that its army needs to be paid more (by the US) for fighting the Taliban. These claims are a strawman because getting India out of Afghanistan or getting Kashmir into Pakistan will in no way stop the Taliban. It will only make their survival easier. The main problem is US stupidity/blindness that keeps paying the Pakistani army that has the Taliban as an ally.
The fallout of this US blindness can have one of two consequences:
1) The US keeps on funding the Pakistan army which keeps supporting the Taliban
2) The US suddenly wises up and makes an effort to stop funding the Pakistan army
Scenario 1 - Let us say that the US keeps on funding the Pakistan army. The Paki army will keep on pretending to oppose the Taliban and the Taliban will remain intact and strong while the Pakistan army bets stronger. The US will keep taking losses in Afghanistan and the fissile material stock of Pakistan will keep on increasing. At least some of this will have to be spirited away for safekeeping by their Taliban allies in the hills.
If and when the US gets out of Afghanistan we will have a powerfully armed and nuclear Pakistan with poor illiterate people (as usual).Rebellion among these people wil be ruthlessly put down by the Pakistan army/Taliban combine, and the country will need external campaigns to keep the nation busy. Controlling Afghanistan will be the first step. The only question is how the US will react to this. By stopping funding to the Paki army at this late stage, the US will be reneging on its "promise" not to forsake Pakistan again, and there will be no reduction in the nuclear risk - once nuclear arms get into Afghanistan - even if they are under Paki army control.
A total Talibanization of Afghanistan and Islamization of Pakistan and a powerful Pakistan army will serve as a threat to many nations apart from India. But India's role in this would be limited to hoping that the US is not that stupid or weak. But this is a possibility that can happen. The only two possibly positive things that can happen is a renewed Russian interest in Afghanistan as Russian Islamic republics are threatened and Chinese interest as Xinjiang comes under pressure. It is hardly likely that the Taliban/Paki army combine will be worried - having seen off both the Soviets and the Americans.
Scenario 2 - On the other hand, if the US "wises up" and decides to keep engaged in Pakistan and stop funding the Pakistan army, and seeks to fund only civilian projects (with accountability) the Pakistan army will being to squeal and protest. They will start "losing" to the Taliban and try and provoke incidents with India. This is exactly what has started now and the US will feel the pressure in two ways. The first is an increase in Taliban attacks in Afghanistan, and a choking off of supply convoys from Pakistan. This is going to be a difficult phase for the US. If the US can remain engaged in AfPak and tide over hi phase we are likely to see more signs of civil war in Pakistan and more signs of the army "allowing" the Taliban to take over Pakistan.
But I believe the Pakistan army's bluff needs to be called. It is OK to have the Taliban in Swat, but Pakistani people are not going to tolerate Talibanization in the Pakistan heartland. In the fertile areas of Punjab and Sindh there will be resistance to the Taliban. The resistance will come from teh Pakistan army itself whose cadres will otherwise have to observe their own villages and homes being over run by the Taliban. It is one thing to love the Talibs as long as they are in FATA. It is different when they are in your home town.
But if the Taliban come so deep into the Pakistani heartland - the elite are finished. They will flee in numbers. If a Pak army-Taliban war starts in earnest in Pakistan, we can expect to see a nuke exploding in Pakistan if the Pakistanis have already made the error of handing over control of some nukes to the forces of jihad. If they have no yet done that - then they will be fighting a last ditch battle to protect the nukes. In the long term it is better to squeeze Pakistan and reduce its ability to make nukes. China may not want that - They need to be persuaded using Xinjiang Card.