Click the green flag.
All credit goes to TheRetroCoder. Tips for him: 1 - instead of the (go to x: (pick random (-400) to (400) y: (pick random (-400) to (400)) you can just use the (go to (random position)) block in the Motion category. 2 - instead of clones you can use the stamp block from the pen extension because clones are limited to 300 simultanously, that's why it stopped generating squares after an amount of time. Stamp does have lower quality, of course, but for squares, it's very good.