A 52-year-old man who left a casino to rob a bank before returning to continue gambling, has pleaded guilty to second-degree robbery.

Kerry Johnson had been at the Mardi Gras Casino in Nitro, West Virginia on August 2nd, when he put down a $25 chip to hold his spot.

Prosecutors said Johnson then drove 13 miles to City National Bank in Charleston, and gave tellers a note saying he had a bomb and a weapon and demanded cash.

Scroll down for video

Overplayed his hand: Kerry Johnson, 52, pleaded guilty to second-degree robbery on Wednesday after robbing $5,000 from a West Virginia bank in August so he could continue playing blackjack at a local casino

He told a judge on Wednesday he had taken quite a few drugs the day of the robbery, but recognized himself after seeing video from the bank.

Johnson admitted that 'most of the day was a blur,' and that he did not remember when left the casino to rob the bank, the Charleston Gazette-Mail reported.

'I knew it was me,' he said after seeing surveillance footage of himself from the bank.

Johnson, who has been in South Central Regional Jail since his arrest, is facing five to 18 years in prison when sentenced in March.

Johnson had been at the Mardi Gras Casino in Nitro when he put down a $25 chip to hold his spot before leaving to rob a bank

Prosecutors said he drove 13 miles to City National Bank in Charleston where he fled with $5,000 cash

On that Tuesday in August, Johnson fled with $5,000 in a green Mazda Miata and returned to the blackjack table to keep gambling.

While acting on a tip, police arrived at Johnson's home and spotted the same car in the driveway. They also found a yellow legal pad that matched the note he handed the bank teller.

Authorities found a stash of money in between Johnson's couch cushions and about $500 of the stolen money was found back at the blackjack table.

Upon his arrest, Johnson told police he had been making $10,000 a month, but had no money because of his gambling problem.

According to his employment history, he owned his own marketing company for 11 years.