When you say it doesn't execute, how are you determining this? There's nothing in the script that would have any obvious action.
Ostensibly, your script defines a couple of variables based on whether a specific file exists on your desktop:
if exists file File1 then
set FileName to File1 as string
set NumberFile to "File1.numbers"
set subFolder to "D1:"
set sourceName to "File1.pdf"
else....
You don't do anything with the variables NumberFile, subFolder or sourceName, so it isn't clear what you're doing.
There are, however, a couple of errors in your script that could have an impact.
First, your catch in case neither file exist - you post a dialog to inform the user Input File Not Found, but then the script goes ahead and tries to open the file anyway. If you expect the script to bail at this point, you need to add a return statement.
Additionally, you say:
> I have initially tried to run this script using the inFile parameter to set the file name
Without seeing what the previous action is doing, it's impossible to tell if this is valid or not. I don't know what text you are expecting to be extracted from the PDF, nor whether that is something that the script would interpret as a file path.
So other than moving the file to the trash (which I suppose could indicate the script ran), it's not clear what you expect this script to do, nor what it isn't doing that has you coming here.