An ex-stock trader from Australia recently admitted he led a “double life” in which he would “get boozed at lunchtime” and rob banks.

Ross Oliver McCarty, 70, pleaded guilty last week to four robbery charges related to a string of stick-ups across Sydney in 1977 and 1978, Australia’s ABC reported.

He wasn’t caught until 40 years later, in 2018, when detectives reopened the cold cases and used fingerprint analysis to track him down.

When McCarty was in his 20s, he’d carry a water pistol and wore various disguises, including sunglasses, hats and mustaches to target several different banks during his lunch hour.

“Those were boozy days … everybody would drink at lunchtime,” he told detectives, according to court documents cited by the outlet.

He’d walk up to the tellers and hand them notes written on withdrawal slips, demanding cash and warning that he was armed.

“No funny business,” one of the notes read.

Then, he’d “dump” the disguises and “just walk back to the office,” he told cops.

McCarty said he needed the money to pay off gambling debts and cover living expenses.

“It kind of snowballed … the more I did the worse I felt about the whole thing and [it] was leading a double life,” he told cops.

The only person he ever confessed his crimes to, apart from the detectives, was his Alcoholics Anonymous sponsor who “took [the secret] with him to the grave.”

He stopped robbing banks when he quit gambling and got a “really good job” in 1979, he said.

McCarty was initially charged with eight robberies in which a total of $12,693 was stolen, usually between $1,000 and $2,000 at a time.

Two of his charges were withdrawn last week while another four, for which he hasn’t yet entered pleas, have been transferred to a different court.