Your test is misleading, because PATH is expanded before calling sudo. Instead, do:
sudo sh -c 'echo $PATH'
and you will see that there is a different path.
To include /home/nomemory/.scriptfarm/scripts
in your system-wide PATH, you can modify /etc/profile
:
PATH="$PATH:/home/nomemory/.scriptfarm/scripts"