Simple day and night cycle help

I'm making a very simple day and night cycle script. While trying the loop function 😔

This is the script:
Spoiler
aobs.JPG
I use a common event to activate this cycle
Spoiler
ce.JPG
This is going very well. Until finally I realized
When the player moves another map (Transfer player)
the common event does not continue with the command.
The screen returns bright.
Even though the calculation of variables is still continuing.

How do I make it when the player moves to another map, the screen brightness still same as in the previous map?
I've managed to finish it!
It turns out that it's just a mistake I didn't realize.
This is the script that I modified
Spoiler
he.JPG

Original thread: https://forums.rpgmakerweb.com/threads/simple-day-and-night-cycle-help.119761/