Fentanyl IS legal, with a prescription.

It's generally only given to those in palliative care (aka dying folks), but it is a legally prescribable substance, like all the other opioids (excepting maybe heroin). It is also regularly used in anesthesia, and I'll be receiving a small amount Monday before a surgery.
Just trying to clear up a misconception, of which there are way too many about a medically viable substance. You also can't absorb it through your skin like the cop videos show (unless it's a transdermal patch). It has to be ingested.