If this sounds confusing, then I will explain down here.
For example, I would take the first appearance of the word The and put it where the last appearance would be. The second to last The will be in the position of the second the. Then repeat until all the The's are in reverse order. Now repeat for every word that appears more than once. This leaves the script unchanged