Final answer:
The pencil will continue to move in the direction it was rolling but will also start to move downward due to gravity.
Step-by-step explanation:
Once the pencil leaves the table, it will move downward, in a path that is the result of its forward velocity (the direction it was rolling) and the acceleration due to gravity. This is according to Newton's first law of motion, which states that an object in motion will stay in motion with the same speed and in the same direction unless acted upon by an unbalanced force, and gravity, which provides the unbalanced force that pulls it downwards.