How to get/set mouse icon without using the mouse?

I am working on a module script to completely replace the PlayerMouse instance. At this point, it is legacy, and I imagine its deprecation coming in the next year or two. Roblox is really suggesting that we use ContextActionService and UserInputService, which is what the module uses.

Because I want to completely ditch the mouse, I now don’t know a way to get and set the mouse icon without using the PlayerMouse. I could still use it, but the module would be a wrapper at that point, I want to try not depending on the player mouse at all

I don’t think Roblox currently has a built-in way to do this without the Mouse object.
What you could do to replicate it is to use an Image Label that follows the position of the mouse. While setting UserInputService.MouseIconEnabled to false.

Also, I am not sure if it would work, but ContextActionService has a function called SetImage(actionName, image) which you might be able to use.

You aren’t able to. The above method works though it’s inconvenient when it comes to CoreGuis because developer Guis are not allowed to render over CoreGuis for security purposes and CoreGuis overwrite the mouse icon already for hovering events.

This is for buttons associated with bound actions, not anything to do with the mouse.