A court heard Kamren Gay admitted to officers that he had been selling Nitrous Oxide - also know as laughing gas - to others for £10 a time.
-> The unbelievable reason Saharan dust could be covering your car A judge who gave Gay a suspended prison sentence said: "This is far from a laughing matter."
Leeds Crown Court heard police followed Gay as he drove his Mazda into the McDonald's car park in Bramley, Leeds, at 2am on May 19 this year.
Alisha Kaye, prosecuting, said the officers became suspicious as Gay had two mobile phones which were constantly ringing and had over £1,000 in cash beside him.
The officers searched the boot and found 360 canisters of nitrous oxide in 15 boxes.
Gay, 20, later told officers that he ordered the canisters on the internet, paying £200 for 25 boxes, and sold them individually for £10.
Gay, of Rossefield Walk, Bramley, pleaded guilty to possession of a psychoactive substance with intent to supply.
The Psychoactive Substances Act came into effect in May 2016, making it illegal to supply or import nitrous oxide for human consumption.
A probation officer told the court Gay had lost his job as an apprentice engineer as a result of the conviction but had received the offer of a new job.
Nicholas Hammond, mitigating, said: "He is hoping to put this stupidity behind him.
-> Leeds sex offender sent back to jail after posing as woman to talk to teenage girl"He fully intends to continue to work, commit to get on in life and contribute well to society."
Describing the offending, Mr Hammond added: "It do not like to use the phrase, but 'party drug' is often what they are described as.
"He was earning a good salary and he was buying it in bulk and selling it to friends."
Gay was given an eight-month prison sentence, suspended for 18 months.
He was also ordered to take part in a 10-day activity requirement and do 200 hours of unpaid work.
Recorder David Gordon told Gay: "I have to deal with you in relation to a single offence of possession of a psychoactive substance with intent to supply.
"It is very far from a laughing matter. The supply of drugs is a serious matter and is always regarded as grave."
He added: "You have messed up here but you can still redeem your situation.
"There are people there to help you if you are prepared to be helped."