scrOutside

This script will allow an object to be destroyed when outside the room based on the limit

 Script

/// Outside Destroy
/* destroies the object after it goes past the limit off the edge of the screen
to use this apply values to these variables:
outside_destroy = (boolean) 
    enables/disables the script
*/
if (outside_destroy) {
    var limit = 64; // distance out from edge object can move without getting destroyed
    if ((x < -limit || y < -limit || x > room_width+limit || y > room_height+limit)) {
        instance_destroy();
    }
}