A man pressed the barrel of a pistol against a woman's head when she asked him for a lift home in Dundee, a court heard.
Ross Jackson claimed the incident was a practical joke but the "terrified" woman and her friend believed the imitation firearm was a real gun.
Jackson, 25, admitted a charge of assault on 10 June in Dundee's Court Street.
He was remanded in custody ahead of sentencing on 30 November.
Dundee Sheriff Court was told Rebecka Kean and Anna Moir had gone to Jackson's after being told there was a party there.
When they arrived, Jackson told them there was no party and got into a friend's car.
When Miss Kean approached the car to ask for a lift home Jackson rolled down the window and pulled a black, long-barrelled handgun from the pocket of his jumper.
Depute fiscal Vicki Bell told the court: "He then removed it and put the barrel onto Miss Kean's forehead.
"She could feel cold metal. The accused and the car's driver began laughing."
Miss Bell said that Jackson swore at the women before pointing the pistol at Miss Moir then back to Miss Kean.
The fiscal said: "She was terrified and froze as it was pointed.
"She was crying and saying she couldn't breathe.
"Miss Moir was physically sick as a result. They both believed it was a real handgun."
Solicitor advocate Jim Laverty, defending, said: "This was a prank which was misjudged, ill-conceived and he now appreciates caused significant fear and alarm.
"He concedes that what he saw as a prank and a joke wasn't taken that way and must have been a frightening experience for the two individuals concerned."
Sheriff Alastair Carmichael told Jackson: "Having looked at your record and seen the nature of this offence, it's highly likely you may end up with a custodial sentence."