Lenz's law tells you that the coil will act to try to keep the magnetic flux constant.
You're removing a magnet bar with the north pole on the right, so the coil will try to produce a magnetic field to cancel that removal by making a $B$ as if the bar were sitting inside the coil.
As you correctly predicted, this means the end of the coil near the bar is the $S$ end.
Now think about the current flow in the coil.
If you curl the fingers of your right hand and stick out your thumb, the right hand rule says that current flowing out of your fingertips produces a magnetic field pointing along your thumb.
Since we said the $B$ field has the $N$ end to the right, your thumb points to the right.
This puts the current flowing from top to bottom on the illustration.
If you just follow that with your eye, you find the current goes from $X$ to $Y$.