I wouldn't recommend trying to replace the site search with Google, even if you can get a userscript that does this. There are a number of search flags that will work with the integrated search that will not work with Google. You can search for specific tags with
[tagname], restrict the search to questions (
is:question) or answers (
is:answer), search within code fields (
code:), search only accepted answers (
isaccepted:1) etc. See How do I search? for more.
Instead I suggest you make searching using Google more convenient. rm -rf referenced a Chrome plugin for site searches. You can also (in Firefox at least, but I believe similarly elsewhere) use "keywords" such that typing
mma mysearch in the location bar will search the site for
Firefox this is done by creating a bookmark with the keyword
mma and the URL:
%s: this will be filled by e.g.
mysearch as described above. Multi-word searches are possible.