I wasted a few minutes of my life today trying to run some code I downloaded online that gave me this error. I couldn’t figure out where ‘Script’ was defined.
Turns out it’s in System.Web.Extension. Add that reference and you should be fine.
Hopefully this will prevent you (or myself in the future!) from wasting 7 minutes of your life too.