https://scratch.mit.edu/projects/751525643/ look inside the project
paste that in create a block and then u have a hat!