Can a “ghostwriter” sue someone he’s written a script for if the script sells? Even though there’s only one name on the script, the one who paid the ghostwriter to write it for him? I know an agent can probably sue a writer if the agent suggests all these changes to the script and the writer puts them in, and if he could prove through emails that he did in fact help “co-write” it (I heard it happens in Hollywood all the time), but could a ghostwriter sue? If it’s his job to ghostwrite, he can’t sue, can he?
First of all, ghostwriting is forbidden under the rules of the Writer's Guild of America. If the WGA finds out that someone put their name on someone else's writing, they're in trouble.
Second, no, a ghostwriter can't sue, because there's a ghostwriting contract.
An agent doesn't get credit for suggesting changes. Actually, no one gets writing credit for giving notes. You only get writing credit for actually writing pages.
It is an agent's job to give notes to her writing clients. She doesn't get credit. She gets a successful client. A writer needs writing credits. An agent needs successful clients. It's win-win.
Mostly people don't sue. It's not good business. It's bad for your reputation, and it's a huge time suck. Life is too short.
Ghostwriting is a very bad business, too. It damages the souls of both people involved, not to mention their reputations if it gets out.
Don't ghostwrite, and don't take credit for someone else's work.