Writing URScript for Custom GUI button

There is no way to create UI Elements with URScript except popup Message boxes.

Just check out the URCaps SDK. You can implement your desired Feature using the UserInteraction Interface. Note that using the RequestUserToMoveRobot Function always calls a MoveJ so if you like to use a MoveP or MoveL you might wanna use this example which u can use to send a movel or movep script command