https://github.com/mjshi/RPGMakerRepo/blob/master/NonCombatMenu.js
On GitHub you need to click raw and then save the file.
File has to be in your project folder with js folder inside plugins.
Open Plugin Manager under tools to add NonCombatMenu.
In Parameters of NonCombatMenu for Menu List-
Delete "Item" and "Save"
Double-click on "Status" then rename to Leave game and Keyword to "toTitle"
Double-click on "Quit" then rename to Stay in game and Keyword to "cancel"
For Menu Order, paste this-
Code:
Leave game: toTitle, Stay in game: cancel
Click on OK, be sure to set Plugin Status to ON.