Whether a script needs to be completely re-written or simply have its dialogue punched up, Hollywood isn't wanting for scribes who can get the job done—including a few well-known names who have worked on projects you might not expect. Here are nine famous screenwriters who helped write other people's movies.

1. She’s All That (1999) — M. Night Shyamalan

Getty Images

Before Hollywood writer/director M. Night Shyamalan dazzled audiences with his films The Sixth Sense and Unbreakable, the Indian-American filmmaker had a career as a screenwriter, ghostwriting scripts that needed additional work. The most notable (and inexplicable) screenplay Shyamalan had a hand in crafting was the teen movie She’s All That in 1999.

While promoting his film After Earth, Shyamalan told Movies.com that he co-wrote the Robert Iscove-directed film. Although Shyamalan had already revealed his contribution to She’s All That during the press tour of the film Signs in 2002, the teen movie’s credited screenwriter, R. Lee Fleming, Jr., took umbrage with Shyamalan’s claims. The reality is Fleming wrote the original screenplay, but Shyamalan was hired to re-write and punch up the story and dialogue. Shyamalan didn’t receive a film credit for his rewrites, but Iscove mentioned his work on the film’s DVD commentary.

2. It’s Pat: The Movie (1994) — Quentin Tarantino

Getty Images

Director Quentin Tarantino and Saturday Night Live alumna Julia Sweeney are good friends. They met through Harvey Keitel when he was hosting SNL in 1993, and the pair got along so well that Tarantino wrote a part specifically for Sweeney in his 1994 film Pulp Fiction.

Tarantino was also a big fan of Sweeney’s recurring SNL character Pat, an androgynous person who searches for love in Los Angeles. Tarantino co-wrote the film adaptation's script, but refused credit and considered helping with the script as a favor to his friend.

3. Kung-Fu Panda 2 (2011) — Charlie Kaufman

Getty Images

Academy Award-winning screenwriter Charlie Kaufman is mostly known for writing weighty films featuring introverted, self-doubting characters. So when news broke that he was hired to consult during the early development on the screenplay for Kung-Fu Panda 2, DreamWorks’ decision almost made sense considering the fragile emotional state of the animated film’s protagonist Po (voiced by Jack Black). Kaufman only worked on the film for two weeks and merely polished the screenplay.

4. The Rock (1996) — Aaron Sorkin

Getty Images

During the mid-'90s, after the success of A Few Good Men, Academy Award-winning screenwriter Aaron Sorkin worked as a script doctor in Hollywood. He was one of many screenwriters hired to re-write and polish Michael Bay’s sophomore effort The Rock in 1996. While it’s unclear which parts of the action film Sorkin was personally responsible for, there are a number of scenes involving the White House that are reminiscent of his TV series The West Wing.

Screenwriters Jonathan Hensleigh and Quentin Tarantino were also brought on to re-write The Rock, while British screenwriters and long-time Connery collaborators Dick Clement and Ian La Frenais were hired to punch up Sean Connery’s dialogue.

5. Speed (1994) — Joss Whedon

Getty Images

Before director Joss Whedon delivered the third highest-grossing movie of all time with Marvel’s The Avengers in 2012, the geek icon spent a majority of the '90s as a screenwriter and script doctor. While Whedon worked on scripts for X-Men, Waterworld, and Twister, the 1994 runaway action film Speed was Whedon’s most notable uncredited work.

Although screenwriter Graham Yost received the only writing credit on the film, Whedon wrote almost all of its dialogue and contributed some of its characters. Ultimately, Whedon’s writing credit was arbitrated off the final version of the film, but the 49-year-old filmmaker owns one of the few movie posters of Speed that includes his name.

6. Fun with Dick and Jane (2005) — Joel & Ethan Coen

Getty Images

The film remake of the 1977 film Fun with Dick and Jane had been floating around Hollywood for years until screenwriters Judd Apatow and Nicolas Stoller and director Dean Parisot brought the Jim Carrey and Téa Leoni starring vehicle to the big screen in 2005. But in 2003, director Barry Sonnenfeld was attached to the film along with The Mask co-star Cameron Diaz, who was slated to play the housewife-turned-criminal with Jim Carrey as her on-screen husband. The screenplay also received an uncredited re-write from Joel & Ethan Coen, who had a knack for writing comedies featuring criminals with The Ladykillers, O Brother, Where Art Thou?, and Raising Arizona.

7. Lethal Weapon 3 (1992) — Carrie Fisher

Getty Images

While Carrie Fisher is best known for playing Princess Leia in Star Wars, she branched off into professional writing after the success of the series' original trilogy. She showed off her razor-sharp wit with the novel and film Postcards From the Edge and the soul-piercing memoir Wishful Drinking. Fisher also worked as a script doctor on the films Hook, Sister Act, and The Wedding Singer, among others.

Her unexpected work on Lethal Weapon 3 was her most notable job as a ghostwriter in Hollywood. The strange pairing received mostly mixed reviews, but garnered hefty box office receipts with $321.7 million worldwide in 1992.

8. Coyote Ugly (2000) — Kevin Smith

Getty Images

In the late '90s, writer/director Kevin Smith was the toast of Hollywood, known as a writer producing sharp and snappy dialogue. After the success of Dogma in 1999, he was hired as a script doctor on the film Coyote Ugly. While Smith admitted that there were eight writers brought on to revamp the screenplay, only one, Gina Wendkos, received credit.

Smith also mentioned that he’s usually brought on to punch up a screenplay’s dialogue, but on Coyote Ugly, a number of Smith’s contributions involved scenarios and set pieces.

9. Star Wars: Episode III – Revenge of the Sith (2005) — Tom Stoppard

Getty Images

Thanks to Rosencrantz & Guildenstern are Dead and Shakespeare in Love, British playwright-turned-screenwriter Tom Stoppard is mostly known for putting a post-modern spin on the work of William Shakespeare—but he's also worked as an uncredited script doctor, notably on Indiana Jones and the Last Crusade, for which he wrote a majority of the dialogue. While the dialogue and wordplay in the third movie in the Indiana Jones film series is punchy and clever, Stoppard’s unexpected re-write and polish on Star Wars: Episode III – Revenge of the Sith is mind-boggling. Sith is flat and wooden, until its third act encounter between Obi-Wan Kenobi and Darth Vader (formerly Anakin Skywalker) in an epic lightsaber battle. Stoppard’s characteristic pathos can be felt as a struggle between good and evil unfolding on the big screen.