Added powerful script to check if a point is inside or outside a rectangle