Try just using this:
class Window_GameEnd < Window_Command def make_command_list add_command("Back", :cancel) add_command("Quit", :shutdown) end def alignment return 1 end def update_placement self.x = (Graphics.width - width) / 2 self.y = (Graphics.height - height) / 2 + 12 endendclass Scene_Map < Scene_Base def call_menu Sound.play_ok SceneManager.call(Scene_End) Window_MenuCommand::init_command_position endendclass Scene_End < Scene_MenuBase def start super create_bg_window create_command_window end def close_command_window @command_window.hide @back_window.close update until @back_window.close? end def create_command_window @command_window = Window_GameEnd.new @command_window.set_handler

cancel, method

return_scene)) @command_window.set_handler

shutdown, method

command_shutdown)) @command_window.opacity = 0 @command_window.z = 999 end def create_bg_window bgwidth = 160 bgheight = 128 centerx = (Graphics.width - bgwidth) / 2 centery = (Graphics.height - bgheight) / 2 @back_window = Window_Base.new(centerx,centery,bgwidth,bgheight) @text = "Game Paused" @back_window.draw_text(0,0,bgwidth-24,24, @text, 1) endend
edit:
fixed the window closing part to make it pretty. please use the new version above