What do you want a script to do?
Check to see if SQL Server is running, and if not - start it? If so, I wouldn't want to just restart SQL Server automatically, because - if it crashed it crashed for a reason and just automatically restarting the service could cause additional corruption.
But, if you are really looking for something like that - then there are several options. Use a batch file that issues a NET START command and schedule it every few minutes, or install Powershell and look into Get-Service and Start-Service cmdlets, or use VBScript and use WMI to access the service and restart as needed, or other option.
Jeff
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs