Updated script.js

updated with the variables and comments