The difference between these

what is the difference between MouseX and mouse.X()?

MouseX() is the old/legacy method of saying “The X position of the Mouse cursor” (current method is CursorX())

“mouse.X()” isn’t a thing that exists in the engine. If you have an object named “Mouse”, then “Mouse.X()” would the X position of that object.