A man went to battle with a machine and it was all caught on camera.

Cocoa police say the man attacked an ATM because it gave him too much money.

Michael Oleksik was arrested and charged with criminal mischief after surveillance cameras caught him attacking a Wells Fargo ATM in November.

Oleksik told police he was in a hurry to get to work and became frustrated the machine when it began giving him more money than he requested.

He told police he didn't know what else to do and took his frustration out on the atm.

His attack caused at least $5,000 in damages.

Police say Oleksik called the bank manager and apologized.