I had the same error message as you. After the script crashed, I was able to manually install the packages that it said failed, and then run "sudo apt-get install frcsim".
So for example, in my case, I got the error "W: Failed to fetch
http://download.mono-project.com/rep...amd64/Packages 404 Not Found [IP: 54.230.38.37 80]"
This error means that it couldn't install mono on my computer, so I did a bit of googling and found out that I could install mono by running "sudo apt-get install mono-complete"
After I installed mono manually, I was able to run "sudo apt-get install frcsim" to finish the installation (note that running the install script again wont work, even after you manually install missing packages, because it will still crash with the same error)