This is my own DIY Filament Runout sensor im later uploading a video on how you can assemble it but not software because im too dumb for this!
You can cut off the ends of the cables and solder them onto the endstop.
Let me know in the comments If there is anything you want!
The Endstops im using
have fun with it!