To beat the final battle in Transformers: Autobots, stay behind Megatron and strike his back as much as you can before Optimus is overwhelmed by drones. When Megatron drops the Allspark, pick it up and hit him with it. After the cutscene, fight Megatron alongside Optimus until he goes down. There are four Decepticons you can defeat to restore health, and Megatron will occasionally destroy scenery that may drop health too. Once he is defeated, enjoy the final cutscene—good luck!