It depends which state, but most do not allow gun sales to people who have been involuntarily detained. But in some states, I think you can still buy a hunting rifle or shotgun (just not a handgun or assault rifle). And in some states, background checks are not required for any gun purchases if buying from a gun show or a private seller.
Basically, in America, there is nothing that can stop a person who is determined to get a gun from getting a gun.