There is no real reason why you or anybody else should write a script for free.
The exception is if the production is done without a penny spent on anything or anybody, and no money earned on the project. Like if you do something together with friends or a good cause.
If a producer requests a script without any compensation in the form of money, you should say no.
In the big picture, the salary for the rest of the screenwriters will go down if people accept doing things for free. In the long run, it will affect you too.
In the small picture, either your script is worth some money, or it is not worth producing.
As I see it, there are two compensations that I accept: payment when I deliver the script, or a deal about a possible future income – a risk that I might be willing to take, it’s like writing on speculation.
But anything else: no, I don’t work for only my name in my credits.
Without interest in paying for the very basics of a good movie, the result isn’t likely to be anything worth the trouble either. Then why would I want to have my name connected with the result?
Then, as I said, if I work for free, someone else gets problem to get paid for his or her work. And one day, that someone will be me.
It costs money to make a movie, long or short. Everybody involved need to do a good job, but the ownership of the final movie belongs to the producer. The fate of the movie is in the hands of the producer. Any income lands in the producer’s pockets. Why would anybody work for free?