Everyone loves a Kevin Smith story. They take you to the best and weirdest parts of Hollywood at times.

In his new book, Kevin's Secret Stash, the director tells a story about how Harvey Weinstein pulled Good Will Hunting from theaters early just so he wouldn't have to pay Robin Williams back end on the movie's gross. 

In an interview with The Daily Beast, Smith told the whole story.

“It was doing incredibly well, and the deal that they’d made with Robin was a high-percentage first-dollar gross—a movie-star deal—and it was great, because instantly by putting Robin in the movie their pre-sales paid for the whole fucking film. So, the movie was paid for and then the movie was making money hand over fist and made over $100 million. From what I remember, Robin’s split would be even greater and he’d get a bigger percentage if it crossed $100 million, so every dollar the movie made at the theatrical box office would have to be split—I’m not sure if it was a 50/50 split—with Robin Williams.”

This is obviously a bonkers deal, but one you make to get a movie star into what you think will be a small film without any legs.

Boy, was Weinstein wrong. The movie was insanely popular and crushed the box office. It even got Oscar noms, earning Williams a Best Supporting Actor statue. It had a $10 million budget but earned over $200 million at the box office.

Smith continued the story, saying, “I was on the movie as a co-executive producer, so we were privy to some details, and I remember the day when Good Will Hunting was leaving theaters and it felt weird because it was like, ‘Wait? There’s all this Oscar buzz, so why would you pull it if it was just making money?’ And they did it because keeping it in theaters meant that more of the money would go to Robin, whereas the moment it went to video the split wasn’t Robin-heavy. It was hamstrung because [of] greed.”

Want more stories like this? Check out Kevin Smith's book. And let us know what you think in the comments.