Good Will Hunting was arguably one of the biggest flicks of the '90's, but it was the incredible back story that everyone fell in love with; two young emerging actors that were sleeping on each other's couch, wrote a screenplay together, featured in the film and then ended up winning an Oscar for the script (and also picked up nine other nominations). The academy-award winning film sky-rocketed Matt Damon and Ben Affleck's careers and it went down as one of Hollywood's most cherished success stories. But there's a lot more behind-the-scenes tales to Good Will Hunting than we know. Here are four untold facts about the movie that stole our hearts: 

Secret sex scenes in the script
Matt Damon and Ben Affleck spent hours writing the academy-award winning script, so they wanted to make sure Hollywood's most notable studios were actually reading it. To make sure, the duo included sex scenes between Robin Williams' character Sean and Will Hunting (Matt Damon) deep inside the script.  

Many studios didn't even comment on the explicit sex scenes, and just handed the script back to them. It wasn't until Miramax's Harvey Weinstein said, "he would love to produce the film, as long as they agreed to take out the sex scene," according to Boston Magazine. The duo knew right away that he had actually read the whole thing, and Weinstein ended up producing the flick.

4 incredible untold facts about 'Good Will Hunting'

The farting wife scene was completely unscripted
One of the most unforgettable moments in the film was when Damon's character burst into laughter when Sean ( Robin Williams) was explaining a story about his wife farting in her sleep. As it turns out, the scene was completely ad-libbed by Robin Williams and that is why Damon's laughter seems completely genuine.  

4 incredible untold facts about 'Good Will Hunting'

Robin Williams nearly got robbed on location
As the movie was shot in Boston, actor Robin Williams wanted to get a feel for the city - including some of the most dangerous neighborhoods. Affleck described taking Robin out to the L Street Tavern one night; "I remember thinking, This is a fucking mistake. I mean, you gotta remember Whitey Bulger was still around and running things. And then it just turns into a mob scene. Guys got really drunk and wanted to fight me because I had my hat on backwards." But even after all of the cast members nearly getting mobbed, Robin insisted that, "We have to shoot this bar" to portray real-life Boston.

4 incredible untold facts about 'Good Will Hunting'

Characters were based off real-life situations
The role of Skylar (played by Mimi Driver) was based on Matt Damon's real-life ex-girlfriend Skylar Satenstein, who was also a student at Harvard. Sadly, the pair broke up before filming even begun. And the character of Sean (Williams's character), was inspired by a mixture of Ben Affleck's father and Matt Damon's mum.

4 incredible untold facts about 'Good Will Hunting'

4 incredible untold facts about 'Good Will Hunting'