I don't know of a script that can do that particularly...
But here's a tutorial on how to create login and register pages.
http://robouk.mchost.com/tuts/tutorial.php?tutorial=login
I'm assuming people would have to pay to become a member, so they don't see the ads? You could use paypal or something to accept Credit Cards if that's what you want to do.
If you had an ad like <img src="banner.gif"> somewhere on your site, you could check if the user is a member (like on the members.php page in the tutorial I linked to) with:
if(!isset($_COOKIE['LoggedIn']))
{
// User isn't logged in, display the ad.
echo '<img src="banner.gif">';
}
else
{
// User's logged in, skip the ad.
}