Complex sentence: They rescue him and are able to board their ship, but just as they are about to leave, Ham glances outside and sees Zartog torturing some of the other aliens.
Split into simpler sentences: They rescue him and are able to board their ship. Just as they are about to leave, Ham glances outside and sees Zartog torturing some of the other aliens.