Oliver Stone wrote the screenplay for Brian De Palma’s 1983 film Scarface while trying to kick his cocaine habit. Stone discussed that time in his life in an interview with Creative Screenwriting:
I was doing coke at the time, and I really regretted it. I got into a habit of it and I was an addictive personality. I did it, not to an extreme or to a place where I was as destructive as some people, but certainly to where I was going stale mentally. I moved out of L.A. with my wife at the time and moved back to France to try and get into another world and see the world differently. And I wrote the script totally fucking cold sober. . . . One of the things that’s bugged me, I think a lot of writers will agree with this is we spend money on our vices and we pay through the nose for our mistakes. I’ll admit that coke kicked my ass. It’s one of the things that beat me in life. As a result, getting even, getting paid to make a movie about it and making it a good one on top of it, there’s nothing better.
He goes on to discuss how having a coke habit gave his script a different perspective than if he had never done the drug at all:
The big switch point for me in the script is the fall of the king. I see Al turning paranoid in that movie, I see it perhaps because I was more attuned to it. But the paranoia of coke is the most striking (aspect), the fire of it.