updated script.js

updated script with the output messgaes, still need to add comments for
the program