Hotlinking scripts has no effect on SERP ranking at all. What Google takes into account is organic links and quality of content. In other words to increase the ranking of your page with Google encourage others to link to your site with "quality" pages that are useful and context appropriate and ensure your page is of a high quality as well. You can take a look at Google's information on link schemes but basically any links that are designed to un-naturally manipulate your page rank can be considered part of a link scheme and a violation of Google's webmaster guidelines. Some examples of bad links are...
- Buying or selling links that pass pagerank
- Text advertisements that pass pagerank
- Low quality directory or bookmark site links
- keyword rich, hidden ,or low quality links embedded in widgets
What you ask about adding a link to the page through your widget would be classed as a low quality link embedded ion a widget as it does not add any value to the page or the widget in question. If you want to attract users to your site through the widget by all means you can add something like "Powered By XYZ" but the link should have the
rel=nofollow tag added to it so as not to violate the webmaster guides.