Printer repeating same line over and over

What is the problem? I have a Qidi X-One 2 that I have been using with Octoprint for months without issue. The only weird thing is that I found a startup script on the Internet somewhere and it runs and then the one that Simplfy 3D puts in runs. When I print from SD (natively, not with octoprint) it runs a much shorter startup routine and it works fine. I got tired of like 6 or 7 beeps before each print (not to mention a lot of wasted head travel) and deleted the startup from Octoprint. The next print after that started out okay, but after about 4 or 5 milimeters of height, it started drawing the same diagonal line over and over. I went to check it, and it had knocked what was printed off and the head was caked with filament.

What did you already try to solve it? I tried several other prints with similar results. And eventually found what I believe is the startup script that I had in there before and added it back. trid a print just now, and it pretty quickly went back to oscilating diagonally.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...) I'm running octoprint 1.3.10 and octopi 0.15.1 running on Raspberry Pi 3 Model B Plus Rev 1.3.

Thank you for any help anyone can provide.

If I were to guess, you removed something in your OctoPrint's -> Settings -> GCODE Scripts -> Before print job starts that did an autolevel routine, if I'm reading between the lines of what you're saying.

From what you've described, there's probably something else which was in that original script, perhaps things related to homing the X/Y/Z, setting the movement mode and then zero'ing out all motors.