I think you can refer to geometry dash meltdown to solve this problem.