Did Shakespeare write his plays?

Yes he did write them although he made free with his sources, sometimes incorporating phrases from them in his own plays. Also, some of his plays were written by Shakespeare in partnership with other playwrights.