Simple code no need of credit 2024 edit: This is a very basic code, now I use much more advanced motion graphics. There are MUCH better ways to do this(good one is friction)