Trying to copy and paste a piece of code to make a capship mission.
I highly advise trying to make it on your own instead of just C&P'ing it from somewhere ... that way you at least know how you made it and where to debug.
But if you are intend on that - you cannot C&P events or SEXP from one mission to another (let the coders explain why FRED doesn't have that kind of functionality), unless you are using a text editor like Notepad/Editor.
Once you have that open you need to find the section "#Events" in the file, which comes after all objects and wings that in the mission file. There you will find the data you can C&P into another mission file for any event - It is important that variable data which might be required for some events is stored elsewhere in the file ("#Sexp_variables").
Also events in the text output are formated differently from the output you will have in FRED; it starts with "$Formula" which are the event's conditions and operators, other information like the name of the event ("+Name") are at the end. So it is basically the reverse of the visual output you have in FRED (more or less, actually less).