ufotableが書き上げた脚本を、奈須きのこが原作者としてリライトしたのが本稿である。
My question is according to this sentence what happens to the written text of the film. Sorry for my low japanese knowledge but I started 2 months ago.
Edit (this edit was made after the answer had already been given): I found another sentence which is more relevant as this time it is said by the author himself in his blog
http://www.typemoon.org/bbb/diary/log/201506.html
#25の制作は「ほぼオリジナルなので、まずは原作サイドで書くべし」と始まりました。
そしてできあがったきのこによる脚本モドキを前に頭を抱える制作陣。
It was answered (to make sure) here: Understanding the true meaning in this sentence
A good translation would be:
The production of episode 25 began with "since it's mostly original content, it should first be written from the original author's standpoint". And then the production team clutching their heads at the completed so-called script by Kinoko.
So basically, as Naruto says at the end of the comments in that question: The sentence in this question says "Kinoko wrote it first as an original work, and ufotable modified it"