screenwriter

A person who writes scripts for movies or TV shows.