Anyone who collaborates on a screenplay and adds to it has some copyrights. It is important to realise even if you have not physically typed out the work if you have created it in partnership you still have rights to the work. In a joint authorship all authors will have to sign off in agreement concerning assignment or rights to the work.
Co authorship is when writers produce small parts of worth of which each author will own. For example the first author writes the 1st scene and the 2nd the 2nd scene. Each will own their own scene and have writes to the work. This will all have to be agreed buy producers.
Having these things worked out clearly and transparently is always a good thing. Each artist should be made aware of how these things work.
There has been a famous story where Matthew Fisher an organist in the bad Procol Harum brought about legal claims of copyright for the song “A whiter Shade of Pale”. The case was brought to court and Fisher was awarded the rights as joint author to the song.