This is actually a common "thing" across many devices so just because this thread is on the Oneplus 5 forum doesn't mean it won't work for your device!
So I know exactly what you're going through....
You've flashed a Zip file, everything seemed to work fine, you pressed the reboot button.... But then... Black screen, blue LED (or something like that)....
You then try to reboot to recovery and then you see "Running Open Recovery Script" and you manage to decipher "Wiping Data", either you clean flashed your ZIP file and this is not a problem or you dirty flashed it and so you're screaming at your phone because it just wiped everything without you asking (I mean, this never happened to me or anything I'm just trying to imagine what it would look like )
You then try a few things but you're phone won't even get close to the Bootanimation and keeps trying to boot up into recovery and keeps on Wiping your data which is now non-existent.
This is the most convenient and easiest method but it might not work for you, I'm not even entirely sure how I made it work for me... Anyway:
Once the phone has booted up into recovery and is flashing the ZIP, try the following:
WILL UPDATE AS SOON AS I FIND THE EXACT METHOD
-Taking a screenshot (Power+volume)
-Pressing the back, home and récents button as many times as you can
-Pressing the power button
Basically, for now until I'm certain on what gets you out of this script thing, press every button on the phone a few times (that's what I did)
Method 2 [FAILSAFE]/
This method will work no matter what (if your problem is the one this thread covers that is), but it's quite teedious!
Step1/ Boot into the Bootloader (Power+Volume up)
Step2/ Install ADB & Fastboot on your PC (Google)
Step3/Download Stock recovery & TWRP
Step 4/Move both files to the ADB folder for ease of access
fastboot flash recovery STOCK_RECOVERY.img
Step 6/Boot into this new recovery
Step 7/ Ponder for a minute at how useless it is
Step 8/Boot into Bootloader again
Step 9/Type into terminal
fastboot flash recovery TWRP_RECOVERY.img
Step 10/Boot into recovery and wipe everything except Internal storage
Step 11/Flash ROM again!
Hope it helped, if you have any questions, feel free to ask me!