How to use extruder with endstop

What are you using to send the gcodes? You need to wait for the board to answer “ok” before sending the next one, that’s the standard gcode protocol, see the source code of pronterface or smoopi.

Im using UGS software to load gcode file, I’ve also tried pronterface to upload gcode file but same thing happening.
Here is the gcode moves

$H                   
G01 X100 F500          
G01 Y200 F1000         
G01 Y100               
G01 X50                
G01 X120 Y200 F2500    
G01 X150 Y210 F500     
G01 X120 Y200 F2000    
G01 X150 Y210 F500     
G01 X120 Y200 F2500    
G01 X150 Y210 F500     
G01 X120 Y200 F1500    
G01 X150 Y210 F500     
M84                   

it only homes and nothing after that.
@Arthur_Wolf

are you sure it’s not going into an alarm state, run the commands manually and see what output you get (using pronterface, don’t use UGS it doesn’t work well).

you can use M999 to unlock an alarm state