Star Trek 3 will get an extra dose of Simon Pegg.

'Hannibal' Season 3 Spoilers: 'Huge' Announcement Coming, Is Clarice Starling In The Cards?

In addition to playing Scotty, the British actor will spent some time penning the script, according to Deadline.

The announcement comes following Roberto Orci's exit as writer/director. Although Orci will still act as a producer, the director's seat will be home to Justin Lin (Fast & Furious) while Doug Jung and Pegg will co-write the script.

'Supernatural' Season 10 Spoilers: What It Rowena Planning? EP Teases Major Crowley Twists

Pegg is well known for his collaboration with Edgar Wright on the Tree Flavours Cornetto trilogy (Shaun of the Dead, Hot Fuzz, and The Worlds End), and the his comedic writing is sure to help keep the third film in line with the feeling of Star Trek and Star Trek Into Darkness.

Jung, meanwhile, has lent his creative mind to Banshee, Dark Blue, and Big Love.

Previously, Star Trek was directed by JJ Abrams and penned by Roberto Orci and Alex Kurtzman while the same creative team created Star Trek Into Darkness.

Find out more when Star Trek 3 enters theaters in 2016. Click the video below to see a preview for the Star Trek Into Darkness.