Imagine striking it rich in a casino and then being told that the state is seizing your winnings.

That's what's happening in places like Iowa, where the state collects unpaid debts from gambling winners at casinos and racetracks, the Des Moines Register reported. These unpaid debts range from child support to court debts and income taxes.

Iowa casinos are required to check if gambling winners owe state debts before awarding jackpots of $1,200 or more; if the winner is a debtor, the casinos deduct unpaid debts from the winnings, according to the Des Moines Register.

Iowa has collected about $5.1 million in unpaid debt from nearly 3,800 gamblers over the past two years -- that comes out to an average of $1,300 per gambling winner.

Iowa has a similar law for people that win lottery prizes worth at least $100.

Seven other states that collect unpaid state debts at casinos include Colorado, Indiana, Louisiana, Mississippi, New Mexico, New Jersey and West Virginia, according to the Des Moines Register.

Colorado -- which enacted the country's first casino child support law -- has been collecting unpaid child support from gambling winners since 2008, according to the Denver Post. In 2010, one gambling winner lost their winnings to the state 11 times.

As of last year, gamblers in Louisiana that win more than $1,200 and owe unpaid child support lose their winnings to the state, according to WBRZ.

Illinois has been unable to pass a similar law because of opposition from the casino lobby and doubts from the state agency that collects child support, according to the Chicago Tribune.

"These people are taking their kids' money and they are throwing it in a slot machine," said Joel Judd, a former Colorado congressman who wrote Colorado's child support casino law, in an interview with the Chicago Tribune.