How can I use this script to be able to use sprites/flipbooks?

Does anyone have an idea?