Artillery 3D Printer to Laser Cutter

Dear 3DPB members, I am using Artillery Sidewinder X2 and Genius Pro. I am thinking about transforming my printer into a laser cutter. I am using the default firmware of the printers. For this purpose, I will take out the hotend and connect a laser to the X-Carriage of the 3D Printer. I have checked the E-Breakout PCB (see the photo below)

I can see that Z-Probe part has +5V, Servo and Gnd. How can I activate those pins with G-Codes? I believe 3 pin lasers can be connected to those pins for +5V, Pwm and Gnd, respectively.

Best regards.