The problem here is intent. His intention was to write a script for his job.
He can't hire himself to do his own job. Which is what he would effectively be doing by claiming he wrote it "off hours". The very act of writing that script put him "on hours". Now, was it unpaid work? That's a different story. Although since he's also technically not doing work during work hours, one could call it a wash.
If he bought the script, then the company likely needs to reimburse him the cost of that, because its materials for the job. But he wouldn't want to make that request, because then the jig is up.
But then again, we aren't playing "what ifs". There are concrete elements to his story. He did write the script. It is explicitly for this company. It won't work for any other company without large modifications. The non-portability and exclusivity of this script means it was written for the express purpose of doing this thing for this company.
And let's be completely fair here, he cobbled this thing together from StackOverflow snippets. If he's ever found out and fired, even if he takes his script, they're probably looking at a day or two to replicate this work.
The real question for him is would it be worth it? The firm would be minimally affected and could, in turn, make things incredibly difficult for him. This is a law firm. This is what they do. The cost of suing him is negligible, because they already do so much of the work normally. We're really talking about the additional court and filing fees. Whereas, he'd have to retain a lawyer himself. Who would then bill him for all the work they'd do.
Consider, they were paying him $90k to copy files. They have that kind of money to throw at the problem. Do you really want to become a problem?
He can't hire himself to do his own job. Which is what he would effectively be doing by claiming he wrote it "off hours". The very act of writing that script put him "on hours". Now, was it unpaid work? That's a different story. Although since he's also technically not doing work during work hours, one could call it a wash.
If he bought the script, then the company likely needs to reimburse him the cost of that, because its materials for the job. But he wouldn't want to make that request, because then the jig is up.
But then again, we aren't playing "what ifs". There are concrete elements to his story. He did write the script. It is explicitly for this company. It won't work for any other company without large modifications. The non-portability and exclusivity of this script means it was written for the express purpose of doing this thing for this company.
And let's be completely fair here, he cobbled this thing together from StackOverflow snippets. If he's ever found out and fired, even if he takes his script, they're probably looking at a day or two to replicate this work.
The real question for him is would it be worth it? The firm would be minimally affected and could, in turn, make things incredibly difficult for him. This is a law firm. This is what they do. The cost of suing him is negligible, because they already do so much of the work normally. We're really talking about the additional court and filing fees. Whereas, he'd have to retain a lawyer himself. Who would then bill him for all the work they'd do.
Consider, they were paying him $90k to copy files. They have that kind of money to throw at the problem. Do you really want to become a problem?