A 15-year-old boy who admitted supplying a Class A drug following the death of Carson Price has been given a 12-month sentence.
Carson, 13, from Hengoed, died after being found unconscious in Ystrad Mynach Park, near Caerphilly, in April 2019, having taken an ecstasy tablet.
The boy, who cannot be named, was given a youth referral order, requiring him to make reparations for his offence.
An inquest last April heard Carson died from a "violent reaction" to the drugs.
District Judge Martin Brown told Cwmbran Youth Court that, given the age of the defendant at the time of the offence, custody was not an option.
The 15 year-old told the court: "It was very foolish what I have done and I am very sorry."
In a statement after the sentence was handed down, Carson's family said: "We are fully aware that this sentence reflects the age of the offender, however, we feel that is has fallen short of sending the right message to all children and young people that taking or dealing drugs is extremely dangerous and has severe consequences.
"It remains frustrating that the adults who introduce these drugs into the social networks of our children are yet to be charged or convicted."
During the hearing, Mike Williams for the prosecution gave more details about what happened on the day of Carson's death.
He said that the teenager wanted £30 for the drugs but Carson only had £25 and there was an exchange of texts about the price.
A friend who was with Carson on the day he died said the drugs he bought were "green, in the shape of a Donkey Kong with DK on them and one had froth coming out of the top, glistening and sparkling like a crystal".
After Carson took the pills, his friend asked him why he'd done it. The court heard he replied: "Because it's Friday and I like the buzz."
Will Bebb, defending, told the court that the teenager felt remorse.
"He recognises the extreme severity of the position he's in," he said.
"He recognises he must be punished today and recognises the consequences have caused immeasurable lasting pain.
"He was 14 when he committed the offence and the delay has had considerable impact on him. The uncertainty has inevitably weighed very heavily on him and the prolonged state of nervousness have in themselves served as a punishment."
The court also heard about phone messages in the days following Carson's death where the teenager appeared to try to buy more pills.
He asked a contact: "Would you do three biccies for £25?"
The judge said the messages showed "he hadn't learned anything and was still trying to source drugs".
Passing sentence, Judge Brown said the boy should be "remorseful beyond words" adding: "You should be saying to yourself, that I will do whatever it takes to never put myself in this position again and I will try to put right what I have done in this instance."
The judge gave the teenager a youth referral order for 12 months which means he must attend a youth offender panel to try and change his behaviour, adding: "I am concerned that within a matter of days you were attempting to get your hands on more drugs.
"It's still a shock. Having known what they can do, you were still prepared to lay your hands on ecstasy."
The teenager was order to pay a total of £105 in costs.
A 22-year-old man, from Caerphilly, who was arrested on suspicion of the supply of class A drugs, has been released under police investigation.
Carson became unconscious in Ystrad Mynach Park and was taken to the University Hospital of Wales in Cardiff, where he was pronounced dead.
The inquest found he had taken a high-strength pill called Donkey Kong which had cost just a few pounds.