1)Put "tf" folder from "Material" to your TeamFortress 2 folder
2)Go to Model folder
3)Choose hat you want to replace and put "tf" folder to your TeamFortress 2 folder