Galvatron has been controlled by Megatron all along.
In order to stop the Deceptions and save Earth yet again, Optimus Prime releases the Dinobots from Lockdown's prison.
Optimus stabs Lockdown through the chest and then detonates the Seed, taking out a few Decepticons in the wake.
Defeated once again, Galvatron threatens revenge.
Optimus tells the Autobots and Dinobots that he is going to find their creators. He flies off into space
Optimus's closing narration is a warning to the creators of the Transformers to stay away from Earth as he is coming for them (in deep space).