Update script.js

updated script from workshop. Put in code