A driver was attacked by a drug addict who went into his car when it was stopped at traffic lights in Cowdenbeath.

Kieran Heggie also tried to get into another car, as well as twice exposing himself during a day of repeated offending.

However, Heggie, 21, of Carden Avenue, Cardenden, managed to avoid a jail sentence when he appeared for sentencing at Dunfermline Sheriff Court.

He admitted a series of crimes committed on March 8.

At Perth Road, Cowdenbeath, at temporary traffic lights, he entered a stationary car uninvited, adopted an aggressive attitude towards the driver, seized a car key, made demands and punched him in the face.

At Lochleven Terrace, Kelty, he exposed his genitals towards police officers and intentionally exposed his penis.

At Balgonie Grove, Cardenden, he repeatedly exposed his penis, urinated, approached a car driven by a man, tried to open the door, demanded entry, made a sexual comment to him then loitered in the area.

Depute fiscal Amy Robertson said police had been called to Heggie who was on a road near Cluny at 10.45am.

He was under the influence and asked to be taken to his dad’s home. They did this and on getting there Heggie dropped his trousers in the street exposing his penis.

At 3.45pm a man had arrived home in his car when Heggie approached the vehicle. The man saw Heggie urinating with his tracksuit bottoms pulled down.

Walking to the car, Heggie said: “Let me in. I have a big c**k.” The man drove off.

At 1pm, another man had stopped his car at traffic lights. Heggie was standing at the side of the road thumbing a lift. He approached the passenger door and got in.

He demanded to be taken to Glenrothes and when the driver refused to do so he was punched in the face.

Heggie later claimed he could not recall the incidents saying: “Ah wis oot ma nut”.

Defence solicitor Kerr Sneddon said his client had become addicted to ketamine.

He went on: “He got himself out his nut so it’s his fault. It’s not a good idea to take what is a horse tranquiliser.”

Mr Sneddon said Heggie was now suffering from ketamine bladder syndrome as a result of his addiction.

Sheriff Garry Sutherland imposed a community payback order with 160 hours of unpaid work.