The script still works. You either enter the alias command:
/goo.gl URL_Here
(The alias command is for the client that runs the code to use.) Or the text trigger command from people:
!goo.gl URL_Here
(This trigger is for people who activate it from the client who runs the code.)
Replace URL_Here with an actual website address to shorten.
The author should have included the instruction when he submitted this snippet, which would've made it easy for newbies to use it.