Robitussin DM contains a drug called dextromethorphan which (according to the Merck Manual) has the side effect of causing euphoria. This is the ingredient that makers of drank, purple drank etc. are after. It is also called Robo, roboing and about a dozen other names.
Kids use the sweetness of the candy to hide the taste of the cough syrup because your body will recognize the poison the second time you do it and issue a gag reflex.
Thank you for that info. Sounds horrible.