Platformer - #games
@Stage\n\n@Sprite1\n\nwhen flag clicked\nset size to (600) %\ngo to [front v] layer\nset [default size v] to [0]\nforever\n    switch costume to (hitbox v)\n    go to x: (default size) y: (y position)\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        change [x v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        change [x v] by (-1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (sprite3 v)?> then\n        change y by (1)\n        if <touching (sprite3 v)?> then\n            change y by (1)\n            if <touching (sprite3 v)?> then\n                change y by (1)\n                if <touching (sprite3 v)?> then\n                    change y by (1)\n                    if <touching (sprite3 v)?> then\n                        change y by (1)\n                        if <touching (sprite3 v)?> then\n                            change x by ((x) * (-1))\n                            change y by (-5)\n                            if <key (up arrow v) pressed?> then\n                                if <(x) > [0]> then\n                                    set [x v] to [-6]\n                                else\n                                    set [x v] to [6]\n                                end\n                                set [y v] to [13]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1.5)\n    change y by (y)\n    if <touching (sprite3 v)?> then\n        out\n        if <key (up arrow v) pressed?> then\n            set [y v] to [16]\n        end\n        out2\n    end\n    if <[3] > (item (last) of [infront v])> then\n        set [default size v] to (x position)\n        if <not <(x position) > [0]>> then\n            set [default size v] to [0]\n            change [scrollx v] by ((x) * (-1))\n        end\n    else\n        if <(item (1) of [infront v]) > [0]> then\n            set [default size v] to (x position)\n            if <not <[0] > (x position)>> then\n                set [default size v] to [0]\n                change [scrollx v] by ((x) * (-1))\n            end\n        else\n            set [default size v] to [0]\n            change [scrollx v] by ((x) * (-1))\n        end\n    end\n    if <[-207] > (y position)> then\n        set [scrollx v] to [0]\n        go to x: (0) y: (0)\n    end\n    if <<(y) = [0]> and <([abs v] of (x) ) > [2]>> then\n        change [i v] by (0.5)\n        switch costume to (((i) mod (7)) + (5))\n    else\n        if <(y) > [0]> then\n            switch costume to (jump2 v)\n        else\n            if <[0] > (y)> then\n                switch costume to (jump3 v)\n            else\n                switch costume to (jump v)\n            end\n        end\n    end\nend\n\nchange x by (1)\nif <not <touching (sprite3 v)?>> then\nend\nchange x by (-1)\n\nchange x by (-1)\nif <not <touching (sprite3 v)?>> then\nend\nchange x by (1)\n\ndefine out\nif <(y) < [-1]> then\n    repeat until <not <touching (sprite3 v)?>>\n        change y by (1)\n    end\nelse\n    change y by ((y) * (-1))\nend\nset [y v] to [0]\n\ndefine out2\nset [i1 v] to [0]\nrepeat until <(i1) = [20]>\n    if <touching (sprite3 v)?> then\n        stop [this script v]\n    end\n    change [i1 v] by (1)\n    change y by (-1)\nend\nchange y by (20)\n\nchange y by (1)\n\n@Sprite2\n\nwhen flag clicked\nset [scrollx v] to [0]\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nhide\nrepeat (8)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\nshow\nforever\n    go to x: ((scrollx) + (((costume [number v]) - (1)) * (480))) y: (0)\n    if <<(x position) > [463.9]> or <[-463.9] > (x position)>> then\n        hide\n    else\n        show\n    end\n    replace item (costume [number v]) of [infront v] with (x position)\nend\n\nadd [thing] to [infront v]\n\n@Sprite3\n\nwhen flag clicked\nset [scrollx v] to [0]\ngo [backward v] (3) layers\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nhide\nrepeat (8)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\nshow\nforever\n    go to x: ((scrollx) + (((costume [number v]) - (1)) * (480))) y: (0)\n    if <<(x position) > [463.9]> or <[-463.9] > (x position)>> then\n        hide\n    else\n        show\n    end\nend\n\nwait (0) seconds\ncreate clone of (_myself_ v)\n\n@Sprite5\n\nwhen flag clicked\nshow\nforever\n    go to x: (0) y: (0)\nend\n\nhide\n\n@Sprite6\n\nwhen flag clicked\ngo to x: (0) y: (50)\ngo to [front v] layer\ngo [backward v] (30) layers\nforever\n    set x to ((scrollx) / (5))\nend\n\n@Cloud\n\nwhen flag clicked\ngo to [front v] layer\nset [i v] to [0]\ngo [backward v] (35) layers\ngo to x: (0) y: (25)\nforever\n    set x to (((scrollx) / (8)) + (i))\n    if <(x position) < [-850]> then\n        go to x: (165) y: (25)\n        set [i v] to [350]\n    end\n    change [i v] by (-0.25)\nend\n\nif  then\n    change x by (-0.25)\nend\n\nif <(x) < [0]> then\n    change x by (0.5)\nelse\nend\n\n@ASSETS!\n\nwhen flag clicked\n\n@Sprite7\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume5 v)\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@Sprite4\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nrepeat (5)\n    create clone of (_myself_ v)\n    next costume\nend\nhide\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (6) layers\nforever\n    go to x: ((scrollx) + ((costume [number v]) * (480))) y: (0)\n    if <<(x position) > [240.9]> or <[-240.9] > (x position)>> then\n        hide\n    else\n        show\n    end\n    if <(distance to [sprite1 v]) < [200]> then\n        say (item (costume [number v]) of [say v])\n    else\n        say []\n    end\nend\n\n