A schoolboy described as a "model pupil" has admitted robbing a bank with an imitation firearm.
The 15-year-old, who cannot be identified for legal reasons, acted like a "real-life video game" when he carried out the raid and was motivated by "greed", Liverpool Youth Court was told.
The boy held up a branch of Barclays bank in Breck Road, Liverpool, on Friday afternoon and made off with more than £2,000.
But he was turned over to the police by his mother who was shocked to find a stash of cash, stained with dye, and a fake firearm in his bedroom.
The boy's mother wept at the back of the court as her son, wearing a black suit, white shirt and tie, was brought into the dock where he entered his guilty pleas after confirming his name, age and address.
Sending the case to Liverpool Crown Court for sentence, District Judge Ian Lomax said: "This is a very serious matter. It's an armed robbery but not in the conventional sense most people would recognise. It's a bizarre, surreal case of a young man almost acting like a real-life action video game. Nevertheless it was a robbery."
The court heard that the boy was a "model pupil" at school and was not known for misbehaving.
After his arrest he told police he carried out the robbery because he was envious of other people's material possessions, the court - sitting at Liverpool Community Justice Centre - heard.
Mr Lomax said his crime was "motivated by greed and immaturity" and by "whatever influences" he had been under in recent time.
The judge said those influences may include "another pupil or something you have been watching or playing."
Debra Chan, prosecuting, told the court that the robbery was carried out at the bank at 11.45am on Friday when a man was seen walking into the bank wearing a black Parka-style coat, with the hood up and scarf pulled up to cover his face.
She said the man produced a black handgun, went up to one of the cashiers and said "I'm not f****** messing around", before handing a bag over to the cashier.
The robber said "Fill that up with money" before adding: "Don't do anything stupid. I have just got out of prison after five years."
The cashiers filled the bag with a "dummy bundle" which is designed to detonate and spray dye over the cash when it leaves the building, Miss Chan said.
The court heard that the boy's mother discovered the money while she was tidying his bedroom on Sunday.
She then discovered a yellow bag containing a gun.
Miss Chan said she called her family together and placed the items on the coffee table in the living room and asked her son where they had come from.
The boy immediately admitted what he had done and the family took the boy to the police, the court heard.
He told police: "I robbed it (the bank) with a BB gun."
The boy also told officers that he planned the raid and went on a stake-out of the bank a couple of days beforehand and he targeted a bank because he thought it would provide him with the "most money".
Miss Chan said: "He wanted the money because he was envious of other people who had material things he wanted."
The court heard that the boy pointed the gun at two cashiers and a member of the public "so that he was not attacked from behind".
Miss Chan said the two members of staff at the bank were traumatised by their ordeal but were not injured and, during his police interview, the boy apologised for what he had done.