How to use User Points for storing Quiz scores?
Userpoints has an API.

See especially userpoints_userpointsapi() Something like this: userpoints_userpointsapi(array('uid'=&gt;$some_user, 'points'=&gt;9000));

You might also be interested in the Quiz module which supports Userpoints.