Ah. I've never used that script so I was assuming it was similar to the tint function.
Thinking about it, I would probably keep it the way I had it (replacing tint with the script function), then create a Common Event that simply checks what the variable is and tints the screen. Every time you switch maps, you add that Common Event to it and let it handle the tinting (you could even add it to the Parallel Process as well). That way the tinting effect isn't constantly being run which might cause lag or other strange oddities to occur.
I still see some errors in the way you set up the Event particularly with how you're using the Else branches. For example, when the timer drops under 23 minutes and the variable is not equal to 1, it's going to increase it which will break the Event once the timer hits 22 minutes. However, it won't run the 22 minute part because there is nothing to increase the variable past 1 so it will be skipped, as well as everything else. Else branches will only run if the condition is false (notice how I didn't use any when I made the event), otherwise it'll run the other branch.