(CNN) The class president at a Florida high school says he wasn't allowed to share his experience as a gay student in his graduation speech or how the state's so-called "Don't Say Gay" law will affect students like him, so he talked about something else that makes him a little different from his classmates -- his curly hair.
Zander Moricz, 18, has been active in social justice causes as a student at Pine View School in Osprey, Florida, and led a student walkout in March to protest the controversial measure that bans certain teachings about sexual orientation and gender identity in schools and goes into effect in July. He's also one of the plaintiffs in a lawsuit challenging the law.
Moricz told CNN that a few weeks before graduation, the school's principal met with him and told him he couldn't talk about that issue.
"He'd always been very supportive of me and my identity and I was really hurt," he said.
Moricz came out during his freshman year and was the first openly-gay class president at the school, so he felt a responsibility to address the controversy. He told CNN that school is the only guaranteed space that kids have in the state.
"When you take that only guaranteed space and you make it one that victimizes an entire population of students, what you're doing is you're forcing kids to make the choice of either not come out safely or not come out at all," he said.
So when it came time to speak at Sunday's ceremony, Moricz took off his mortarboard hat and pointed to his head.
"I used to hate my curls. I spend mornings and nights embarrassed of them trying desperately to straighten this part of who I am. But the daily damage of trying to fix myself became too much to do," he said in his speech. "So while having curly hair in Florida is difficult, due to the humidity, I decided to be proud of who I was and started coming to school as my authentic self."
Moricz said his teachers were some of the first people he went to for advice because he didn't have "other curly-haired people" to talk to and said the support he got at school helped him grow.
"Now I'm happy. Now I'm happy, and that is what is at stake. There are going to be so many kids with curly hair, who need a community like Pine View and they won't have one," Moricz said. "Instead, they'll try to fix themselves so that they can exist in Florida's humid climate."
After the speech, Pine View School Principal Stephen Covert applauded and gave Moricz a hug on stage.
"We honor and celebrate the incredible diversity in thought, belief, and background in our school, and champion the uniqueness of every single student on their personal and educational journey," Covert said in a statement.
Moricz said he had an emotional moment backstage after the ceremony with school officials who had been there for him over the years.
Sarasota County Schools said in a statement that school administrators review all graduation speeches before they are delivered and confirmed that Covert met with Moricz before he submitted his speech "to remind him of the ceremony expectations."
"As in years past, student speakers were reminded that graduation is a community celebration and were encouraged to tailor their remarks to be reflective of experiences & memories that all students could appreciate to best reflect all facets of the graduating class's achievements," the statement said.
Moricz was also the first student to be elected class president for all four years of high school, so he's been thinking about this speech since he was a freshman. He ended up writing the speech that was approved by the school in about a day.
In the speech, he reminded his classmates of times they rallied together against anti-Black violence and to draw attention to the climate crisis, as well as an unsuccessful campaign to convince rap superstar Pitbull to perform in their school gym.
He said that the students have power and need to use it.
"When you waste your power, what you're really doing is giving it to whoever has the most already, and right now, those who have the most power are coming for those with the least," he said in his speech. "We should not have to deal with this, but we're gonna."
Moricz told CNN that the controversy surrounding his speech over the past few weeks has been pretty terrible, but he doesn't have any hard feelings toward the principal or school officials.
"I'm angry at the governor and I'm angry at our legislators in Florida," Moricz told CNN. "That's where my anger is directed towards, but I'd be lying if I didn't say I hold everyone a little bit accountable. We're all responsible to push against things like this."
Moricz plans to attend Harvard University in the fall to study government.