"I had the striking and devastating fear that someone had somehow discovered what I was planning to do, and reported me for it," he wrote. "I would have been thrown in jail, denied of the chance to exact revenge on my enemies. I can't imagine a hell darker than that. Thankfully, that wasn't the case, but it was so close."
At the end of Rodger's text, he wrote he felt like a victim after experiencing so much loneliness and rejection growing up.
"I am the true victim in all of this. I am the good guy," wrote Rodger. "Humanity struck at me first by condemning me to experience so much suffering … I wasn't the one who struck first … But I will finish it by striking back. I will punish everyone."
Rodger was found dead after a shootout with police. Today, police said they were not yet sure if the suspect was killed by his own gun or that of a police officer.
ABC News' Micah Grimes contributed to this report.