Can you show me the JavaScript code to see if the mouse is over an object because I don't know how to do that. Thank you so much!
You don't need Javascript to do that,
You can create a sprite and make it a solid colour and make it invisible.
In the event sheet use:
Every tick --> set newsprite to cursor.X
cursor.Y
newsprite is overlapping
object of choice --> do something