INFINITE - a Platformer

Instructions: Use the arrow keys or WASD.

@Stage\n\nwhen I receive [done w/ logo v]\nrepeat until <(Level) = [16]>\n    play sound [91476_Glorious_morning v] until done\nend\nstop all sounds\nforever\n    play sound [trololol v] until done\nend\n\n@Bob Dude\n\nwhen I receive [start v]\ngo [backward v] (1) layers\ngo to x: (-200) y: (0)\nshow\nset [yv v] to [0]\nset [xv v] to [0]\nforever\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        change [xv v] by (1)\n        point in direction (90)\n    end\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        change [xv v] by (-1)\n        point in direction (-90)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <<touching (level v)?> or <touching (moving sprites v)?>> then\n        change y by (1)\n        if <<touching (level v)?> or <touching (moving sprites v)?>> then\n            change y by (1)\n            if <<touching (level v)?> or <touching (moving sprites v)?>> then\n                change y by (1)\n                if <<touching (level v)?> or <touching (moving sprites v)?>> then\n                    change y by (1)\n                    if <<touching (level v)?> or <touching (moving sprites v)?>> then\n                        change y by (1)\n                        if <<touching (level v)?> or <touching (moving sprites v)?>> then\n                            change y by (1)\n                            if <<touching (level v)?> or <touching (moving sprites v)?>> then\n                                change x by ((Xv) * (-1))\n                                change y by (-8)\n                                if <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                                    if <(Xv) > [0]> then\n                                        set [xv v] to [-10]\n                                    else\n                                        set [xv v] to [10]\n                                    end\n                                    set [yv v] to [10]\n                                else\n                                    set [xv v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-0.5)\n    change y by (Yv)\n    if <<touching (level v)?> or <touching (moving sprites v)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-0.5)\n    if <<<touching (level v)?> or <touching (moving sprites v)?>> and <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>>> then\n        set [yv v] to [9]\n    end\n    change y by (0.5)\n    if <[235] < (x position)> then\n        go to x: (-200) y: (0)\n        broadcast (New Level v)\n        change [level v] by (1)\n    end\n    if <<(y position) < [-175]> or <touching (spike v)?>> then\n        go to x: (-200) y: (0)\n    end\n    if <touching (jumpy thingimajig v)?> then\n        set [yv v] to [12.5]\n    end\n    if <touching (water v)?> then\n        change y by (15)\n        if <touching (water v)?> then\n            change y by (-15)\n            if <touching (water v)?> then\n                change y by (-1)\n                change [yv v] by (0.4)\n                if <touching (level v)?> then\n                    set [yv v] to [0]\n                end\n                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                    if <<touching (level v)?> or <touching (moving sprites v)?>> then\n                        set [yv v] to [7]\n                    else\n                        change [yv v] by (0.6)\n                    end\n                end\n                change y by (1)\n                set [yv v] to ((Yv) * (0.9))\n                if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                    change [xv v] by (0.1)\n                end\n                if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                    change [xv v] by (-0.1)\n                end\n                if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n                    change [yv v] by (-0.4)\n                end\n                set [was swimming v] to [1]\n            else\n                set [was swimming v] to [0]\n            end\n        else\n            change y by (-15)\n            if <(Was Swimming) = [1]> then\n                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                    start sound [Splash v]\n                    set [yv v] to [7]\n                end\n            end\n            set [yv v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nswitch costume to (regular v)\nset [level v] to [1]\nhide\nset rotation style [left-right v]\n\nwhen I receive [normal v]\nswitch costume to (regular v)\n\nwhen I receive [orage v]\nswitch costume to (orange v)\n\nwhen I receive [blue v]\nswitch costume to (blue v)\n\nwhen I receive [green v]\nswitch costume to (green v)\n\nwhen I receive [yellow v]\nswitch costume to (yellow v)\n\nwhen I receive [red v]\nswitch costume to (red v)\n\nwhen I receive [purple v]\nswitch costume to (purple v)\n\nwhen I receive [color v]\ngo to x: (0) y: (-200)\nwait (0.5) seconds\nshow\nglide (1) secs to x: (0) y: (-160)\n\n\n    set [yv v] to [9]\nend\n\nwhen flag clicked\nset volume to (100) %\nforever\n    if <touching (water v)?> then\n        start sound [Splash v]\n        wait until <not <touching (water v)?>>\n    end\nend\n\n@Play Button\n\nwhen I receive [cool beginning v]\nshow\ngo to x: (-2400) y: (30)\nset [ghost v] effect to (80)\nrepeat (25)\n    change x by (((0) - (x position)) * (0.2))\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [start v]\nset [play1 v] to [12]\n\n    change y by (Play1)\n    change [play1 v] by (-2)\n    if <touching (_edge_ v)?> then\n        hide\n        stop [this script v]\n    end\nend\n\nrepeat (6)\n    change x by (Play1)\nend\n\nwhen I receive [done w/ logo v]\nset [playing? v] to [false]\nhide\nbroadcast (Cool Beginning v)\nset size to (105) %\nset [color v] effect to (0)\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (120) %\n        set [brightness v] effect to (20)\n        if <mouse down?> then\n            set [playing? v] to [true]\n            broadcast (Start v) and wait\n        end\n    else\n        clear graphic effects\n        set size to (105) %\n    end\nend\n\n@Level\n\nwhen flag clicked\ngo to [back v] layer\ngo [forward v] (2) layers\nhide\n\nwhen I receive [new level v]\nnext costume\n\nwhen I receive [start v]\nshow\nswitch costume to (level 1 v)\nforever\n    go to x: (0) y: (0)\nend\n\ngo to [front v] layer\n\n@Backround\n\nwhen flag clicked\ngo to x: (15) y: (-15)\nforever\n    switch costume to (cubed2 v)\n    go to [back v] layer\n    go [backward v] (1) layers\nend\n\nwhen I receive [start v]\nswitch costume to (cubed v)\n\n@POOT\n\nwhen I receive [start v]\nforever\n    go to (bob dude v)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\nswitch costume to (regular v)\n\nwhen I start as a clone\nshow\nrepeat (20)\n    change [ghost v] effect by (10)\n    change size by (-3)\nend\ndelete this clone\n\nwhen I receive [blue v]\nswitch costume to (blue v)\n\nwhen I receive [green v]\nswitch costume to (green v)\n\nwhen I receive [normal v]\nswitch costume to (regular v)\n\nwhen I receive [purple v]\nswitch costume to (purple v)\n\nwhen I receive [red v]\nswitch costume to (red v)\n\nwhen I receive [orage v]\nswitch costume to (orange v)\n\nwhen I receive [yellow v]\nswitch costume to (yellow v)\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nset size to (100) %\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nshow\n\nshow\n\nstop [all v]\n\n@Logo\n\nwhen I receive [cool beginning v]\nshow\ngo to x: (2400) y: (120)\nset [ghost v] effect to (80)\nrepeat (25)\n    change x by (((-5) - (x position)) * (0.2))\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [start v]\nset [play1 v] to [12]\n\n    change y by (Play1)\n    if <(y position) < [-170]> then\n        repeat (6)\n            change y by (Play1)\n        end\n        hide\n        set [play1 v] to [0]\n        stop [this script v]\n    end\nend\n\n@Spike\n\nwhen flag clicked\ngo to [back v] layer\nhide\ngo [forward v] (1) layers\nforever\n    if <(Level) = [5]> then\n        show\n        switch costume to (level 5 v)\n    end\n    if <(Level) = [6]> then\n        hide\n    end\n    if <(Level) = [8]> then\n        switch costume to (level 8 v)\n        show\n    end\n    if <(Level) = [9]> then\n        hide\n    end\n    if <(Level) = [11]> then\n        show\n        switch costume to (level 11 v)\n    end\n    if <(Level) = [12]> then\n        show\n        switch costume to (level 12 v)\n    end\n    if <(Level) = [13]> then\n        show\n        switch costume to (level 13 v)\n    end\n    if <(Level) = [14]> then\n        hide\n    end\nend\n\n@Jumpy Thingimajig\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [6]> then\n        switch costume to (level 6 v)\n        show\n    end\n    if <(Level) = [7]> then\n        hide\n    end\n    if <(Level) = [8]> then\n        show\n        switch costume to (level 8 v)\n    end\n    if <(Level) = [9]> then\n        hide\n    end\n    if <(Level) = [12]> then\n        show\n        switch costume to (level 12 v)\n    end\n    if <(Level) = [13]> then\n        hide\n    end\n    if <(Level) = [16]> then\n        show\n        switch costume to (level 16 v)\n    end\nend\n\n@Colors\n\nwhen flag clicked\nset [number v] to [0]\nforever\n    hide\nend\n\nwhen I receive [color v]\nset [number v] to [0]\nwait (0) seconds\nrepeat (7)\n    change [number v] by (1)\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\n\nwhen I start as a clone\nshow\nif <(Number) = [1]> then\n    switch costume to (costume7 v)\n    go to x: (-60) y: (-180)\n    forever\n        change y by (((-130) - (y position)) * (0.2))\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (30)\n            if <mouse down?> then\n                broadcast (Normal v)\n            end\n        else\n            clear graphic effects\n        end\n    end\nend\nif <(Number) = [2]> then\n    switch costume to (costume1 v)\n    go to x: (-40) y: (-180)\n    forever\n        change y by (((-130) - (y position)) * (0.2))\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (30)\n            if <mouse down?> then\n                broadcast (Red v)\n            end\n        else\n            clear graphic effects\n        end\n    end\nend\nif <(Number) = [3]> then\n    switch costume to (costume2 v)\n    go to x: (-20) y: (-180)\n    forever\n        change y by (((-130) - (y position)) * (0.2))\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (30)\n            if <mouse down?> then\n                broadcast (Orage v)\n            end\n        else\n            clear graphic effects\n        end\n    end\nend\nif <(Number) = [4]> then\n    switch costume to (costume3 v)\n    go to x: (0) y: (-180)\n    forever\n        change y by (((-130) - (y position)) * (0.2))\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (30)\n            if <mouse down?> then\n                broadcast (Yellow v)\n            end\n        else\n            clear graphic effects\n        end\n    end\nend\nif <(Number) = [5]> then\n    switch costume to (costume4 v)\n    go to x: (20) y: (-180)\n    forever\n        change y by (((-130) - (y position)) * (0.2))\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (30)\n            if <mouse down?> then\n                broadcast (Green v)\n            end\n        else\n            clear graphic effects\n        end\n    end\nend\nif <(Number) = [6]> then\n    switch costume to (costume5 v)\n    go to x: (40) y: (-180)\n    forever\n        change y by (((-130) - (y position)) * (0.2))\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (30)\n            if <mouse down?> then\n                broadcast (Blue v)\n            end\n        else\n            clear graphic effects\n        end\n    end\nend\nif <(Number) = [7]> then\n    switch costume to (costume6 v)\n    go to x: (60) y: (-180)\n    forever\n        change y by (((-130) - (y position)) * (0.2))\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (30)\n            if <mouse down?> then\n                broadcast (Purple v)\n            end\n        else\n            clear graphic effects\n        end\n    end\nend\n\nif <<touching (mouse-pointer v)?> and <mouse down?>> then\n    broadcast (Red v)\nend\n\nif <<touching (mouse-pointer v)?> and <mouse down?>> then\n    broadcast (Orage v)\nend\n\nif <<touching (mouse-pointer v)?> and <mouse down?>> then\n    broadcast (Yellow v)\nend\n\nif <<touching (mouse-pointer v)?> and <mouse down?>> then\n    broadcast (Green v)\nend\n\nif <<touching (mouse-pointer v)?> and <mouse down?>> then\n    broadcast (Blue v)\nend\n\nif <<touching (mouse-pointer v)?> and <mouse down?>> then\n    broadcast (Purple v)\nend\n\nwhen I start as a clone\nforever\n    if <(Playing?) = [true]> then\n        hide\n        delete this clone\n    end\nend\n\n@Color Button\n\nwhen I receive [cool beginning v]\nshow\ngo to x: (2400) y: (-30)\nset [ghost v] effect to (80)\nrepeat (25)\n    change x by (((-5) - (x position)) * (0.2))\n    change [ghost v] effect by (-10)\nend\nwait until <<touching (mouse-pointer v)?> and <mouse down?>>\nwait until <not <mouse down?>>\nif <touching (mouse-pointer v)?> then\n    broadcast (Color v)\n    delete this clone\nend\n\nwhen I receive [start v]\nset [play1 v] to [12]\n\n    change y by (Play1)\n    change [play1 v] by (-2)\n    if <touching (_edge_ v)?> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [done w/ logo v]\nhide\nset size to (105) %\nset [color v] effect to (0)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n        set size to (120) %\n    else\n        clear graphic effects\n        set size to (105) %\n    end\nend\n\n@Water\n\nwhen flag clicked\ngo to [back v] layer\ngo [forward v] (1) layers\nhide\nforever\n    if <(Level) = [9]> then\n        switch costume to (level 9 v)\n        show\n    end\n    if <(Level) = [10]> then\n        hide\n    end\n    if <(Level) = [11]> then\n        show\n        switch costume to (level 11 v)\n    end\n    if <(Level) = [12]> then\n        hide\n    end\n    if <(Level) = [13]> then\n        show\n        switch costume to (level 13 v)\n    end\n    if <(Level) = [14]> then\n        hide\n    end\nend\n\n@Particles\n\nwhen I receive [start v]\nforever\n    wait (pick random (0.06) to (0.08)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I start as a clone\ngo to [back v] layer\ngo [forward v] (1) layers\nshow\nclear graphic effects\nset size to (pick random (1) to (200)) %\nset [ghost v] effect to (pick random (90) to (111))\ngo to x: (400) y: (pick random (-170) to (180))\nglide (pick random (1.01) to (5)) secs to x: (-240) y: (pick random (-180.1) to (180))\ndelete this clone\n\n@Words\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    switch costume to (Level)\nend\n\n@Timer\n\nwhen flag clicked\nhide variable [time v]\n\nwhen I receive [start v]\nreset timer\nshow variable [time v]\nforever\n    set [time v] to ((round ((timer) * (10))) / (10))\n    if <(Level) = [16]> then\n        stop [this script v]\n    end\nend\n\n@Burger Walking\n\nwhen flag clicked\nshow\nstart sound [Kahoot Lobby Music v]\nrepeat (75)\n    wait (0.01) seconds\n    next costume\nend\nhide\nstop all sounds\nbroadcast (Done w/ Logo v)\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\nend\n\n