Rough snippet. It's advised to remove unnecessary newlines as otherwise TF2 can break the item textfile.
turns out if you're really, REALLY mentally unstable you can create an actually animated texture for a TF2 item using a bunch of material proxies.