Complex sentence: Before John and Kate can escape by plane, the T-X takes control of the Terminator and it attacks them, but it is able to override its programming and shut itself down before it can kill John.
Split into simpler sentences: Before John and Kate can escape by plane, the T-X takes control of the Terminator, which in turn attacks them. The Terminator is able to override its programming and shut itself down before it can kill John.