There is already a script that let’s you drive a train.
Next time please just try use the search function.