To make a hat invisible, you'll have to find the code and edit the .bsr to the .bsr of a hood/crown/whatever. Since hoods/crowns ect are invisible the hat will be too. I'm not sure how you can make the attachement invisible, you'd have to expirement with different things. If I remember correctly everything should be in itemdata.txt (in media.pk2..somewhere).
That's all by memory, if you need more help or more explanation just post again.
