Script Call For Fading In And Out To White?

Hey yall its me again!!!
If you don't remember I asked for a really cool NES Fade Out script,
Its really awesome and I'd like to thank the legendary Theo Allen for making it!!!

This is great but there's one big problem...
My game uses a lot of fade out and fade in commands
that don't transfer the player it really breaks the retro
consistency in my game...

Is there a script call or something like that in RPG Maker
to make the screen fade in and out to white?
or could someone edits Theos script to
override the fade out and in commands?
Theo's Script
Code:
class Scene_Map
  Duration = 40*2
  #--------------------------------------------------------------------------
  # * Fadein Screen
  #--------------------------------------------------------------------------
  def white_fadeout(duration)
    duration = Duration
    @tone = $game_map.screen.tone.clone
    fade_loop(duration) do |v|
      if v <= Duration*0.5
        $game_map.screen.tone.blue = -255
      elsif v <= Duration*0.75
        $game_map.screen.tone.red = -255
      else
        $game_map.screen.tone.green = -255
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Fadeout Screen
  #--------------------------------------------------------------------------
  def white_fadein(duration)
    duration = Duration
    fade_loop(duration) do |v|
      if v <= Duration*0.25
        $game_map.screen.tone.blue = @tone.blue
      elsif v <= Duration*0.50
        $game_map.screen.tone.red = @tone.red
      elsif v <= Duration*0.75
        $game_map.screen.tone.green = @tone.green
      else
        break
      end
    end
  end
end
Whoops I posted in the wrong thread can a Mod
move this?
'Scripts' is where people who have written completed scripts that they want to share with others can post them.

Moved to: RGSSx Script Support
If you want to use a switch to control when you can do the effects Theo made for you then you could add in an if command to do this.
class Scene_Map
if $game_switches[X]
Duration = 40*2

then at the bottom of the script add in an extra end

Original thread: https://forums.rpgmakerweb.com/threads/script-call-for-fading-in-and-out-to-white.109116/