The fanfic archive has a great section on
plagiarism , explaining the rules more succinctly and accurately than I ever could. Basically, if someone else wrote it, even if it's only a line of dialogue, you should credit the author.
My personal opinion about lines of dialogue from the show vary a bit depending on the situation. If you're focusing on a single episode (or specific episodes), I'd mention the specific writer. However, if you're quoting lots of lines from multiple episodes, I think you can credit the writers of LnC, without mentioning which writer in particular. But that's just me.
In my story, Master of Disguise, I pulled from and/or mangled dialogue from a couple of specific episodes, so I quoted the individual writers. Here's how I did it:
As any FoLC can tell, I borrowed heavily from of the show, especially dialogue from “Strange Visitor” and “The Green, Green Glow of Home” written by Bryce Zabel, as well as “Requiem for a Superhero” by Dusty Kay. I also stole many ideas and dialogue snippets from the other season one episodes while manipulating them to my heart’s desire. So my thanks go to every contributing writer and the actors, as well as the show’s creators and producers.
I also quoted authors from outside FoLCdom, shown here:
Knowing how much Lex likes the play, _King Richard the III_ by William Shakespeare, it seemed apropos for the situation. Thanks and credit goes to the Bard himself (our boy Bill can write a villain like no other) and to Wikiquote for the following lines of dialog:
“Was ever woman in this humour woo'd?
 Was ever woman in this humour won? 
I'll have her; — but I will not keep her long.” (Richard III, Act I, Scene II)
“And thus I clothe my naked villainy/ With odd old ends stol'n out of holy writ,/
And seem a saint, when most I play the devil. (Richard III, Act I, Scene III)
“So wise so young, they say, do never live long.” (Richard III, Act III, Scene I)
Also briefly mentioned is Cato, a character from various “Pink Panther” movies (1964 – 1993), staring Peter Sellers and directed by Blake Edwards. My apologies to fans – I just couldn’t resist the comparison between Asabi’s tests on Lex (i.e., the creepy cobra scene in the pilot) and Cato Fong’s attacks on Inspector Clouseau.
Just one example and my 2 cents.
BJ