Help me make a game like this

I’ve got the basic scripts down, but it keeps messing up. Here is basicaly what I have so far.