I’ve noticed that it seems remarkably easy to accidentally delete scripts. I don’t really know how it even happens. Maybe its because I have two panels on the left in the designer (tag browser, then project browser), sometimes when I have some window open editing it, then click to a script - the two columns disappear and move into two panels on top of each other, and sometimes the one I was going to click disappeared. Poof. Can’t Ctrl+Z. I have no idea why this happens… I just have to hope I had saved recently, then exit and open designer again.
In a pinch, export your project before re-opening (without saving). Then you can selectively import what you were working on.