Two men who plotted to kill a rival were snared after police cracked encrypted messages discussing the plan.
Gerald Gilmour, 35, and Martin Mullen, 34, targeted Robert Ross as they sourced firearms for the hit.
The pair communicated via Encrochat – the platform favoured by criminals.
But, after the messaging service was smashed by French and Dutch law authorities in 2020, the kill bid was foiled.
Police went on to discover a Glock pistol and a shotgun – said to have been used in a previous murder – at a house linked to Gilmour.
The pair today appeared at the High Court in Glasgow.
Both pled guilty to a charge of conspiracy to murder at the hearing.
The crime spanned between 5th May and June 2020 listing addresses in Paisley, Renfrewshire and Larkhall, Lanarkshire.
They were remanded in custody pending sentencing next month.
Target Robert “Bob” Ross was said to be part of a “rival organised crime group”.
In April 2020, Mullen, of Paisley, stated in a text to an associate how he would like him “chopped”.
Mullen later claimed Gilmour said he would “do that Bob Ross”.
Gilmour was later in contact with the head of his crime mob.
The prosecutor told the court: “They discuss the job, weapons involved, payment and an Encrochat phone being sourced for Gilmour.”
Mullen and Gilmour discussed the “pros and cons” of using a Glock pistol or a shotgun.
Gilmour further revealed his “hatred” for the target.
Mullen later stated “because people are wearing masks, this is a good time to do the job” – referring to one the then pandemic measures.
The prosecutor added: “On 30th May, Gilmour looks to source ammunition for a shotgun.
“He tells Mullen it was used in a previous shooting referencing a recent murder.
“Gilmour states that he was directed to it by the perpetrator of the recent crime.
“It was rusty, but he checked that it was operational.”
Arrangements are then discussed for delivery of a Glock and bullets.
The firearm is delivered in a bag by associate Alistair Douglas, 56, to Gilmour at a pub.
Douglas was said not to have known what was in the bag when he delivered it to Gilmour at the pub.
But, later that same day, Gilmour was held at a house in Lanarkshire.
He told police: “What you find here is mine.”
He directed police to the Glock hidden in the loft. It was in a bag with the writing: “Thank you – have a nice day”. Ammunition was also seized.
A wooden handled shotgun was discovered in a shed.
A total of £115,350 of heroin and £52,035 of street Valium was further found during the raid.
Alistair Douglas, also of Paisley, today pled guilty to involvement in serious organised crime which included delivering the Glock to Gilmour as well as the trafficking of drugs.
Gilmour admitted to the same crime, while Mullen pled guilty to a separate charge of directing organised crime involving drugs and guns.
It emerged Gilmour had previously been jailed for eight years for attempted murder in 2011.
Judge Douglas Brown remanded all three in custody as sentencing was deferred for reports.