M_BUT VAR GPIO.0.....and so on for the rest of them
Read the manual. Con only assigns a number to a name, not a pin to a variable.

symbol ON_OFF = 1....SYMBOL not explicitly needed, unless you're using PicBasic compiler instead of PBP

if X0 < 10 then
gosub LED_F
else
LED = 0 'Makes sure LED is off
pump = 0 'Turns relay controlling the pump off
return 'Returns to main code
NO ENDIF HERE ---where's the ENDIF?

X0 + 1 'This adds 1 to variable X0 each time it loops
---That might be what you want it to do, but it's not going to do that
X0 = X0 + 1


Look at your code a little harder next time. You'll spot these errors a lot faster and easier if you've got the manual handy.