The code is very generic, so I am pretty sure it should work on CC as well.
Just find your Scripts folder (probably C:\Program Files\Adobe\Adobe Illustrator CC 2017\Presets\en_US\Scripts) and drop it in and start up Illustrator.
How is this supposed to work?
I tried to do a quick test and what I did might not work out but what id did is i just wrote 123456789
then turned them into curves or outlines. Then ungrouped them so each letter has its own layers. Now i did not change the numbers on my screen but i did scramble the layer order to see if the script will organize the layers. I ran the script and it looks like it just randomly scrambled the layers. I click on each number but the layer order is still totally random. they are not one after another. Am I missing something? Yes the numbers were selected when i ran the script, as i said the layers were scrambled again because of the script
EDIT:
Ok i realized why it didn't work. The numbers I typed up was just straight across in 1 line.
I moved around some numbers. some are higher than others. Of course, the layer order is scrambled. Then i ran the script and I realized that basically this script is just rearranging the layers from top to bottom. Not side to side. So basically when i set up all my text and logos i need to take the whole document and rotate 90degrees then run the script. The only problem is that not two texts nor logo are the same size. Let's say 3 lines of text is aligned to the right. but the top text is the longest. middle text is the shortest and bottom is medium length. Now the script will rearrange it in a way that it will cut the longest on first then the medium length one and then shortest but in reality the cutter will jump back and forth and we are talking about only 3 lines of text. If you have a bunch of logos and texts the cutter will jump left to right a lot of unnecessary head movement. BUT! the material won't roll back and forth as much i guess. Just need to rotate the whole document 90 degree and then run the script. I hope you guys kinda understand what i was trying to say here. lol