If they do buy...do I get a percentage from their budget?
Writer fees are supposed to be a percentage of the production budget. You should look at the WGA website for guidence.
However, it's not as simple as just selling the script. There is a staged process.
Stage One - an option or shopping agreement.
This is where the company says "We like this project and we'd like to develop it for production." This figure can be a low $2000, for a three year option. The option gives the production company three years exclusive rights to try to get the film into production. This stage may also include the need for extensive rewrites. The number of rewrites are usually contracted into the agreement. However, it may also include the right for them to get the rewrites done by another more experienced writer.
Chances are that three years down the line the option will expire with the film unproduced. This can happen for any number of reasons. Some projects that look hot just fade away over time.
Stage Two - First day of principle photography
The next payment stage is normally on first day of principle photography. It may be your whole fee, or it may be a part payment. 50% is standard. If your fee is 5% of the budget, then on a $100,000 budget you'd expect to see your first $5000.
Stage Three - Completion - If the filmmakes it all the way to completion then you'd expect your final payment stage. Your final $5000.
The other deal that you might get offered is called a defered payment. This more than often means that you only get paid when the film is sold, post completion. This also called a "back end' deal.
The formula is usually that you get less on an "up front" deal, because the producer is taking the risk and you get more on a back end deal, because then you are taking the risk.
Back end deals are common on indie projects where resources to make a film are more available than up front cash. This is how it's possible to make a $500,000 film when you've only got $70,000 in cash or direct funding. All the rest of the film's costs are defered.
The real problem with back end deals is that there is always a heirarchy of who gets paid. This usually means investors first. the trick to negotiating a back end deal is to ensure that not only do you get compensated for taking the risk, but also that you get placed highest in the heirarchy of payment.
The other probelm with back end deals is a little scam called the "rolling gross." This is where the producer adds more and more costs into the picture, so on paper the film never goes into sufficient profit to pay out on the deferments. The producer, of course, is earning off the costs.