x-axis Motor Only One Direction Movement

Show us a picture of your RAMPS with everything connected. What are you using for your 12V? Is there a chance your RAMPS has shorted pins on the end stops? Are you powering the Arduino off the USB or off the RAMPS power?

I just wanted to give an update for the record. I ordered another RAMPS and the motors are working as they should. Thanks for everyone’s help.

Check the DIR pin (the wire) If its have bad contact.