You don't really have to do anything; it generates itself. Press the green flag. Some complex games are much easier to make with a grid. The problem is, they usually take forever with a lot of messing around to make. This one makes itself in under a minute! To use the finished grid the smartest thing to do would be to save a picture of the stage when it's finished. Or you could make it so it slowly generates a pattern!
Used the Scratch Wiki for a few things. Sorry in advance for the occasional random line; that can be easily gotten rid of with the clear paint if you want to use the finished grid. Also sorry for the fact that it's kind of slow.; that was the fastest speed Scratch could do it at. Each square is exactly 10 x 10 pixels.