Complex sentence: The "Executor" serves as Darth Vader's flagship in "The Empire Strikes Back" and is the command ship at the Battle of Endor in "Return of the Jedi".
Split into simpler sentences: The "Executor" serves as Darth Vader's flagship in "The Empire Strikes Back". It is the command ship at the Battle of Endor in "Return of the Jedi".