Mothballs aren't good for anybody or anything. They should be outlawed. You'll nuke yourself next time you have to go in the attic if you use them.
If you want to put something up there, try dried hot peppers. That repels a lot of stuff and isn't toxic.
SRS