A man threatened to attack his ex-girlfriend with a golf club because he was tired of “sofa-surfing”.
Michael Riddoch from Perth sent a volley of abusive messages to his former partner after their relationship broke down.
The pair had initially been discussing the exchange of personal property.
A lawyer acting for the 31-year-old said he was left sleeping at friends because he had been unable to get the keys to his flat.
Depute fiscal Bill Kermode told Perth Sheriff Court: “Discussion took place regarding the exchange of property.
“It started amicably but quickly the content of the messages became derogatory. He then began sending audio messages with similar content.
“In one he said ‘that’s it, I’m coming down to smash you’. He also said ‘I’m coming down with a golf club’.”
At 1.40am a neighbour at Riddoch’s flat called police to say he was kicking the block’s communal block, and at around the same time his ex-girlfriend reported the messages.
Solicitor Linda Clarke, defending, said the flat was Mr Riddoch’s and he had been attempting to get the keys back for some time.
She said: “The complainer had the only set of keys to Mr Riddoch’s property.
“He had repeatedly requested their return and arrangements had been made but had not been followed through.
“Mr Riddoch was sofa-surfing while waiting to get back into the property. By this point he had lost all sense and tried to get into the property without knowing whether or not she was there as he could no longer sofa-surf.”
Riddoch of Newhouse Road, Perth, admitted sending grossly offensive text messages and audio recordings to Miss Dowie on September 2.
Sheriff William Wood ordered him to carry out 80 hours of unpaid work. He also placed him on a supervision order and banned him from contacting his former partner.