@AseAseAse I have just tried that script and it works perfectly. Are you using the last version of Aseprite? Have you downloaded the correct file?
When downloading scripts from github repositories you must right click on “raw” button and then choose “save as” to get the correct file, if not you could be saving an “html” file instead of the “lua” file that you need.
I hope it helps!