Was just trying to make a script that could create rectangles very fast. I couldn't find griffpatch's project about drawing rectangles fast so I just made another one. Works completely fine, EXCEPT if the rectangle drawn is very large. This one(on my computer) stops around 29.99 rectangles per second. Not bad. On turbo it's over 600. 600 RECTANGLES DRAWN PER SECOND.
Note: x and y MUST be lower than x_2 and y_2 otherwise it won't work. Does not work with opacity. Can only create block rectangles where the rectangle is the same colour. The rectangles drawn per second was previously at 350, but then I realised that I made a small calculation error and was then able to make it significantly better. The weird pensize multiplier is equal to 2*(pensize/2)^2-pensize/2, which is equal to (pensize^2)/2-pensize/2, which is equal to ((sqrt 0.5) - 0.5), rounded up to the nearest hundredth.