A topless man broke into the offices of construction giant Carillion and caused thousands of pounds worth of damage, a court heard.
Ashley Daker had been drinking before he targeted the building Wolverhampton Magistrates' Court was told.
A security guard spotted him inside the office building in Salop Street, Wolverhampton, at around 4.30am on April 25.
The 26-year-old was topless when he was caught in the reception area with the lights on around him.
Mr Roger Bleazard, prosecuting, said Daker had broken a glass pane on the front door, smashed a window and damaged fire extinguishers and other company property, causing a total of £2,700 worth of damage.
Mr Bleazard added: "The real victim is the owner of the property. They are going to have to put right what was damaged."
The security guard called police and Daker was arrested at the scene.
The court heard that Daker, of Ambrose Close, Willenhall, had been drinking with friends that night and had been depressed.
Magistrates were also told that he had previous offences to his name relating to drinking and damaging property.
Mr Richard Quinn, defending, said: "My client is quite content to bear the responsibility of what he has done.
"He has admitted his guilt at an early stage."
Daker pleaded guilty at an earlier hearing to a single charge of criminal damage.
Magistrates ordered him to pay £2,700 in compensation at a rate of £50 per week, as well as a £60 victim surcharge.
He was also ordered to undergo 12 months' supervision and to complete a low-intensity alcohol programme.
Sentencing him, Martin Fiddler, chair of the magistrates' bench, said: "There was a serious amount of damage of damage but obviously we realise it was out of character and we hope it is a one-off."Subscribe to our Newsletter