system
Given the following post, respond as if you're commenting on Reddit:
human
[Star Wars] If Emperor Palpatine died (Original Trilogy) who would replace him?

If the Emperor is killed by a Rebel assassin, and the Empire suffers no other significant losses or setbacks, I don’t believe that the Empire would automatically collapse. Given their massive military power, I think they’d be more than capable of maintaining control over key systems, even in a time of unrest. 

If they had a competent leader. 

If Palpatine died, who would replace him? Does Vader take over? Does it go to the senior commander of the Imperial military? What exactly does their succession process look like?
gpt
In Legends, The Empire persisted one way or the other for another 30 or so years, both helped and fractured by Palpatine's reforms with the Moff system allowing regions greater autonomy but under more authoritarian administration.

The first successor was Sate Pestage (one of the guys in the black and purple robes in the throne room) seized power as the Grand Vizier, then he was deposed by Imperial Intelligence who installed a ruling council, who then was deposed again by Imperial Intelligence, this time more directly and the Director of Imperial Intelligence Ysanne Isard declared herself as leader. 

This whole time there were power struggles and factional splintering and a lot of senior officers and moffs declared themselves to be independent warlords. There was also a side plot with Palpatine's alleged son trying to seize power but was thwarted by both the New Republic and the Imperial Ruling Council. 

After Isard was overthrown by Rogue Squadron, the Empire was leaderless and squabbling amongst themselves until Thrawn returned from the Unknown Regions and reunited a lot of the fractured territories and warlords. Thrawn died in the Battle of Bilbringi, and the Imperials consolidated a bit (they were all attacking the New Republic but not really under one banner) until a cloned Palpatine returned with his Dark Empire.

The Dark Empire was defeated both externally by the New Republic and internally by Palpatine's Head Royal Guard Carnor Jax and a council of Imperial nobles. Jax seized the Imperial throne but was soon killed by a fellow Royal Guardsman Kir Kanos for Jax's betrayal and that was the end of the Empire as a unified political entity.

They were still 'Imperial' with the New Republic referring to them collectively as the 'Imperial Remnant' and had a loose alliance represented by a council of Moffs.

Up to this point was only around 20 years after the Battle of Endor.

Eventually the Supreme Commander of the Imperial Remnant Gilad Pallaeon (who was second-in-command to Thrawn) signed a peace treaty with the New Republic and over the following years and crises were absorbed into the Galactic Alliance.