If X is 1,
scry 1
(Look at the top card of your library. You may put that card on the bottom of your library.), then draw a card.
If X is 2, you may choose a player. They return a creature they control to its owner's hand.
If X is 3, create a 4/4 blue and red Elemental creature token.
If X is 4 or more, do all of the above.