Preserving variable in script run with sudo

In a nutshell, I want $USER to reflect my user ID in a script run with sudo. I'm working with OSX in case that makes a difference.

If I 'sudo echo $USER', I get my user ID. But if I 'sudo myscript.sh' and myscript.sh has a line to echo $USER, I get 'root' I'm hoping there's a switch I can add to the shebang in the script to allow env variables to creep in.

I'm aware of 'sudo -E', but A) that doesn't work, as the script is still running in a new process spawned by root; and B) that wouldn't work as it would require someone running the script to know to use that switch.

Try this when running script with sudo:

ps --no-headers -o user -p `ps --no-headers -o ppid -p $PPID`