Smurf Cat Platformer

Instructions: Hehe, sorry for unsharing...\n\nFULLSCREEN; SPAM GREEN FLAG IF YOU'VE ALREADY PLAYED\n\narrow keys/wad\ndown key if theres a glitch & u get stuck\n\nstory: smurf cat got lost in the jungle. help reunite him with his family.

@Stage\n\nwhen flag clicked\nchange [pitch v] effect by (-10)\nswitch costume to (backdrop1 v)\nplay sound [MUUUZZIIICC v] until done\n\n@Ground\n\nwhen I receive [next_level v]\nchange [scene # v] by (1)\nnext costume\n\nwhen flag clicked\nset [last level v] to [11]\ngo to x: (1) y: (-74)\nset [scene # v] to [0]\nswitch costume to (lvl1 v)\n\n@nextlevel\n\nwhen flag clicked\ngo to x: (238) y: (26)\nshow\nset [ghost v] effect to (100)\nforever\n    if <<not <(Scene #) = [12]>> and <touching (player v)?>> then\n        broadcast (next_level v)\n        wait until <not <touching (player v)?>>\n    end\nend\n\n@Text\n\nwhen I receive [next_level v]\nnext costume\ngo to [back v] layer\n\nwhen flag clicked\ngo to x: (1) y: (-74)\nswitch costume to (lvl1 v)\ngo to [back v] layer\n\n@Obstacle\n\nwhen I receive [next_level v]\nnext costume\ngo to [back v] layer\nif <(costume [number v]) = [7]> then\n    go to [front v] layer\nend\n\nwhen flag clicked\ngo to x: (1) y: (-74)\nswitch costume to (lvl1 v)\ngo to [back v] layer\n\n@Sprite1\n\n@Player\n\nwhen flag clicked\nforever\n    if <key (down arrow v) pressed?> then\n        set size to (68) %\n        wait until <not <key (down arrow v) pressed?>>\n        set size to (90) %\n        change y by (9)\n    end\nend\n\ndefine die if touching obstacle\nif <<touching (obstacle v)?> or <touching (spider v)?>> then\n    set [falling v] to [0]\n    set [speed x v] to [0]\n    set [speed y v] to [0]\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    go to x: (-188) y: (-10)\n    set [ghost v] effect to (0)\nend\n\nwhen flag clicked\ngo to x: (-160) y: (10)\nset [speed y v] to [0]\nset [speed x v] to [0]\n\nwhen flag clicked\nset [friction v] to [0.8]\nset [gravity v] to [-1.25]\nset [jump_force v] to [20]\n\ndefine Move in steps (steps)\nrepeat (steps)\n    change [falling v] by (1)\n    set [last value v] to (x position)\n    change x by ((speed x) / (steps))\n    Touching Solid?\n    if <(touching solid?) = [1]> then\n        set x to (last value)\n        set [speed x v] to [0]\n    end\n    set [last value v] to (y position)\n    change y by ((speed y) / (steps))\n    Touching Solid?\n    if <(touching solid?) = [1]> then\n        set y to (last value)\n        if <[0] > (speed y)> then\n            set [falling v] to [0]\n        end\n        set [speed y v] to [0]\n    end\nend\n\nwhen I receive [next_level v]\ngo to x: (-188) y: (-10)\n\ndefine Touching Solid?\nset [touching solid? v] to [0]\nif <<touching (ground v)?> or <touching (moving_platform v)?>> then\n    set [touching solid? v] to [1]\nend\n\ndefine Jump and Crouch\nif <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <key (space v) pressed?>>> then\n    if <(falling) < [3]> then\n        set [speed y v] to (JUMP_FORCE)\n    end\nend\nchange [speed y v] by (GRAVITY)\n\ndefine Left or Right\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    change [speed x v] by (-2)\n    switch costume to (playerleft v)\nend\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    change [speed x v] by (2)\n    switch costume to (player v)\nend\nset [speed x v] to ((speed x) * (FRICTION))\n\ndefine Movement\nMove in steps (([abs v] of (speed x) ) + ([abs v] of (speed y) ))\n\nwhen flag clicked\nforever\n    Left or Right\nend\n\nwhen flag clicked\nforever\n    die if touching obstacle\nend\n\nwhen I receive [moving platform - backwards v]\nchange x by ((0) - (PLATFORM_SPEED))\n\nwhen I receive [moving platform - forwards v]\nchange x by (PLATFORM_SPEED)\n\nwhen flag clicked\nforever\n    if <key (down arrow v) pressed?> then\n        set size to (68) %\n        wait until <not <key (down arrow v) pressed?>>\n        set size to (90) %\n        change y by (9)\n    end\nend\n\nwhen flag clicked\nforever\n    set [playerx v] to (x position)\nend\n\nwhen flag clicked\nforever\n    Jump and Crouch\nend\n\nwhen flag clicked\nforever\n    Movement\nend\n\nwhen flag clicked\nforever\n    wait (0) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (4)\n    change [ghost v] effect by (25)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <touching color (#86ddff)?> then\n        set [gravity v] to [-0.05]\n        wait until <not <touching color (#86ddff)?>>\n        set [gravity v] to [-1.25]\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@Bubble\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nshow\nrepeat (8)\n    next costume\nend\ndelete this clone\n\nwhen flag clicked\npoint in direction (135)\nhide\nforever\n    if <(Scene #) = [3]> then\n        repeat until <(Scene #) = [4]>\n            create clone of (_myself_ v)\n            if <not <(Scene #) = [4]>> then\n                go to x: (pick random (-70) to (40)) y: (-145)\n                wait (pick random (1) to (1.5)) seconds\n            end\n        end\n    else\n        if <(Scene #) = [5]> then\n            repeat until <(Scene #) = [6]>\n                create clone of (_myself_ v)\n                if <not <(Scene #) = [6]>> then\n                    go to x: (pick random (-80) to (40)) y: (-148)\n                    wait (pick random (1) to (1.5)) seconds\n                end\n            end\n        end\n    end\nend\n\nstart sound [pop v]\n\n