Judge advises gunman to end life of crime as he imposed heav