could you guys help me 2d game scripting?

He i just started with making games so i do not now much about scripting so maby if you guys give me som hints or the basic things i need to now for scripting. I have a basic understanding of javascript

This is where i started: https://www.youtube.com/watch?v=Xnyb2f6Qqzg