Thanks. That's the kind of response I aim for.
Getting the effect the way it is was a little hard, but I'll try to explain.
I first save a screenshot to a surface, but not before redrawing all the constant sections perfectly black. (It is important that this black color is not used in the rest of your game). By constant I mean Link, the hud and the enemies so they can later be separated from the rest of the image and redrawn on top of the end result. I then save the screenshot as a sprite, turning the black areas transparent. I'll call this sprite A.
Then I draw spriteA back onto a surface in the same color black to have created an inverted image. I then draw this black area onto the original screenshot (using a new surface) and save it as another sprite, once again turning the black color transparent. With this I have isolated all the sections of the screenshot that I do not want to adjust. Or in other words: I have a transparent surface with ONLY the character, enemies and HUD drawn on it and only the sections you see in the original screenshot. I'll call this imageB.
For the blocky background: Sprite A has holes in it where the character and enemies were placed so I draw it 5 times onto a new surface: normally, with x+8, y+8, x-8 and y-8 (in reversed order). This mostly fills the empty areas with colors somewhat similar to the area around the empty spaces. You'll get really weird effects if you do not do something similar. I save this as spriteC.
All these steps are done at the moment the shocking starts (as to save resources since the following takes a lot of processing power). Next I start to created the main effect. From left to right I keep taking a vertical slice (every n pixels) from spriteC and draw it onto a new surface while stretching it the same n pixels in width. I do the same with the resulting image onto the actual screen, only then drawing horizontal slices stretched in height. n equals the size of the resulting blocks. The result is a blurred screenshot without having used the character, enemies and other constants. I must note that drawing lines and stretching them is WAY more efficient then doing it block by block, obviously.
Finally I take imageB again and also draw it also onto the screen.
Voila. Screen successfully distorted. Easy right?
I'd like to say that's all, but I'm still having problems with preexisting (partly transparent) surfaces in the original screenshot that are not saved to surfaces correctly. It's a gamemaker issue so I'm not trying to solve it right now.