Writing a funny episode of television is a challenging prospect unto itself. But writing a funny series finale is a whole other story, at least according to Parks and Recreation co-creator and executive producer Mike Schur.

"Normally when you write a script, you think, 'Is this joke funny?'" Schur tells TVGuide.com. "And then when you're writing the series finale, you're thinking is this an appropriate joke to be telling as one of the last three sentences this character will ever say? It's hard to drive that thought out of your brain."

TV's most memorable series finales

Parks and Recreation wraps its seven-season run on Tuesday (10/9c, NBC). The hour-long finale, titled "One Last Ride," follows the gang as they complete one last task together, before Leslie, Ben, April, Andy and Donna all bid adieu to Pawnee. There will be (hopefully) one last trip to The Snakehole Lounge and other Pawnee hot spots, Schur says he was much more concerned with what his ensemble said in their farewell than what they did. "I will say that I paid a lot of attention to the very last words that each character says," he says. "I feel like we spent a lot of time trying to get that exactly right. If these are the last words that Donna says or that Andy says or that Ben says ... we wanted to make sure that they were in character or appropriate so I hope that people feel like we got that right at least."

Although Schur was sad to write his ensemble's final words, he also cherished the moment after Parks' many seasons on the bubble. "It was bittersweet in the way that I kept thinking about how I was never going to get to do this again," he says. "But when you get to tell, on your own terms, the final story of a group of characters that you love and that you care about and that you've been writing for seven years - it was a very nice feeling."

The best (and worst!) things Parks and Rec taught us about the future

Looking back on the show's run, Schur gives much of the credit for Parks' staying power to its stars. "The legacy of this show, really, is going to be that in 10 years it will be mind-boggling to people that all of those people were on the same show," Schur says. "That's both going to be the legacy of the show, is how great the cast was, and I also think it's the reason that it stuck around. When push comes to shove, if you're at the network and it's Season 2 and the show's ratings are OK but not great, I think you look at this cast and you think... we have these people under contract for five more years? How do we possibly get rid of them?"

Schur adds: "I hope that ultimately the legacy of the show is that the characters are good and the actors who played them were great."

Parks and Recreation's series finale airs Tuesday at 10/9c on NBC.

Parks and Recreation Video: See every time someone talks about Ben's butt!