Howdy everyone!
If you wondered why does the script not work after changing the output settings, blame my lack of knowledge!
Apparently, if you change settings of the output (change format or other thing in the OUTPUT tab of settings), it will re-create the output itself and make the script useless until you reload the script/OBS.
My bad!
Anyway, this version fixes this issue, so be sure to use it!
Have fun recording!