Which sentence is correct?

Group of answer choices

“If you work hard, my grandfather said" “you will do well in school.”

“If you work hard,” my grandfather said “you will do well in school.”

“If you work hard” my grandfather said, “you will do well in school.”

“If you work hard,” my grandfather said, “you will do well in school.”

"If you work hard," my grandfather said, "you will do well in school."