The lead in my pencil broke but I can use a pen is that a complex or compound or simple sentence

The sentence "The lead in my pencil broke but I can use a pen" is a compound sentence. It consists of two independent clauses joined by the coordinating conjunction "but."