Does what it needs to do, but customisability and mod interactivity could be better executed. The system seems to assume every level takes place at day time, which isn't true for both modded levels and the vanilla campaign. It then replaces the sky texture with a series of recolours of Greenflower Zone's sky texture. When night falls, it makes the level even darker than it already is which greatly reduces playability in levels that take place at night time. My suggestion to fix this is to introduce a level header parameter which specifies what time of day the level takes place at, either as an enumeration or an integer correlating to progress through the day cycle (preferably the latter). This would allow the system to adjust the sector brightness changes accordingly. Additionally, allowing the map to define its own textures for various times of day would improve compatibility.
The script currently keeps track of time using two integers: one determining how long until sunset or sunrise, and another determining progress through sunset or sunrise. In order to allow maps to define the precise time of day they take place in it may be necessary to combine these into a single integer and change the appearance of the level depending on its value. A simple way to implement this would be to have it continuously count up from 0 and loop back to 0 upon reaching a certain value, and trigger appearance changes by checking if the number is bigger than a given value.
Another suggestion that would probably be harder to implement: The script currently changes the light level of all sectors indiscriminately. My suggestion is to have it only directly change the brightness of sectors whose ceilings display the sky, and introduce a rudimentary light propagation system to determine the brightness of sectors which don't receive skylight.