Residents in a Larkhall street watched helplessly as a man went on a late night wrecking spree.
Raygan Dunsmore damaged car wing mirrors and a CCTV camera before smashing plant pots.
When he was arrested he spat in a police officer's face.
Dunsmore, 23, of Saltire Crescent, Larkhall, appeared at Hamilton Sheriff Court on Friday.
He admitted maliciously damaging property and assaulting Sergeant Andrew Murray in Church Street on July 22 last year.
Chloe O'Hara, prosecuting, said residents were at home just before midnight when they viewed CCTV footage on a mobile phone.
It showed Dunsmore running on to the road outside their home and pulling at wing mirrors.
Ms O'Hara told the court: "The witnesses chapped their living room window and let him know they were phoning the police.
"The accused then went to their car and kicked a wing mirror.
"Another neighbour saw him grab a CCTV camera and pull it off the wall. Dunsmore then picked up a number of plant pots and smashed them.
"Police officers arrived shortly afterwards and arrested him. He was heavily intoxicated."
Defence agent Jackson Bateman said Dunsmore has had "a number of addiction issues", but pointed out: "He has been at liberty since this incident and there has been no further trouble."
Sheriff John Speir deferred sentence until November for background reports and an electronic tagging assessment.
Dunsmore was allowed to remain on bail.
Don't miss the latest headlines from around Lanarkshire. Sign up to our newsletters here.
And did you know Lanarkshire Live is on Facebook? Head on over and give us a like and share!