Only SOME fully automatic firearms are legal at the federal level. Only SOME states allow residents to purchase SOME of them. It is strongly suggested that you research this thoroughly as the government loves to make an example of anyone who violates the law.
Selective fire guns are illegal. Full auto only are legal with a Class 3 stamp. Even here in The Peoples Republic of Connecticut.