Police stopped a suspicious man in Grantham and found nine wraps of heroin and crack cocaine on him.
Andrew David Robinson, 25, was stopped in Harlaxton Road, on August 10 last year by police officers.
As he was being approached he texted friends to say he was being stopped and searched.
When asked what he had, he told the officers he had some “brown and white”.
Jim Clare, prosecuting, told the court that Robinson admitted to police buying the wraps but would not say where he got them. He said Robinson had been taking controlled drugs for eight years and had been on a Methadone programme for several years.
When he was arrested, he was on his way to his mates to score and share.
Rory Macmillan, defending, said Robinson had not bought the drugs with the intention of selling them and making money.
He was going to share them among his friends, payment or not, and that was why he was found with slightly larger amounts than would be the case if it was solely for his own use.
The court heard Robinson had referred himself to Addaction 18 months ago and was on a Methadone programme.
They were helping him with an application for accommodation in Grantham because he wanted to find work which was difficult in Ancaster where he lived with his parents in Water Lane.
Robinson admitted possessing crack cocaine with intent to supply and possessing heroin with intent to supply.
He was given a community order which included 12 months supervision and six months of drug rehabilitation.
He was ordered to pay £85 costs and the drugs were ordered to be destroyed.