Scripts are just G-code. We have lots of information here:
https://cnc.zone/gcode/gcode
but plenty is incomplete.
#<qvalue> - value of Q argument
G65 macro needs Q argument.
DEF makes sure it defaults to 1 if it is not provided
https://cnc.zone/gcode/functions/func-def