No one was injured in the terrible incident but there could have been tragic consequences, Oban Sheriff Court heard
Surgery staff noticed her smelling of alcohol, being unsteady on her feet and having to hold herself upright by leaning on a wall
The man jumped to one side and hid when he was spotted at the bedroom window, Oban Sheriff Court heard.
The 17-year-old from Oban, who can not be named for legal reasons, had wanted to get a refund for the gift from his mum to raise enough money to travel to Glasgow in the hope of getting more gifts from other family.
Defence solicitor, Kevin McGinness, said Modzelewski was a person of previous good character and his actions that night had been out of character because of alcohol.
Wojciech Modzelewski, 31, of 92 Great Northern Road, Aberdeen, appeared at Oban Sheriff Court earlier this week.