Nathan Hirst also threatened to cut off a woman's hand during the incident in Wakefield.
-> Mosque and Sikh temple in Leeds set on fire in arson attacksLeeds Crown Court heard Hirst, 28, stole a meat cleaver after walking into a woman's home near to where he lived.
Michael Collins, prosecuting, said Hirst was friends with the woman on Facebook but they had only spoken to each other on three occasions.
Hirst walked into her home on September 29 last year as the woman was in the kitchen with her sister.
He was told to go and left but returned.
-> Family desperate for news of Leeds restaurant chef who went missing on a night outHe let himself into the property when she was in the bath.
Mr Collins said Hirst went into the bedroom and laid on the bed.
He was told to leave and went to the kitchen and picked up the meat cleaver.
The woman's sister returned to the house and he threatened to cut off her hand.
Hirst then left and approached three teenagers, asking them to them to buy him alcohol from a shop.
One of the boys refused, saying he was only 16.
Mr Collins said: "He (Hirst) told him to put his fingers on the wall and lifted the meat cleaver as though he was going to chop down on his hands."
The teenager removed his hand from the wall and Hirst approached one of his friends.
He told the boy to put his fingers against some railings but he refused.
Hirst was arrested after one of the boys told his mother about the incident.
-> Traffic trapped on M62 after four HGV smash closes Leeds motorwayHirst, of Guys Croft, Lupset, Wakefield, pleaded guilty to affray, theft, common assault and having a bladed article.
Aubrey Sampson, mitigating, said Hirst had been drinking heavily at the time of the offences.
He added: "It may come as no surprise when I tell you that the defendant can recall very little about this incident."
The case was adjourned for a probation service report to consider whether Hirst is suitable to attend an alcohol treatment programme
Recorder Simon Eckersley warned Hirst that a prison sentence would be imposed when he returns to court on June 25.
He said: "The only question is whether it can be suspended. I make no promises."