Ice CubeAlthough Ice Cube’s new movie, Lottery Ticket, isn’t set to drop for another week, it’s already seeing legal trouble.

According to TMZ, a screenwriter has filed a lawsuit claiming his agent ripped off his idea and gave it to one of his other clients.

Tom Huang, who previously wrote an episode of “The Mullets” back in 2003, filed his lawsuit in Los Angeles on Wednesday (August 11), claiming his agent Brad Kaplan stole the film’s idea.

In court docs, Huang claims he came up with an idea for a movie back in 2004, wrote a “treatment” for it … and talked it over with his agent Brad Kaplan. From there, he says Kaplan stole it and gave it to his client Erik White .. who went on to write and direct Lottery Ticket.

Huang claims the film ripped off various elements from his original treatment — including “detailed plot elements, characters, and scenes.”

He is suing for an undisclosed amount. However, Huang states in the legal documents that he believes Lottery Ticket will make millions at the box office.

Lottery Ticket hits theaters August 20th.