It's federal to get popped getting on a plane with dope?
As far as I know, it's always local and federal if you are travelling between states [which is not all flights].
So, you can face two sets of charges. Usually, if the feds are interested and have long penalties, the local cops defer.
I don't see a problem with transporting most pills since they can't tell pills from one another easily. Just put them in a prescription bottle with your name on it.
Putting it between your toes, however, would likely get them to check the pills.

I don't smoke pot or do drugs ... or even drink much, so in drug trafficking I'm like a homo priest telling you how to fuck a girl, but it would seem to me that pot or loose powders, like cocaine, would be problematic and sniffed for. Pills? I can't see how they could tell the difference.