Run the project and it will automatically detect the stage resolution (up to 8K). The Scratch resolution is 480 by 360 pixels but on Turbowarp, this can be changed.
Notes & Credits
Feel free to use the script in your projects. No need to give credit.