A heroin addict robbed and threatened to stab a man who was using a Kennoway cash machine early in the morning.
Andrew Wilson, 32, bragged he had “just pulled a blade on someone and got money from them” after the incident in the town.
Depute fiscal Claire Bremner told Dunfermline Sheriff Court the victim had left home at around 4.50am to go to work and stopped to use an ATM.
The man took out £50 when he became aware of Wilson behind him touching his jacket then saying, “hand over the money or I will stab you”.
Wilson took the £50 then asked for more money.
The victim used his bank card again and selected the £20 option.
The depute fiscal added: “As he selected that option the accused leant forward and tried to select the £100 option.
“However, £20 came out and this was taken by the accused who then told the man to walk up the road with him or ‘I will do you in’.”
Defence solicitor David Bell said although the stab threat was made his client was not armed at the time.
He said his client was at “rock bottom” at the time, spending around £60 a day to feed his heroin habit.
Wilson admitted assaulting and robbing William Paterson at the Co-operative Group in Bishops Court, Kennoway, on December 18.
He also admitted possessing heroin on the same day at Victoria Hospital, Kirkcaldy.
He admitted two further charges of stealing from Co-operative stores in Markinch and Methil.
Sheriff Craig McSherry jailed Wilson for a total of 26 months.