Map out a strong plot for the comedy to showcase. Take the time to focus and develop the characters, locations and storyline. You may have the best jokes ever heard, but moviegoers are not looking for a random collection of laughs. They want a good movie that will keep them engaged in between jokes.
Feature likable characters. Things can be only so funny unless you include characters the audience can relate to. Keep the plot moving forward by having the lead go through a transition, or be someone moviegoers can relate to and sympathize with.
Write as many jokes and gags as you can. Editing will bring out the best, but the more jokes and scenarios you include, the stronger the scenes. This may involve writing multiple versions of the same scene and picking the funniest one for your script.
Stick to the rule of thumb limiting it to three jokes per one page of manuscript. Weak jokes can always be cut out during post-production. In general, the more laughs you can generate with the script, the greater the chances of success for your screenplay.
Ask other people to read your script and critique your ideas. They essentially will act as the audience. You should be receptive to their ideas and suggestions in order to make the script as funny as possible.
Read lines out loud to yourself to see how they will play out. Some screenwriting software has built-in voice technology that will read your script for you. Hearing jokes out loud can provide a new perspective.