After clicking on Scratch cat move him around with the arrow keys. He cannot move beyond the edge of the world of coloured blocks. See https://scratch.mit.edu/projects/67029652/ for another version with rotation of the world enabled.
The Scratch wiki includes a page on 'extensive scrolling' but only for x. This expands that to show how to do it for x and y. See the stage for comments. It should be possible to just change the GridX and GridY variables and use the rest of the code for your own projects.