Standard Amy Order (which the official scripts are ALMOST entirely ordered in) is:

Then within each of these subsets the abilities are ordered from shortest to longest unless there's another more cognitively useful option. To give an example of when it's more cognitively useful to do it differently: the top 4 in TB are ordered the way they are to be detecting Town/Outsider/Minions, because that's the order those groups are on every script.

Website

This webpage helps to put scripts in Standard Amy Order (SAO). To use it, simply upload the json file generated from the official script tool and it will reorder it for you.

Extension

Alternatively, you can use an extension/add-on version of this website, to directly reorder your script on the official script tool.