The angle of a polygon (and thus the angle of slopes on terrain) is conveyed via its normal. A "normal" is a vector pointing straight out from a polygon, giving the direction that polygon is facing. You can determine the normal for a polygon in various ways, using linepicks or collisions and commands like CollisionNX (as in "the X component of the normal vector of the polygon collided against.")