FORT LAUDERDALE, Fla. (CBSMiami) – Nikolas Cruz, the gunman behind the deadliest high school shooting in U.S. history, pleaded guilty on Wednesday to the 2018 massacre at Marjory Stoneman Douglas High School in Parkland, Florida. Afterwards, Cruz issued an apology to the victims’ families.

Standing before Broward County Circuit Judge Elizabeth Scherer, and in front of several family members of those who died, Cruz lowered his mask and said, “I am very sorry for what I did. And I have to live with it every day. And that if I were to get a second chance, I will do everything in my power to try to help others.”

READ MORE: New Illinois Laws To Protect Sex Crime Victims' Privacy Take Effect Jan. 1

He spoke nervously, adding, “I am doing this for you. And I do not care if you do not believe me. And I love you. And I know you don’t believe me. But I have to live with this every day. And it brings me nightmares. And I can’t live with myself sometimes. But I tried to push through, because I know that’s what you guys would want me to do.”

Cruz’ apology came moments after he pled guilty to 17 counts of premeditated murder and 17 counts of attempted murder.

WATCH: Nikolaus Cruz plead guilty to all 34 counts

READ MORE: Chicago Weather: Cloudy Overnight With Snow Flurries For Some

During his apology, he said he wants the families of the victims to decide if he lives or or gets the death penalty, not a jury.

“I hate drugs, and I believe this country would do better if everyone will stop smoking marijuana and doing all these drugs and causing racism and violence out in the streets. I’m sorry, and I can’t even watch TV anymore. And I’m trying my best to maintain my composure and I just want you to know I’m really sorry. And I hope you give me a chance to try to help others if we if I believe it’s your decision to decide where I go. Whether I live or die, is not the jury’s, I believe is your decision. I’m sorry.”

Despite his plea, by law, it will be a jury that decides whether he gets a life sentence without parole or the death penalty.

Defense attorneys are hoping to avoid the death penalty and will likely present Cruz’s history of mental illness to jurors, attempting to argue for a life sentence instead.

By having Cruz plead guilty, his attorneys will be able to argue during the penalty hearing that he took responsibility for his actions.

MORE NEWS: View Live Radar

Given the case’s notoriety, Scherer plans to screen thousands of prospective jurors. Hearings are scheduled throughout November and December, with a goal to start testimony in January.