A 22-year-old man cried in the dock as he was sentence for possessing drugs he intended to supply to others in a Mansfield club.
John Allen, of Brunner Avenue, Shirebrook, Mansfield, was spotted by a doorman in the Lexis club at around 3am on February 2, 2019.
Nottingham Crown Court heard on Tuesday, July 27, he was in the toilet and appeared to be sniffing white powder from his finger.
He had 35 small bags of white powder on him and clear bags with 12 tablets inside.
The white powder was cocaine, potentially worth £700, and the tablets, worth £90, were Ecstasy.
After his phone was seized and examined, it was found he allowed buyers to run tabs and instructed others to sell for him.
A proceeds of crime mention hearing has been listed for October 22.
He pleaded guilty to possessing cocaine and Ecstasy with intent to supply.
Judge Steven Coupland, who sentenced him, said: "John Allen, as long ago now as February 2019, you were found in a club not only taking drugs yourself, but with a sizeable quantity of drugs on you intended to supply to other people".
He said Allen was 20 at the time, effectively of good character, and the offences were two-and-a-half years ago.
"You have stopped taking drugs as a result of the shock of being arrested," he said. "You have been working hard with your dad and your own business, working six days a week.
"You have care and responsibility for other people in your family and have done charity work and are now in a settled relationship".
Allen left court with a two-year prison sentence, suspended for two years, and 300 hours of unpaid work and a requirement to pay a victim surcharge.
To read all the biggest and best stories first sign up to read our newsletters here.