This funky loop doesn't have a lot of different notes. You live in the same spot on the neck of the bass. They key here is locking into those rhythms and working the notes you know that fit. Learn about the Root, fifth and octave relationship on a deeper level and see how it ties into other popular songs. Mess around with the shapes and the "right sounding notes" and see what your hands start to gravitate toward to create your own take on the last two measures of this grooving bass line.
"You can do all kinds of things with your instrument outside of its surface purpose. My bass is my crutch but the best crutch I could have."