In Magento 1.9 I simply use below code and Magento's Mage
model could be run on the script then
include_once 'App.php';
include_once __DIR__.'/../app/Mage.php';
How can I do it in Magento 2? So that I would be able to create custom script on root directory.