Here are some things to try, I'm assuming that the computer used the manufacturers restore point to go back to factory defaults, and I'm assuming that you used the free Windows 10 upgrade, with that said try going into Windows update and try updating until it says you are up to date, if it still has not upgraded to win. 10, try going to Microsoft.com and search windows 10 and see if you can still upgrade for free, if not try backing up with a full disk image to like an external hard drive and boot from a win. 10 install media and try upgrading, if it says your key is not for win. 10 try installing win. 10 fresh, your win. 8.1 key should (key word should) work if you upgraded in the past, if it doesn't, restore from your backup and contact Microsoft because for some reason your win. 8.1 key was not update to win. 10
And if all else fail you can buy a win. 10 key from like newegg or something.