Ranking
You wouldn't need a script, you would need something closer to an AI in order to let the pc run for you in every situation. It's not impossible, but it's far to complex to be made