Ben Affleck has inked to pen and star in “Balling the Jack” for New Line Cinema, the studio announced Tuesday.

Chris Moore is attached to produce. New Line has the pic on a fast track under senior VP of production Mark Tusk.

Film, based on Frank Baldwin’s novel, is a comedy about a New York paralegal who escapes his dreary life through gambling. When one high-stakes bet goes awry, his career, girlfriend and life are seriously threatened. The title refers to gambling parlance for laying everything on the betting line.

Affleck stars with Robin Williams in the upcoming “Good Will Hunting,” which he co-wrote with Matt Damon.

He also was recently cast in “Armageddon” with Bruce Willis under helmer Michael Bay. Other thesp credits include “Chasing Amy” and “Going All the Way.”

“With Affleck on board, we’re betting on a sure thing,” said Michael De Luca, president of production for New Line. “In a relatively short period of time, Ben has quickly established his skills as both a writer and an actor.”

Affleck’s deal was brokered by CAA agent Patrick Whitesell.

Follow @Variety on Twitter for breaking news, reviews and more