This was not made to run by itself, but to be used as a template, so look at the code. If you spot any bugs, or think another template I could make, please let me know.
I found this platformer tutorial made in scratch by Griffpatch (project number 67727504), and I know he insisted I don't bother to give credit, but i'm going to ignore that, because it was what inspired me to make this. Thanks, Griffpatch!