dramatist
A person who writes plays for actors to perform.
A dramatist is a person who writes plays for the theater. William Shakespeare was perhaps history's greatest dramatist, creating works like Romeo and Juliet and Hamlet that are still performed hundreds of years after his death. A dramatist crafts dialogue, designs scenes, and develops characters specifically for actors to perform on stage in front of a live audience.
Unlike novelists who describe what characters think and feel, dramatists must reveal everything through what characters say and do. When you watch actors perform a play, you're experiencing a dramatist's work brought to life.
Some dramatists focus on comedy, writing funny situations and witty exchanges that make audiences laugh. Others write serious dramas about difficult subjects or important historical events. Still others create musicals, where songs and music help tell the story. Famous American dramatists include Arthur Miller, who wrote about ordinary people facing tough moral choices, and Lin-Manuel Miranda, who created the musical Hamilton.
You might also hear someone called a playwright, which means exactly the same thing. Both words describe writers who create theatrical works meant to be performed rather than just read.