The Platformer 

Instructions: [Arrow Keys] - Move\n\nDo not use this script if you are looking for a platformer script (this script sucks), instead follow my tutorial: https://scratch.mit.edu/projects/396779140/

@Stage\n\nwhen I receive [before start v]\nforever\n    play sound [xStep v] until done\nend\n\n@main character\n\nwhen flag clicked\nhide\n\nwhen I receive [before start v]\ngo to x: (-214) y: (-80)\nshow\nset [y v] to [0]\nset [x v] to [0]\npoint in direction (90)\nforever\n    change [y v] by (-1)\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching color (#000000)?> then\n        change y by (1)\n    end\n    if <touching color (#000000)?> then\n        change y by (1)\n    end\n    if <touching color (#000000)?> then\n        change y by (1)\n    end\n    if <touching color (#000000)?> then\n        change y by (1)\n    end\n    if <touching color (#000000)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <key (up arrow v) pressed?> then\n            set [y v] to [17]\n            if <([abs v] of (x) ) = (x)> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching color (#000000)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> and <touching color (#000000)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <touching color (#ff0000)?> then\n        go to x: (-214) y: (-80)\n    end\n    if <(x position) > [222]> then\n        broadcast (da next stage v)\n        go to x: (-214) y: (-80)\n    end\n    if <<not <key (down arrow v) pressed?>> and <touching color (#003fff)?>> then\n        set [y v] to [20]\n    end\nend\n\n@Obstacles\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen I receive [da next stage v]\nnext costume\n\nwhen I receive [before start v]\nshow\nforever\n    go to x: (0) y: (0)\nend\n\n@Bad guy\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <([costume # v] of [obstacles v]) = [7]> then\n        show\n        go to x: (0) y: (139)\n        point in direction (pick random (1) to (360))\n    end\nend\n\nwhen flag clicked\nforever\n    if <([costume # v] of [obstacles v]) = [7]> then\n        create clone of (_myself_ v)\n        wait (0.01) seconds\n    else\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    move (10) steps\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\n    if <not <([costume # v] of [obstacles v]) = [7]>> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <([costume # v] of [obstacles v]) = [7]>> then\n        hide\n    end\nend\n\n@trick\n\nwhen flag clicked\nhide\nforever\n    if <([costume # v] of [obstacles v]) = [14]> then\n        switch costume to (costume1 v)\n        go to x: (-66) y: (-139)\n        show\n    else\n        hide\n    end\n    if <([costume # v] of [obstacles v]) = [16]> then\n        go to x: (1) y: (90)\n        switch costume to (costume2 v)\n        show\n    end\n    if <<touching (main character v)?> or <(distance to [main character v]) = [30]>> then\n        hide\n    end\nend\n\n@cheater\n\nwhen flag clicked\ngo to x: (252) y: (-182)\nhide\nforever\n    if <([costume # v] of [obstacles v]) = [16]> then\n        go to [front v] layer\n        show\n    else\n        hide\n    end\n    if <([costume # v] of [obstacles v]) = [16]> then\n        if <key (space v) pressed?> then\n            repeat until <not <key (space v) pressed?>>\n                go to (mouse-pointer v)\n            end\n        end\n    end\nend\n\n@Intro\n\nwhen I start as a clone\nif <(size) = [70]> then\n    show\n    go to x: (0) y: (-110)\n    set [ghost v] effect to (100)\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (corpcooga v)\n    repeat (5)\n        change [ghost v] effect by (-20)\n    end\n    wait (0.5) seconds\n    repeat (10)\n        wait (0.01) seconds\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen flag clicked\nwait until <mouse down?>\nstop all sounds\nstart sound [Teleport v]\nhide\nbroadcast (before start v)\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nset volume to (100) %\nstart sound [Intro music v]\nshow\ngo to [front v] layer\ngo to x: (-240) y: (0)\npoint in direction (-150)\nswitch costume to (op v)\nset [ghost v] effect to (100)\nset [vel v] to [30]\nset size to (30) %\nrepeat until <(x position) = [0]>\n    change x by (vel)\n    turn right (vel) degrees\n    change [ghost v] effect by ((vel) * (-0.5))\n    change size by ((vel) / (6))\n    change [vel v] by (-2)\nend\nset size to (71) %\ncreate clone of (_myself_ v)\nset size to (70) %\ncreate clone of (_myself_ v)\nrepeat (15)\n    set [bounce v] to (((bounce) * (0.7)) + ((80.5) - (size)))\n    change size by (bounce)\nend\nset size to (80) %\nwait (0.2) seconds\npoint in direction (90)\nset [sine v] to [0]\nrepeat (15)\n    point in direction ((90) + (([tan v] of ((sine) * (8)) ) * (10)))\nend\npoint in direction (90)\nset [size vel v] to [18]\nrepeat until <(size vel) < [2]>\n    change [size vel v] by (-2)\n    change size by (size vel)\n    turn left ((size vel) * (4)) degrees\nend\nset [sine v] to [0]\nrepeat until <(x position) < [0]>\n    set x to (([tan v] of ((sine) * (8)) ) * (20))\n    turn right (([tan v] of ((sine) * (8)) ) * (20)) degrees\nend\nrepeat until <(x position) > [0]>\n    set x to (([tan v] of ((sine) * (8)) ) * (20))\n    turn right (((90) - (direction)) / (3)) degrees\nend\nrepeat until <(size vel) < [-17]>\n    change [size vel v] by (-2)\n    change size by ((size vel) / (1.25))\n    turn left ((size vel) * (4)) degrees\nend\npoint in direction (90)\nset x to (0)\nwait (0.5) seconds\ncreate clone of (_myself_ v)\nwait (0.9) seconds\nhide\nwait (1) seconds\nstop [other scripts in sprite v]\nbroadcast (before start v)\n\nwhen I start as a clone\nif <(size) = [80]> then\n    set [sizevel v] to [30]\n    go to x: (0) y: (0)\n    switch costume to (costume1 v)\n    set size to (30) %\n    show\n    go to [front v] layer\n    repeat (30)\n        switch costume to (hax v)\n        change size by (sizevel)\n        change [sizevel v] by (-1)\n        switch costume to (costume1 v)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(size) = [71]> then\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (poof-0 v)\n    repeat (13)\n        wait (0.005) seconds\n        next costume\n    end\n    delete this clone\nend\n\nwhen flag clicked\nforever\n    change [sine v] by (1)\nend\n\nwhen I start as a clone\nforever\n    if <mouse down?> then\n        delete this clone\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\nend\n\n