An addict smashed a takeaway worker's car window with a hammer in the early hours as he was desperate to raise cash for drugs, a court heard.
Darren Rushton didn't get to steal anything as he was arrested after a man had been seen swinging an object at the driver's window of the Toyota Avensis.
The 39-year-old, who has served time and has a "bad record" had recently been homeless. He was now in supported accommodation and getting help.
Rushton had been out of trouble for some time before the offence.
Mr David Leach, defending, told Burnley magistrates nothing was taken from the vehicle. Recently, Rushton had been back on drugs and was homeless.
The solicitor continued: "On this particular evening, he was in desperate need of drugs."
The solicitor said: "He puts this down to a lapse because he couldn't raise sufficient funds and benefits were not in place."
Mr Leach said the defendant had been referred to Inspire, the drugs treatment service.
The solicitor told the hearing: "He says he's had appointments, but still has not got his methadone prescription up and running."
Mr Leach added: "He has now managed to find himself suitable accommodation, with a support worker."
Rushton, of Mitre Street, Burnley, admitted vehicle interference and going equipped for theft in the town, on February 23rd.
He was given a six -week curfew, between 7pm and 7am, every day. The defendant was ordered to pay £100 compensation, as well as £85 costs and an £85 victim surcharge.