This is a self-contained, single sprite eyeball that follows the mouse pointer. You can put it in your backpack and drop it into any project and it should just work (although other scripts will cause the eyeball to flicker - see below for explanation). You can also duplicate the eyeball and all copies will work as expected (although it's quite processor intensive...).
I wanted to make the eyeball self-contained, so it had to be a single sprite with no global variables. The eyeball sprite clones itself to create the pupil, which moves towards the mouse pointer. The clone needs to know the angle of the mouse pointer relative to its parent sprite, so within its main loop the parent sprite sets a variable to this value. Clones can access variables in their parent sprite, however I discovered that if the parent sprite updates this variable after creating the clone, the clone's variable doesn't update. To work around this restriction I create a new clone in every iteration of the main loop. The loop pauses for 0.05 seconds before the next iteration. The clone also pauses for 0.05 seconds before deleting itself. The downside of this technique is that the pupil will flicker if there are other scripts running. I'm hoping to update my solution to avoid this...