Help with code please

Rather than copying from a YT vid, find the associated sketch or article then copy/paste.