He then walked away and waited for the next user to play and leave the machine before returning, pulling the chewing gum away and collecting the coins that had been blocked behind it.
The coins were the winnings of the person who had used the machine, not knowing it had been tampered with.
Moodley repeated the scam on at least three other poker machines. He was arrested after security guards spotted him on CCTV cameras.
He pleaded guilty to a charge of cheating in a casino on Monday.
Court documents said Moodley knowingly contravened the rules of an authorised game, namely an electronic poker gaming machine, with the intention of obtaining any pecuniary advantage for himself.
It was unclear how much money Moodley stole during the course of his scam.
He was convicted and fined $500 and ordered to pay court costs of $130.
A police source said the offending was the first of its kind in New Zealand. People have been convicted of cheating at the casino in the past, but Moodley's method had not been seen before.
They could not say what exact machines he tampered with.
SkyCity said they took cheating very seriously.
"This sort of offending is very unusual," a SkyCity spokeswoman said.
"But our stance is always clear - we have zero tolerance for cheating and theft.
"We work with the authorities to prosecute and trespass these individuals."
She could not say whether Moodley had been banned from the casino.
"In accordance with the Privacy Act we are unable to release details on Mr Moodley's status at our casino, but we have dealt with the incident appropriately. The amount involved was negligible."