Dooku and the clones do a LOT of the work but it all comes down to Anakin's decision. Anakin turning to the Dark Side ensured Palpatine's takeover. If Anakin hadn't, Palpatine would have fallen.
AND been killed. Mace Windu was mere seconds away from striking him down. Anakin's intervention was the only thing that saved Palpatine from certain death.
I still have doubts as to whether Palpatine was really in a place to be killed. He goes from feigning weakness to lighting up Mace like a Christmas tree in a matter of moments.
I suppose his Sith lightning was his trump card, to be played if and only if Mace got the upper hand and was on the verge of defeating or even killing him. Do I believe Palpatine would have just allowed himself to be struck down? No way. He'd have put up some last-second defense, whether it be Sith lightning or something else. But he needed Anakin to be the one to attack Mace, so he needed to leave himself vulnerable long enough for Anakin to show up, assess the situation and lash out against the senior Jedi. My main point is that Mace could have theoretically killed Palpatine at any moment...or at the very least tried like hell to do so. Even if Palpatine was feigning to a degree, he was prostrate on the windowsill and vulnerable to a lightsaber blow from above. Mace could very well have done it if his timing had been right.