A robber put a pillowcase over his head to hide his identity – then had to take it off as he could not see.
Matthew Davies stormed into the Bank of Scotland branch in Bothwell Street, Dunfermline, armed with a meat cleaver last September.
The 47-year-old pulled the weapon from a pillowcase before putting the bedding item on to cover his face.
A hearing at the High Court in Glasgow was told Davies had to quickly remove it.
Prosecutor Stewart Ronnie said: “This was due to a failure to create eye holes.”
Davies still managed to get his hands on almost £2,000 before sauntering off and then petting a dog.
He is now behind bars after he pleaded guilty to a charge of assault and robbery.
Davies will be sentenced next month.
He raided the bank at around 9am on September 23 and told a cashier: “Give me the money. I am f***ing warning you.”
Davies was initially given around £300 but demanded more cash.
He motioned towards a female customer and stated: “I don’t want to f***ing hurt her.”
Davies then repeatedly battered a glass partition at the counter with the meat cleaver.
He grabbed a total of £1,980 before a man going into the bank bravely decided to tail the robber as he escaped.
Mr Ronnie said: “He (Davies) was described as walking slowly, even stopping to pat a dog.”
Davies was followed to the street where he stayed.
He was still at his home when police arrived and found cash and a pillowcase “consistent with what he put over his head”.
They also discovered a stun gun which Davies additionally admitted possessing.
Kevin McCallum, defending, told the court the case involved “slightly unusual circumstances”.
Lord Turnbull remanded Davies in custody pending sentencing on February 21 in Edinburgh.
Police had swooped on the Bothwell Street branch of Bank of Scotland after the robbery.
Local people reported a “massive” police presence in the area and occupants of nearby buildings were told to lock their doors.
Fife Council employees at New City House in Edgar Street were among those put on lock down, with staff told not to leave the building.