I found the way to do this in the comment section of a really cool project from one of my friends that you should check out :) The Project: https://scratch.mit.edu/projects/965614018
@kavehamazing2023 for the project idea @louixan30 for the gravity code