Click the green flag for the gif.
I got the gif from tenor gif keyboard. All you need to do is save a gif to your camera roll and then upload it to scratch and then add a “ when green flag clicked, repeat forever, wait .00005 seconds, and next costume”. Then you have completely animated gif in scratch. Enjoy!