Intentionally making the game crash script


Hello there ! So i am working on a project and i want to have a script where it make a game crashed but not for any reasons or maybe i can edit the crashing box so that it said what ever i want ? And when the player open the game , the stage they are at already got saved or better yet ,when the player turn the game on the game is still continuing ...kinda like in undertale where you're fighting omega flowwy . Yeah That's what i wanted , Thank you!!! 
​
This was an interesting request so I whipped something up. The script lets you set a switch that should immediately 'crash' your game once triggered.
 

Spoiler
Code:
#==============================================================================
# Rinobi: Force Crash
# -----------------------------------------------------------------------------
# Allows the developer to crash their game whenever they please.
#==============================================================================
# Version History:
# -----------------------------------------------------------------------------
# 1.0 [05/14/2016] Completed
#==============================================================================
# * Instructions
# -----------------------------------------------------------------------------
# Set the default switch and message within the settings module below.
#==============================================================================
# * Compatibility
# -----------------------------------------------------------------------------
# Alias Methods:
# - update_basic -> Scene_Base
#===============================================================================
module RINOBI module ForceCrash # No Touchie!
#===============================================================================
# ** Settings Module
# ------------------------------------------------------------------------------
# Switch = The global switch ID that will crash the game once turned on.
# Crash_Message = The text displayed within the crash message box.
#===============================================================================
  Switch = 0
  Crash_Message = "Yeah, no. Let's try that again."
#===============================================================================
# ** End of Settings
#-------------------------------------------------------------------------------
# Editing beyond this area may result in unfathomable terror.
#===============================================================================
end end # No Touchie!
$imported = {} if $imported.nil?
$imported[:RIN_ForceCrash] = true
#===============================================================================
# ■ Class: Scene_Base
#===============================================================================
class Scene_Base
  #--------------------------------------------------------------------------
  # * Update Frame (Basic)
  #--------------------------------------------------------------------------
  alias :crash_update_basic :update_basic
  def update_basic
    crash_update_basic
    return unless $game_switches[RINOBI::ForceCrash::Switch]
    msgbox(RINOBI::ForceCrash::Crash_Message)
    exit
  end # update_basic
end # Scene_Base
Thank you dude!!!
Thank you for this script, i really needed it.
I have a small question though:where do i need to copy the code that you created? Do i have to convert it into a js? Sorry if this sounds like a stupid question, but i'm just starting to use RPG maker.
Thank you for this script, i really needed it.
I have a small question though:where do i need to copy the code that you created? Do i have to convert it into a js? Sorry if this sounds like a stupid question, but i'm just starting to use RPG maker.

RPG Maker VX Ace uses scripts written in Ruby.
RPG Maker MV uses plugins written in Javascript.

If you're using MV, this script won't work for you. You're in the wrong forum. You wanna head to Javascript boards -> JS Plugin Requests.

Sir_Volt, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/intentionally-making-the-game-crash-script.61844/