Liam Bulmer, 27, squandered hundreds at the Ladbrokes betting shop in Whitby and went back in later in the day, brandishing the “wicked” weapon as terrified staff handed over £320 in cash, York Crown Court heard.
Bulmer - who was on the east coast for a camping trip with his girlfriend - then fled with the loot and changed his clothes in a nearby alleyway.
He then hopped on a bus where he was stopped by police, said prosecutor Anne Richardson.
She said the robbery occurred in the middle of the day, on a busy street and in front of startled customers at the bookies on New Quay Road.
The knife-wielding punter, wearing a backpack, told staff he had lost £500 earlier that day “and wanted it back”, she added.
“When staff told him that’s not how the shop worked, he produced a knife and demanded money, telling them to put it in his bag,”said Ms Richardson.
“They handed over approximately £320 and he left. He was later detained by police on a bus leaving Whitby.
"He immediately admitted having a knife in his bag.”
Officers also found the stolen cash inside the bag, along with “numerous” betting slips and camping gear including a tent and sleeping bag.
Ms Richardson said the slips showed that Bulmer had wagered and lost his entire £500 stake at the betting shop earlier that day.
Video footage from the bookies showed Bulmer running to a nearby alleyway where he changed his trousers and top to disguise himself, but CCTV operators guided police to the robber who caught him on a bus leaving Whitby.
Ms Richardson said that Bulmer, from Redcar, was in Whitby on a camping trip with his girlfriend but they had fallen out after he squandered the money at the bookies.
The £500 lost by Bulmer was for the camping trip which fell through because of his dismal failure at the bookmaker’s.
His “furious” girlfriend said she wanted to break up with him, which prompted his decision to go back to the bookies with the hunting knife and get his money back.
Ms Richardson said Bulmer waited for about an hour before going into the shop and pulling the knife out.
She said Bulmer was talking to an elderly man inside the shop just before pulling the knife out and demanding money from staff.
One of the two male staff members told police he was “very shocked” and that the “adrenaline was running through him” when he saw the blade.
Bulmer, of Strauss Road, South Bank, was charged with robbery and carrying a knife.
He admitted both offences, which occurred on April 7, and appeared for sentence on Wednesday May 11.
Nick Peacock, mitigating, said it was a “strange case” because Bulmer had never behaved in any such manner before, although he did have a previous caution for criminal damage on his record.
He said Bulmer started gambling in November last year and “the amounts (he wagered) got bigger, and the losses have got bigger, culminating in the £500 bet (in Whitby) which he lost”.
“His girlfriend was furious (and) he decided the best thing to do was go back (to the bookies) and regain his lost money by committing the robbery,” added Mr Peacock.
“He’s thoroughly ashamed of himself.”
He said Bulmer had since been reconciled with his girlfriend but was resigned to a prison sentence.
Judge Simon Hickey told Bulmer: “You took that rather wicked weapon into Ladbrokes. #
"Staff and members of the public were shocked.”
Bulmer was jailed for three years. He will serve half of that sentence behind bars before being released on prison licence.
Det Con Rachael Hughes, of Scarborough and Ryedale CID, said: “It’s pleasing that Bulmer has been handed a three-year prison sentence as it reflects the serious nature of the crime he committed.
“He caused significant trauma to the betting shop staff members who he targeted in the robbery while holding a knife.
“Thankfully, Bulmer was arrested within the hour as we were able to track his movements through Whitby with assistance from the CCTV operators.
"He was attempting to get back home to Teesside using a public bus when the Firearms Support Unit intercepted the vehicle on the A174 north of Lythe.
"He was safely detained and the stolen money and knife were recovered.”