I would like to ask you all, is there a script to make cars computers and try to compete with you to win the race and also try to kill you at the same time?
Short answer: No.
This is called AI (Artificial Intelligence) and is a non trivial problem to solve. It’s not something where you can just attach a script to a car and be good to go. When the player controls a car there is a lot of decision making that happens, for example: when you approach a corner you slow down and turn the wheel. This sounds simple enough but when you consider what is really involved it can be quite complicated to simulate
break this down:
see the corner - some kind of perception of the world
slow down and turn- judge how much to slow down and how hard to turn
These things are both quite complex, for the AI car to ‘see’ the corner they need some kind of perception. It’s usually easiest to just feed them the raw track data than try to have them analyze the game world. The same for the turning.
These implementation details are largely dependent on the application, different games would design different types of tracks so a generic AI would not be compatible for different games.