Alarmed neighbours called the police after watching Trevor Muirhead produce an air rifle from under his coat and start shooting.
Falkirk Sheriff Court was told on July 7 that witnesses thought he had been aiming at a television aerial on a nearby roof and heard five shots before watching him go back inside.
When officers arrived at 7 Yarrow Place, Grangemouth, on April 9 they noted he was under the influence “of something” and recovered the rifle from behind a couch.
He told them he was out shooting birds on the roof of a neighbour’s house because “they were making a racket”, but he was arrested.
In court, Muirhead admitted conducting himself in a disorderly manner by repeatedly discharging an air rifle in the street, concealing the weapon under his clothing and committing a breach of the peace.
Sheriff Derek Livingston placed him on a two-year supervised community payback order. The 40-year-old will also complete 100 hours of unpaid work in four months and attend for alcohol counselling and treatment.
His progress with the order will be reviewed on August 18 when Muirhead will also be sentenced for buying alcohol for a 15-year-old girl on March 18, sending abusive text messages to his ex-partner on June 14 that included a chilling threat to stab her, and assaulting a police officer.
Muirhead appeared in court from custody on Thursday.
The court was told he had kicked out at police as he was being put into the van then assaulted an officer after arriving at Falkirk Police Station on June 14 and been remanded since then.
Defence lawyer Simon Hutchison said Muirhead had a drink issue.
He said: “The common factor here is his alcoholism. He tells me he can wake in the morning and start drinking cans of lager. He has hit the drink hard since the death of his father.”
Sheriff Livingston warned Muirhead the community order was a direct alternative to custody.
He allowed his bail on the other offences to continue – with the added condition he have no contact with his former partner.