MV Script Call Help

What I am trying to do is having a picture act as a closing window for my other pictures, since I am layering multiple pictures to create a window in a way.
For example I have an event that when clicked it will show a picture of my window, over that picture there will be"selectable pictures" and in the corner another picture of an X.
I can make it to where pressing the cancel button exits everything, but I also want to make it to where if i press on the X, it also closes everything, but MV doesn't have a conditional branch for that.
So i figured that with a script it could be possible.

Something like if picture 2 is pressed or touch
Or if show picture 2 is active and location x, y is touched

This way i can then use the erase command under the conditional branch made of the script call.

Hope someone can help me with this.
There's Galv Screen Button

You can add the close button when showing your picture menu, then make it to treat it as "cancel" button when pressed. Then remove the button afterward.
Okay i will give it a try, i come back if i can't figure out how to set it up lol

edit:
more of less i figured it out, only issue is the button is partially cut off, not sure if there is an exact size need or if its some coding bug in script.
Also how to make button disappear along with window once the window picture is closed.

Edit. Okay I figured it out. Thank you
This can be closed now

Original thread: https://forums.rpgmakerweb.com/threads/mv-script-call-help.122408/