A novice armed robber hatched what he thought was the perfect plan to get money by targeting a small store in a rural village.
But bungling Dylan Frew left his carefully drawn-out plan behind in his home and it was discovered during a police raid after the attempted robbery.
He was also easily identified after putting on a balaclava during the knifepoint raid and then removing it in front of a witness shortly after fleeing the shop.
The teenager now faces being locked up for a lengthy period after he admitted carrying out the offence, which saw him leave the scene empty-handed.
Frew, 19, Lowes Court, Scone, admitted assaulting Marian Middleton at the Stanley Convenience Store on June 26 by donning a balaclava and trying to rob her while brandishing a knife.
Frew had drawn up a plan in advance on how to rob the store, including details of his escape route to get away with the money he expected to steal.
He put on a balaclava and entered the store shortly after 5pm.
He showed the knife to Ms Middleton and demanded that she hand over the takings to him.
However, he fled on foot when she refused and a short time after leaving the shop he pulled off the balaclava.
He was clearly identified by a witness who saw him reveal his face.
Police officers carried out a raid on his home a short time later and found his robbery plans stored in a safe.
There was also a gap in the kitchen knife block from which he had taken his weapon.
At the time, Police Scotland said: “The robbery was unsuccessful, with the male exiting the store and running towards Perth Road and then towards Linn Road.”
Detective Inspector Ray Birnie, of Tayside Division CID, said: “Thankfully the staff and customers, whilst understandably greatly shaken, were not physically injured during this attempted robbery.”
The court was told Frew was a first offender and sentence was deferred for the preparation of social work reports.