Good Will Hunting was the first screenplay that Matt Damon and Ben Affleck ever pitched to Hollywood. And as far as first tries go, they did a pretty insanely, amazingly good job. After selling the screenplay to Castle Rock for over half a million dollars, Damon and Affleck decided to re-shop the thing until Miramax bought it from Castle Rock for even more money.
By the time they were done, Damon and Affleck had also won the Academy Award for Best Original Screenplay.
One hilarious thing you might not know about the screenplay to Good Will Hunting is that Damon and Affleck actually filled the original version with stuff they never intended to be in the final movie. They just put crazy stuff in to test whether the people buying the script had even bothered to read it all the way through.
One scene in particular featured a really intense sexual encounter between Will and his therapist, Sean Maguire. Luckily, Harvey Weinstein of Miramax actually read the whole script. So when he offered to make the movie with Affleck and Damon, he was all like, "Yeah, I'd love to make it. But I think we should take out that sex scene" (source).
And you thought you couldn't love the dynamic duo of Matt and Ben more.