A KILWINNING accounts manager pulled a gun on an ice cream seller as he tried to rob him of his takings - then sent him a Facebook message saying sorry.

And the message Ian Hamilton, 30, sent to Neil McIntyre, 31, proved to be his undoing - as he admitted he was responsible and revealed his identity.

Hamilton, who is understood to make around £26,000 in his job with TSB, approached McIntyre’s ice cream van as it was parked in the Pennyburn area of the town at 3.30pm on July 3 last year.

Hamilton asked for “20 fags” while holding his hand behind his back, then produced the weapon and said: “You’re getting robbed.”

Despite having the gun pointed in his face, McIntyre remained ice-cool.

He grabbed hold of the weapon and tried to wrestle it from Hamilton’s grasp while the panicked would-be robber repeatedly shouted: “Let go!”

Hamilton managed to keep hold of the gun and then made off, while McIntyre drove away from the scene of the attack and called police.

Hamilton was found asleep face-down on top of his bed, with the gun next to him, later that day by his girlfriend. She put it in the kitchen cupboard.

He had stolen the weapon, which was a ball-bearing gun, from his friend that morning during a drinking session.

But a sheepish Hamilton contacted McIntyre via Facebook the following morning to apologise - revealing his identity and admitting what he’d done.

His message, which he sent to McIntyre’s business page Neil’s Ices, read: “Alright bud. Just wanted to say soz for pointing that gun at you, it was only a toy.

“It’s a bit daft, I know, but I had a bevvy in me and I thought it was funny. I know it’s not, though.”

The details emerged on Tuesday when Hamilton appeared in the dock at Dumbarton Sheriff Court to admit his guilt over the offence.

Procurator Fiscal Depute David McDonald explained: “Mr Hamilton asked for, ‘20 fags’ and did not specify a brand.

“Mr McIntyre turned his back and retrieved a packet of cigarettes.

“As he turned back to face Mr Hamilton he heard Mr Hamilton say, ‘You’re getting robbed’.

“At this Mr Hamilton brought his right hand from behind his back and pointed what appeared to be a handgun in to the van, at Mr McIntyre.

“Mr Hamilton appeared to cock the weapon.

“Mr McIntyre grabbed the gun and tried to take it from Mr Hamilton.

“Mr McIntyre did let go and the struggle was over in a matter of seconds.”

Hamilton admitted assaulting McIntyre with intent to rob him by “presenting a firearm at him, stating he was being robbed and struggling with him.”

Sheriff Simon Pender called for background reports. 

Hamilton, of Dalgarrock, Pennyburn, Kilwinning, could be jailed for up to five years when he returns to the dock next month to be sentenced.