Code:
img1=0;
img2=input_track(0);
gfx_blit(img2);
gfx_mode = 1;
gfx_blit(img1,0);
I didn't leave anything out of the code but the title. I got it from a thread here a few months ago. put it on a clip with black background and it will overlay everything but the black areas on your footage on track below.
example
https://youtu.be/H96BedR-xbo
also works if you want to do hand-written text. write on white paper with black marker, video/photo it. Invert color preset + lighten/screen overlay preset to make white text with transparent background.