Actually, this clone version of script just passes its options through to tee, so you can list multiple files if you want.
script runs whatever shell is in environment variable SHELL, default /bin/sh. This clone version uses pty to allocate a pseudo-terminal, so the session is listed in /etc/utmp, and lots of things work right that didn't work in the original. For example: talk(1) works; mail(1) works; you can stop and restart the shell, with control-Z in sh or suspend in csh; and so on.
The script ends when the forked shell exits. This clone version is more careful than the original to let every last bit of output appear.