Help with decreasing lag

So I am trying to create a top-down version of Super Mario Kart, but it is kind of laggy. Are there any ways to decrease the lag on my project?

Here is the link if you want to have a look:
https://snap.berkeley.edu/snap/snap.html#present:Username=da-ultimate-creater&ProjectName=New%20Mario%20Kart%20attempt

(Check the notes for instructions)

It crashed multiple times for me so idk.

It is probably because it has a lot of costumes and sounds.

Ya probably.

half of the lag is from checking if sprites are touching, snap is really really slow at checking that.

from what i can tell you're only using it to see if the carts are on the track. you should probably use something similar to the waypoint system you have instead. maybe just check if the player is close enough to any of the lines between various waypoints?

if that's too hard, you could at least not check it twice in a row, i can see you've done that in a lot of the cpus.

other than that you generally just want to use less blocks. use position variables with lists containing both x and y so it hyperizes, and you can use the GO TO block with the dropdown to go to the coordinates in a 2 item list.

Wow, I barely did anything, yet it is very much faster! Thank you so much!