Adventureland - A Platformer [Mobile]


@Stage\n\nwhen I receive [message2 v]\nrepeat (20)\n    change volume by (-5)\nend\nrepeat (20)\n    change volume by (5)\nend\nforever\n    play sound [DJ Striden - Lunar \[Video Game\] by DJ Striden.mp3 v] until done\nend\n\nwhen flag clicked\nset volume to (100) %\nstart sound [TheFatRat - Jackpot \(Jackpot EP Track 1\).mp3 v]\n\nwhen flag clicked\ndelete all of [mobileorcomputer v]\nforever\n    if <(answer) = [computer]> then\n        add [computer] to [mobileorcomputer v]\n    end\nend\n\nwhen flag clicked\nask [mobile or computer?] and wait\n\n@Sprite1\n\nwhen flag clicked\nshow variable [level v]\nset [lives lost v] to [0]\nshow variable [lives lost v]\npoint in direction (90)\nset rotation style [left-right v]\ngo to x: (-203) y: (-80)\nshow\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<<<<(y position) = [-180]> or <(y position) < [-180]>> or <touching color (#b10000)?>> or <touching color (#4a4a4a)?>> or <touching color (#898989)?>> then\n        point in direction (90)\n        change [lives lost v] by (1)\n        go to x: (-203) y: (-80)\n    end\n    if <<(x position) > [230]> and <not <(Level) = [13]>>> then\n        set [addlevel v] to [1]\n        broadcast (levelup v) and wait\n        go to x: (-203) y: (-80)\n    end\n    if <[mobileorcomputer v] contains [computer]?> then\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            point in direction (-90)\n            change [xv v] by ((-1) - (((ExtraSpeed) - (lovenfavespeed)) * (boosteffects)))\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            point in direction (90)\n            change [xv v] by ((1) + (((ExtraSpeed) + (lovenfavejump)) * (boosteffects)))\n        end\n        if <key (s v) pressed?> then\n            wait until <not <key (s v) pressed?>>\n            point in direction (90)\n            broadcast (levelup v)\n            go to x: (-203) y: (-80)\n        end\n    else\n        if <<mouse down?> and <(mouse x) < (x position)>> then\n            point in direction (-90)\n            change [xv v] by ((-1) - (((ExtraSpeed) - (lovenfavespeed)) * (boosteffects)))\n        end\n        if <<mouse down?> and <(mouse x) > (x position)>> then\n            point in direction (90)\n            change [xv v] by ((1) + (((ExtraSpeed) + (lovenfavejump)) * (boosteffects)))\n        end\n    end\n    set [xv v] to ((xv) * (0.85))\n    change x by (xv)\n    if <touching color (#007606)?> then\n        change y by (-2)\n        if <touching color (#007606)?> then\n            change y by (1)\n            if <touching color (#007606)?> then\n                change y by (1)\n                if <touching color (#007606)?> then\n                    change y by (1)\n                    if <touching color (#007606)?> then\n                        change y by (1)\n                        if <touching color (#007606)?> then\n                            change y by (1)\n                            if <touching color (#007606)?> then\n                                change y by (-4)\n                                change x by ((-1) * (xv))\n                                if <[mobileorcomputer v] contains [computer]?> then\n                                    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <touching color (#fcff00)?>> and <not <(xv) = [0]>>> then\n                                        set [mode v] to [walljump]\n                                        set [yv v] to [8]\n                                        set [xv v] to (((xv) / ([abs v] of (xv) )) * (-10))\n                                    else\n                                        set [mode v] to [wallslide]\n                                        set [xv v] to [0]\n                                    end\n                                else\n                                    if <<<mouse down?> and <((mouse y) - (y position)) > [50]>> and <not <(xv) = [0]>>> then\n                                        set [mode v] to [walljump]\n                                        set [yv v] to [8]\n                                        set [xv v] to (((xv) / ([abs v] of (xv) )) * (-10))\n                                    else\n                                        set [mode v] to [wallslide]\n                                        set [xv v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (1)\n    end\n    change y by (-3)\n    if <touching color (#007606)?> then\n        if <(yv) = [-3]> then\n            if <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> or <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n                set [mode v] to [run]\n            else\n                if <([abs v] of (xv) ) > [.1]> then\n                    set [mode v] to [skid]\n                else\n                    set [mode v] to [stand]\n                end\n            end\n        end\n        if <[mobileorcomputer v] contains [computer]?> then\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                set [mode v] to [jump]\n                set [yv v] to ((7) + (((ExtraJump) + (lovenfavejump)) * (boosteffects)))\n            end\n            if <touching color (#fcff00)?> then\n                set [mode v] to [jump]\n                set [yv v] to ((10) + (((ExtraJump) + (lovenfavejump)) * (boosteffects)))\n            end\n        else\n            if <<mouse down?> and <((mouse y) - (y position)) > [50]>> then\n                set [mode v] to [jump]\n                set [yv v] to ((7) + (((ExtraJump) + (lovenfavejump)) * (boosteffects)))\n            end\n            if <touching color (#fcff00)?> then\n                set [mode v] to [jump]\n                set [yv v] to ((10) + (((ExtraJump) + (lovenfavejump)) * (boosteffects)))\n            end\n        end\n    end\n    if <<<<(mode) = [jump]> or <(mode) = [walljump]>> and <(yv) < [0]>> or <<<(mode) = [run]> or <(mode) = [skid]>> and <(yv) < [-3]>>> then\n        set [mode v] to [fall]\n    end\n    change y by (3)\n    if <(yv) > [-15]> then\n        change [yv v] by (-0.5)\n    end\n    change y by (-2)\n    if <not <touching color (#007606)?>> then\n        change y by (-1)\n        if <not <touching color (#007606)?>> then\n            change y by (-1)\n            if <not <touching color (#007606)?>> then\n                change y by (-1)\n                if <not <touching color (#007606)?>> then\n                    change y by (-1)\n                    if <not <touching color (#007606)?>> then\n                        change y by (-1)\n                        if <not <touching color (#007606)?>> then\n                            change y by (5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (2)\n    change y by (yv)\n    if <touching color (#007606)?> then\n        change y by (-2)\n        if <touching color (#007606)?> then\n            change y by ((-1) * (yv))\n            set [yv v] to [-3]\n        end\n        change y by (2)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [13]> and <(x position) > [230]>> then\n        go to x: (-203) y: (-93)\n        broadcast (last v)\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nshow variable [level v]\nswitch costume to (costume1 v)\nshow\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    set [level v] to (costume [number v])\nend\n\nwhen I receive [levelup v]\nnext costume\n\nwhen I receive [last v]\nforever\n    switch costume to (costume14 v)\nend\n\n@thumb\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\nend\n\n