Complex sentence: The plan runs successfully until Quest discoves the robot and sends military units against it before he finally uses the ray on it, destroying it.
Split into simpler sentences: The plan runs successfully until Quest discovers the robot and sends military units against it. Dr. Quest finally has to resort to firing the ray on it, destroying it.