Scriptophobia
If you’re afraid to write things in public, then you have scriptophobia. This fear can manifest itself in various ways, like not being able to complete school papers or writing in the dark so no one can see you writing.