Actually Michael Bay wrote most of Transformers 2 during the writers strike and just had a few script doctors work it more.

Also I worked with people that work for Michael Bay on a regular basis...