A serial offender tried to rob a bookmakers armed with a homemade weapon fashioned from a metal pipe, spring and a fountain pen nib.
Ross McLeod, 37, admitted committing the offence at Ladbrokes on Wellmeadow Street in Paisley, Renfrewshire, on April 7.
Manager Fiona Moffat told the High Court in Glasgow McLeod came into the branch and placed the six-inch device on the counter.
She saw a spring had been inserted into one end of the pipe and a fountain pen nib at the other.
McLeod told Ms Moffat "This is a hawd up, gies the money." He then pointed the pipe at her and said: "Gies the money or I'll blast you."
Ms Moffat called to her colleague to press the panic alarm and McLeod left the premises empty-handed.
The court heard police who viewed CCTV footage from the shop recognised McLeod and he was subsequently arrested.
Judge Lady Rae jailed McLeod for four years and two months and ordered he is monitored in the community for three years after his release.
The judge told McLeod: "You have an appalling record for a relatively young man. If you carry on like this you will end up spending all your life in prison.
"These types of crime are terrifying for the people involved. But for your early plea of guilty I would have jailed you for five years and six months."
The court was told McLeod has a string of convictions for assault, theft and robbery.
Defence advocate Tony Lenehan said: "Mr McLeod is assessed as being at maximum risk of reoffending. He is 37 with entrenched and lifelong offending behind him."