In my time on Scratch I realized I never properly learned how to program platformers. I had no problem with the ground collisions, I even still use my old system in CPSG. My problem came in the walls and ceilings. Whenever I fixed a script for one direction, the other would break, and I realized that what I was trying to do was ineffective. At first I thought I would just ignore the problem and change the game so it wouldn't be an issue, but an idea for a collision script popped in my head today in class so I just had to test it. My other attempts I tried to have the character move in both axes at once first and THEN have them be forced out of the ground. Then, I realized I could have it move on one axis then be forced out before moving on the other and doing the same there. This way I could avoid the character being thrown every which way and lagging the game.
You can use this, remember to keep the hitboxes as squares and layer your costumes over them to make things simple. GIVE CREDIT for Pete's sake. Game I'm working on: https://scratch.mit.edu/studios/34601649