A 15-year-old re-enacted a 'real-life video game' to rob a bank of £2,000 with an imitation gun.
Liverpool Youth Court heard how the teenager copied the game with an elaborate plan involving holding up two bank cashiers and a customer at gunpoint.
But it was foiled two days later by his mother who found cash, stained with dye, and a fake firearm in his bedroom. She handed her 'top set' pupil son over to police.
The raid took place at the Barclays branch in Breck Road, Liverpool, last Friday.
Debra Chan, prosecuting, told the court the teenager was seen walking into the bank at 11.45am wearing a black Parka-style coat, with the hood up and a scarf covering his face.
The boy, armed with a black BB handgun, or air gun, went up to one of the cashiers and said: "I'm not messing around", before handing over a bag.
He said: "Fill that up with money", adding: "Don't do anything stupid. I've 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, said Miss Chan.
The court heard the boy's mother found the cash and later a gun in a yellow bag while she was tidying his bedroom on Sunday.
She then gathered 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 him to the police.
The court heard that he told officers: "I robbed it with a BB gun."
After his arrest the teenager said he carried out the robbery because he was envious of other people's material possessions, the court heard.
Sending the case to Liverpool Crown Court for sentence, District Judge Ian Lomax said: "It's a bizarre, surreal case of a young man almost acting like a real-life action video game."
Miss Chan said the two bank staff were traumatised by their ordeal but were not hurt and, during his police interview, the boy apologised for what he had done.
He will be sentenced on 15 October.