Update script.js

A first try for the difficulty setting, not yet tested, not yet userfriendly, to be removed if buggy.