look at it like this
you have something illegal, but still widely available.
TSA is looking for terrorists with metal and weapons and liquids and shit
You have a few non metallic pills
When you walk through the metal detector, they check your ticket and watch you walk through. They dont search you for drugs or pat you down if they have no reason to believe you are in possession of such items.
If you put a few in a baggie, and throw it in your pocket, you should have NO problems. UNLESS you are patted down for whatever reason AND they find it(baggy clothes, failing metal detector) Although I would not be surprised if someone missed 4-5 pills in a baggie, through denim, on a pat down
Dont walk up to TSA like, 'heyyy i have drugs but i have a long explanation with no proof'
Just take off all metal, keep your pills in pocket, wear clothes that arent baggy, wear a tshirt and jeans through the metal detector, get your stuff thats been xrayed and move onto your flight
I don't remove my wallet for metal detectors I have never been asked to remove my wallet, as long as it's not metal and it fits in your pocket you should be 100% fine
the only chance of getting caught is if you dont KEEP IT ON YOU... TSA can inspect bags for whatever reason, and your not there with your stuff. & you dont want to be sketching out the entire time wondering if your pills have been found, if they are in pocket you know its all 100% gravy
hope this solves your question