Can I legally use music from bands in a fangame?

i was wondering if i make a game and in this game i insert music from aerosmith or metallica can i be demanded for using songs of those bands??? and if i put the songs i used and the artists on the credits with the respective music information that could help? ( my game is a just for fun project and i dont intent to gain money from it) sorry for my bad english and thanks =)

Yes, you can get in trouble. You probably won't, but technically it's not legal. Putting their names on the credits doesn't really help, and neither does being a "just for fun" project. Fair use laws mean you can use a short excerpt from the song, but not the entire thing. You have to request permission to do that. Some bands will be happy to let you use their songs for free, others bands won't. The right thing to do is ask the rights holder (who isn't necessarily the band).