scrBounceIntersection

The object will bounce off the screen edges.

 Script

///Bounce @ intersection
/* causes the object to bounce off of the screen edges
to use this apply values to these variables:
bounce_inter = (boolean) 
    enables/disables the script
*/
if (bounce_inter) {
    if (x > room_width || x < 0 || y > room_height || y < 0) {
        if (y >= 608 || y <= 0) { vspeed = -vspeed };
        if (x >= 800 || x <= 0) { hspeed = -hspeed };
    }
}