Apple charged me $199 for replacing the home button, 100 for the labor and 99 for the parts. Selling it for parts, you probably would get 80-100 dollars back. If I were you, I would sell it for parts. At least, you could get some money back.
Of course, you could purchase a new home button online and replace by yourself, but that procedure is extreme challenging. My friend accidentally cut a cable when he was replacing home button, and it cost him 300 bucks to fix. Since iPhone 4 is pretty out-of-date, the best way is to sell it for parts.