A Derbyshire teenager who has applied to join the Army pointed a gun at a cabbie having not slept for four nights from guzzling down energy drinks.
According to DerbyshireLive, Derby Crown Court heard how Nathaniel Rose, 19, pointed the weapon, which was an imitation, at a terrified taxi driver who called 999.
The previous evening Rose had targeted the exact same cabbie when he threw a lit firework under his car.
Handing Rose a 12-month custodial sentence, suspended for two years, Recorder Adrian Reynolds said: "I am sure you of all people, with your interest in the Army, must appreciate that society will be very concerned with people going around waving guns at innocent people?
"But you were very young when this happened and you have never been in trouble before. Therefore I regard what happened that night as out of character.
"Not many of us get to adulthood without making at least one mistake and I like to give young people one chance if they are made of the right stuff which I believe you are."
Gareth Gimson, prosecuting, said the two incidents took place in Buxton Market Place on consecutive nights last October.
He said the first saw Rose drive a car up to the parked taxi get of the vehicle "puff his chest out" and threaten to beat up the cabbie.
Mr Gimson said shortly afterwards the defendant threw the lit firework, which exploded, under the victim's taxi.
He said the following night Rose once again drove into the town with friends in his car and come across the same victim.
He said: "He drove up alongside him and pointed what appeared to be a handgun across his chest and towards his (the cabbie's) vehicle.
"An independent witness, who has a military background, then said she saw the defendant holding what she thought was a pistol out of the driver's window."
Mr Gimson said officers went to Rose's address, in Glossop, where he told them where they would find the BB gun, telling them his father did not know about the weapon saying "I thought it would be funny to p*** about with it".
The defendant, who was supported by his mother in court, pleaded guilty to possession of an imitation firearm and a public order offence.
David Watts, mitigating, said his client has applied to join the British Army and has no previous convictions.
He said: "He was spaced out and living on energy drinks at the time. (By the time of the first offence) he had not slept for four nights and was feeling the effects of sleep deprivation.
"That led to him behaving extremely inappropriately."
As part of the suspended sentence, Rose must carry out 100 hours' unpaid work.
Recorder Reynolds told him: "I feel very confident I won't see you again at court. You got your chance today, make sure you take advantage of it."