Soda Valley||A Platformer||Mobile||Part 2 

Instructions: ___________———<Soda Valley>———___________\n\n                          ——Instructions——\nMove — Move with arrow keys, WASD or Touch if on Mobile.\nGoal — To move through the levels and beat evil and Go back to your Family!!\n\n                               —Storyline—\nAfter Beating Candy Valley you are sent 2000 Years intro the future. Now in the valley there is a evil monster wanting to rule the world, and Destroy YOU!! Do you have what it takes to bring peace back to all the land, and escape to your family?\n        \n\n                          — Have a Great Day—

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nrepeat until <(Level) = [11]>\n    switch backdrop to (backdrop1 v)\nend\nforever\n    if <(Level) = [11]> then\n        switch backdrop to (backdrop3 v)\n    end\n    if <(Level) = [13]> then\n        switch backdrop to (backdrop1 v)\n    end\n    if <(Level) = [14]> then\n        switch backdrop to (backdrop1 v)\n    end\nend\n\n\n    switch backdrop to (backdrop1 v)\nend\n\nwhen flag clicked\nplay sound [Amidst the Mists v] until done\nplay sound [Frozen Droplets v] until done\n\nwhen I receive [start outro v]\nstop all sounds\n\nwhen I receive [start outro v]\nstop all sounds\n\n@Star\n\nwhen flag clicked\n\nwhen I receive [start games v]\nhide\nforever\n    if <(Level) = [10]> then\n        show\n        go to (enemy  v)\n        point towards (player2 v)\n        move (10) steps\n        glide (1) secs to (player2 v)\n        glide (.5) secs to (enemy  v)\n        wait (1) seconds\n    end\n    if <(Level) = [11]> then\n        hide\n    end\n    if <(Level) = [10]> then\n        turn right (10) degrees\n    end\n    if <(Level) = [25]> then\n        show\n    end\n    if <(Level) = [26]> then\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start outro v]\nhide\n\nwhen flag clicked\nhide\nwait until <(Level) = [25]>\nswitch costume to (costume2 v)\nhide\nwait (8) seconds\nwait (3) seconds\nshow\nrepeat (4)\n    go to (final boss v)\n    glide (1) secs to (player2 v)\n    glide (1) secs to (final boss v)\nend\nforever\n    hide\n    switch costume to (costume1 v)\nend\n\n@Enemy \n\nwhen flag clicked\nhide\n\nglide (1) secs to x: (0) y: (45)\n\nhide\n\nwhen I receive [start games v]\nhide\nforever\n    if <(Level) = [10]> then\n        switch costume to (costume1 v)\n        show\n        go to x: (187) y: (134)\n    end\n    if <(Level) = [11]> then\n        hide\n    end\n    if <(Level) = [11]> then\n        hide\n    end\n    if <(Level) = [13]> then\n        switch costume to (costume2 v)\n        show\n        go to x: (187) y: (134)\n        glide (1.5) secs to (player2 v)\n        glide (1.5) secs to x: (187) y: (134)\n    end\n    if <(Level) = [14]> then\n        hide\n    end\nend\n\nwhen I receive [start outro v]\nhide\n\n@Wall 2\n\nwhen flag clicked\nhide\n\nwhen I receive [found key 2 v]\nforever\n    if <(Level) = [9]> then\n        forever\n            hide\n            switch costume to (costume2 v)\n        end\n    end\nend\n\nwhen I receive [start games v]\nswitch costume to (costume1 v)\nhide\ngo to x: (30) y: (53)\nforever\n    if <(Level) = [9]> then\n        show\n    end\nend\n\nwhen I receive [start outro v]\nhide\n\n@Speed boost\n\nwhen flag clicked\n\nwhen I receive [start games v]\nhide\nforever\n    if <(Level) = [3]> then\n        show\n        go to x: (94) y: (50)\n    end\n    if <(Level) = [4]> then\n        hide\n    end\nend\n\nwhen I receive [start outro v]\nhide\n\n@Moving Platformer \n\nwhen flag clicked\nhide\n\nwhen I receive [found key 1 v]\nif <(Level) = [7]> then\n    show\nend\n\nwhen flag clicked\n\nwhen I receive [found key 1 v]\nforever\n    if <(Level) = [8]> then\n        hide\n    end\nend\n\nwhen I receive [start outro v]\nhide\n\n@Key\n\nwhen flag clicked\nhide\n\nwhen I receive [found key 1 v]\nhide\n\nforever\n\nwhen I receive [start games v]\nhide\nforever\n    if <(Level) = [7]> then\n        go to x: (-35) y: (-29)\n        show\n        if <touching (player2 v)?> then\n            broadcast (Found key 1 v)\n            hide\n        end\n    end\n    if <(Level) = [8]> then\n        hide\n    end\n    if <(Level) = [9]> then\n        show\n        go to x: (-180) y: (150)\n        if <touching (player2 v)?> then\n            broadcast (Found key 2 v)\n            hide\n        end\n    end\n    if <(Level) = [10]> then\n        hide\n    end\nend\n\nwhen I receive [start outro v]\nhide\n\n@Wall 1\n\nwhen flag clicked\n\nif <(Level) = [6]> then\n\nglide (1) secs to x: (75) y: (-146)\n\nglide (1) secs to x: (-62) y: (-145)\nglide (1) secs to x: (225) y: (-156)\n\nshow\n\nhide\nswitch costume to (blank v)\nshow\n\nwhen flag clicked\n\nforever\n    if <(costume [number v]) = [2]> then\n        switch costume to (blank v)\n        go to x: (18) y: (-95)\n    end\nend\n\nif <(costume [number v]) = [2]> then\n    forever\n        if <touching (player v)?> then\n            repeat (10)\n                change [ghost v] effect by (-25)\n            end\n            wait (5) seconds\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\ngo to x: (18) y: (-95)\n\nwhen flag clicked\n\nwhen I receive [start games v]\nforever\n    if <(Level) = [5]> then\n        hide\n        switch costume to (blank v)\n    end\nend\n\nwhen I receive [start games v]\nhide\nforever\n    if <(Level) = [4]> then\n        show\n        switch costume to (costume1 v)\n        glide (1.5) secs to x: (-62) y: (-145)\n        glide (1.5) secs to x: (225) y: (-145)\n    end\nend\n\nwhen I receive [start outro v]\nhide\n\n@Spring\n\nwhen flag clicked\nhide\n\nwhen I receive [start games v]\nhide\ngo to x: (-38) y: (-2)\nforever\n    if <(Level) = [5]> then\n        show\n    end\n    if <(Level) = [6]> then\n        hide\n    end\nend\n\nwhen I receive [start outro v]\nhide\n\n@level\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\n\nwhen I receive [start games v]\nbroadcast (start v)\nshow\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\nend\n\nwhen I receive [start outro v]\nhide\n\n@Lava/Spick\n\nwhen flag clicked\nshow\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nwait until <(Level) = [11]>\ngo to x: (0) y: (0)\nshow\n\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [13]> then\n        hide\n    end\n    if <(Level) = [11]> then\n        show\n        switch costume to (costume3 v)\n    end\n    if <(Level) = [14]> then\n        show\n        switch costume to (costume5 v)\n    end\n    if <(Level) = [15]> then\n        hide\n    end\n    if <(Level) = [6]> then\n        go to x: (-34) y: (-56)\n        show\n        switch costume to (costume2 v)\n    end\n    if <(Level) = [7]> then\n        hide\n    end\n    if <(Level) = [8]> then\n        switch costume to (costume1 v)\n        show\n    end\n    if <(Level) = [9]> then\n        show\n        go to [back v] layer\n        switch costume to (costume6 v)\n    end\nend\n\nwhen I receive [start games v]\ngo to x: (0) y: (0)\nset [level v] to [1]\ngo to [back v] layer\nforever\n    if <(Level) = [2]> then\n        show\n        switch costume to (costume9 v)\n        go to [back v] layer\n    end\n    if <(Level) = [3]> then\n        hide\n    end\n    if <(costume [number v]) = [2]> then\n        go to x: (0) y: (0)\n    end\n    if <<<(costume [number v]) = [2]> or <(costume [number v]) = [1]>> or <(costume [number v]) = [6]>> then\n        change y by (([cos v] of ((timer) * (560)) ) * (2))\n    end\n    if <(Level) = [4]> then\n        hide\n    end\n    if <(Level) = [10]> then\n        switch costume to (costume6 v)\n        show\n        change y by (([cos v] of ((timer) * (560)) ) * (2))\n    end\n    if <(Level) = [11]> then\n        switch costume to (costume3 v)\n        show\n    end\n    if <(costume [number v]) = [4]> then\n        change x by (([cos v] of ((timer) * (560)) ) * (2))\n    end\n    if <(costume [number v]) = [3]> then\n        change y by (([cos v] of ((timer) * (560)) ) * (2))\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [start games v]\n\nwhen flag clicked\nset [level v] to [0]\nswitch costume to (costume11 v)\n\nwhen flag clicked\nshow\n\nwhen flag clicked\nforever\n    if <(Level) = [14]> then\n        switch costume to (blank  v)\n        hide\n    end\nend\n\nwhen flag clicked\n\nwait until <(Level) = [12]>\n\nrepeat until <(Level) = [13]>\n    go to x: (0) y: (0)\nend\n\nwhen flag clicked\nwait until <(Level) = [9]>\nrepeat until <(Level) = [10]>\n    switch costume to (blank  v)\n    hide\nend\n\ngo to x: (0) y: (0)\nshow\n\nwhen flag clicked\nforever\n    if <(Level) = [22]> then\n        switch costume to (costume10 v)\n        go to x: (0) y: (0)\n        show\n    end\n    if <(Level) = [23]> then\n        show\n        switch costume to (costume9 v)\n    end\n    if <(Level) = [24]> then\n        hide\n    end\nend\n\nwhen I receive [start outro v]\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        switch costume to (blank  v)\n        hide\n    end\nend\n\n@Cloud\n\nwhen flag clicked\nforever\n    change x by (10)\n    if <touching (_edge_ v)?> then\n        set x to (-163)\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    wait (2) seconds\n    switch costume to (pick random (1) to (4))\n    set size to (pick random (25) to (50)) %\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nforever\n    change x by (10)\n    if <touching (_edge_ v)?> then\n        set x to (-163)\n    end\nend\n\nwhen I start as a clone\nwait (4) seconds\ndelete this clone\n\nwhen I receive [start outro v]\nhide\n\n@Thumbnail \n\nwhen flag clicked\nhide\n\nwhen I receive [green flag hit v]\nhide\n\nwhen I receive [start outro v]\nhide\n\n@Torch 1\n\nwhen flag clicked\nhide\n\nwhen flag clicked\n\nwhen I receive [start games v]\nhide\nforever\n    switch costume to (costume1 v)\n    wait (.09) seconds\n    switch costume to (costume2 v)\n    wait (.09) seconds\nend\n\nwhen I receive [start games v]\nforever\n    if <(Level) = [11]> then\n        show\n    end\n    if <(Level) = [13]> then\n        hide\n    end\nend\n\nwhen I receive [start outro v]\nhide\n\n@Torch 2\n\nwhen flag clicked\nhide\n\nwhen flag clicked\n\nwhen I receive [start games v]\nhide\nforever\n    switch costume to (costume1 v)\n    wait (.09) seconds\n    switch costume to (costume2 v)\n    wait (.09) seconds\nend\n\nwhen I receive [start games v]\nforever\n    if <(Level) = [11]> then\n        show\n    end\n    if <(Level) = [13]> then\n        hide\n    end\nend\n\nwhen I receive [start outro v]\nhide\n\n@Play button \n\nwhen flag clicked\ngo to x: (-55) y: (-65)\nswitch costume to (start v)\nshow\n\nwhen this sprite clicked\nbroadcast (Start games v)\nhide\n\nwhen I receive [start games v]\nhide\n\nwhen I receive [start outro v]\nhide\n\n@Settings button \n\nwhen flag clicked\nshow\ngo to x: (90) y: (-65)\nswitch costume to (costume1 v)\nforever\n    if <(costume [number v]) = [2]> then\n        go to x: (0) y: (0)\n    end\n    if <(costume [number v]) = [1]> then\n        go to x: (90) y: (-65)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Music page v)\nbroadcast (Open page v)\nswitch costume to (costume2 v)\ngo to [front v] layer\n\nwhen I receive [start games v]\nhide\n\nwhen I receive [close page  v]\nswitch costume to (costume1 v)\nshow\n\ngo to [front v] layer\n\nwhen I receive [start outro v]\nhide\n\n@Instructions button \n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\ngo to x: (90) y: (-130)\n\nwhen this sprite clicked\nswitch costume to (costume2 v)\n\nwhen this sprite clicked\nbroadcast (Open page v)\nswitch costume to (costume2 v)\ngo to [front v] layer\nforever\n    if <(costume [number v]) = [1]> then\n        go to x: (90) y: (-130)\n    end\n    if <(costume [number v]) = [2]> then\n        go to x: (0) y: (0)\n    end\nend\n\nwhen I receive [start games v]\nhide\n\nwhen I receive [close page  v]\nswitch costume to (costume1 v)\nshow\n\nwhen I receive [start outro v]\nhide\n\n@Credits button \n\nwhen flag clicked\nshow\ngo to x: (-55) y: (-130)\nswitch costume to (costume1 v)\n\nwhen this sprite clicked\nbroadcast (Open page v)\nswitch costume to (costume2 v)\ngo to [front v] layer\nforever\n    if <(costume [number v]) = [1]> then\n        go to x: (-55) y: (-130)\n    end\n    if <(costume [number v]) = [2]> then\n        go to x: (0) y: (0)\n    end\nend\n\nwhen I receive [start games v]\nhide\n\nwhen I receive [close page  v]\nswitch costume to (costume1 v)\nshow\n\nwhen I receive [start outro v]\nhide\n\n@X button \n\nwhen flag clicked\nhide\n\nwhen I receive [open page v]\ngo to x: (150) y: (-130)\nshow\nforever\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nhide\nbroadcast (Close page  v)\n\nwhen I receive [start outro v]\nhide\n\n@Title\n\nwhen flag clicked\n\nwhen I start as a clone\n\nwhen I receive [start games v]\nhide\n\nwhen flag clicked\nshow\nforever\n    point in direction (((0) + ((0) + (([tan v] of (((timer) - (5)) * (120)) ) * (16)))) - ())\nend\n\nwhen I receive [start outro v]\nhide\n\n@Music button \n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [music page v]\nshow\nforever\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nnext costume\nforever\n    if <(costume [number v]) = [2]> then\n        stop all sounds\n    end\n    if <(costume [number v]) = [1]> then\n        play sound [Amidst the Mists v] until done\n        play sound [Frozen Droplets v] until done\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [close page  v]\nhide\n\nwhen I receive [start outro v]\nhide\n\n@Boss 1\n\nwhen flag clicked\nset y to (-40)\nhide\nwait until <(Level) = [14]>\nshow\nswitch costume to (costume1 v)\nset size to (80) %\nwait (8) seconds\nrepeat until <(y position) = [80]>\n    switch costume to (costume2 v)\n    change y by (10)\n    wait (0.05) seconds\nend\nforever\n    switch costume to (costume2 v)\n    repeat (4)\n        glide (1) secs to (random position v)\n    end\n    go to x: (50) y: (-40)\n    switch costume to (costume1 v)\n    repeat (4)\n        glide (1) secs to (player2 v)\n    end\n    forever\n        go to x: (50) y: (-40)\n        say [You win ]\n        wait (1) seconds\n        hide\n    end\nend\n\nwhen I receive [start outro v]\nhide\n\nwhen I receive [start outro v]\nhide\n\n@Boss words\n\nwhen flag clicked\nhide\nwait until <(Level) = [14]>\nswitch costume to (costume1 v)\nshow\nwait (8) seconds\nhide\n\nwhen flag clicked\nhide\nwait until <(Level) = [25]>\nswitch costume to (costume2 v)\nshow\nwait (8) seconds\nhide\n\nwhen I receive [start outro v]\nhide\n\n@wall\n\nif <(Level) = [25]> then\n    show\nend\nif <(Level) = [26]> then\n    hide\nend\nif <(Level) = [15]> then\n    hide\nend\n\nwhen flag clicked\nhide\nforever\nend\n\nwhen flag clicked\nhide\nwait until <(Level) = [14]>\nshow\nwait (20) seconds\nhide\n\nwhen I receive [start outro v]\nhide\n\n@final boss\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [25]> then\n        show\n    end\n    if <(Level) = [26]> then\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\nwait until <(Level) = [25]>\ngo to x: (120) y: (-40)\nshow\nwait (8) seconds\nglide (1) secs to x: (120) y: (120)\nrepeat (4)\n    set x to (pick random (x position) to (pick random (-220) to (220)))\nend\nrepeat (12)\n    change y by (-10)\nend\nglide (1) secs to (player v)\nwait (8) seconds\nforever\n    switch costume to (costume2 v)\n    say [You win ] for (2) seconds\n    hide\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [26]> then\n        hide\n    end\nend\n\nwhen I receive [start outro v]\nhide\n\n@outro 1\n\nwhen flag clicked\nhide\n\nwhen I receive [start outro v]\nstop all sounds\nshow\nforever\n    go to x: (([cos v] of ((timer) * (600)) ) * (8)) y: (([cos v] of ((timer) * (580)) ) * (8))\n    forever\n        play sound [Outro v] until done\n    end\nend\n\n@outro 2 \n\nwhen flag clicked\nhide\n\nwhen I receive [start outro v]\nshow\nforever\n    wait (0.08) seconds\n    next costume\nend\n\n@player2\n\nwhen flag clicked\nhide\n\nwhen flag clicked\n\nwhen I receive [start outro v]\nhide\n\nwhen I receive [start games v]\ngo to [back v] layer\nshow\ngo to x: (-220) y: (40)\nset [level v] to [1]\nforever\n    if <<key (d v) pressed?> or <<<mouse down?> and <(x position) < (mouse x)>> or <key (right arrow v) pressed?>>> then\n        change [x v] by (1)\n        switch costume to (left v)\n    else\n        if <<key (a v) pressed?> or <<<mouse down?> and <(mouse x) < (x position)>> or <key (left arrow v) pressed?>>> then\n            change [x v] by (-1)\n            switch costume to (right v)\n        end\n    end\n    set [x v] to ((X) * (0.9))\n    change x by (X)\n    if <touching color (#e8e8e8)?> then\n        change y by (1)\n        if <touching color (#e8e8e8)?> then\n            change y by (1)\n            if <touching color (#e8e8e8)?> then\n                change y by (1)\n                if <touching color (#e8e8e8)?> then\n                    change y by (1)\n                end\n                if <touching color (#e8e8e8)?> then\n                    change y by (1)\n                end\n            end\n        end\n    end\n    if <touching color (#e8e8e8)?> 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 [-5]\n            else\n                set [x v] to [5]\n            end\n            set [y v] to [10]\n        else\n            set [y v] to [0]\n        end\n    end\n    change [y v] by (-1)\n    change y by (Y)\n    if <touching color (#e8e8e8)?> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <not <touching color (#000000)?>> then\n        if <touching color (#e8e8e8)?> then\n            if <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(y position) < (mouse y)>>>> then\n                set [y v] to [17]\n            end\n        end\n    end\n    change y by (1)\n    if <<touching (boss 1 v)?> or <<<<touching (lava/spick v)?> or <<(y position) < [-170]> or <touching (star v)?>>> or <touching (enemy  v)?>> or <touching (final boss v)?>>> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            wait (0) seconds\n        end\n        go to x: (-220) y: (40)\n        repeat (10)\n            change [ghost v] effect by (-10)\n            wait (0) seconds\n        end\n    end\n    if <(x position) > [236]> then\n        go to x: (-220) y: (40)\n        change [level v] by (1)\n        broadcast (next level v)\n        change [again useless v] by (1)\n        switch backdrop to (backdrop3 v)\n    end\nend\n\nwhen I receive [start games v]\nforever\n    change [color v] effect by (5)\nend\n\nwhen I receive [start games v]\nforever\n    if <key (up arrow v) pressed?> then\n        switch costume to (up v)\n    end\n    if <key (down arrow v) pressed?> then\n        switch costume to (down v)\n    end\n    if <key (down arrow v) pressed?> then\n        switch costume to (down v)\n    end\n    if <not <key (any v) pressed?>> then\n        switch costume to (center v)\n    end\n    if <<key (left arrow v) pressed?> and <key (up arrow v) pressed?>> then\n        switch costume to (right2 v)\n    end\n    if <<key (right arrow v) pressed?> and <key (up arrow v) pressed?>> then\n        switch costume to (right3 v)\n    end\nend\n\nwhen I receive [start games v]\nforever\n    if <touching (spring v)?> then\n        set [y v] to [20]\n    end\nend\n\nwhen I receive [start games v]\nforever\n    if <touching (speed boost v)?> then\n        if <<<mouse down?> and <(x position) < (mouse x)>> or <key (right arrow v) pressed?>> then\n            change [x v] by (2)\n        end\n        if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n            change [x v] by (-2)\n        end\n    end\nend\n\nwhen I receive [start games v]\nforever\n    if <not <key (any v) pressed?>> then\n        wait (4) seconds\n        switch costume to (center v)\n        wait (0.07) seconds\n        switch costume to (center2 v)\n        wait (0.07) seconds\n        switch costume to (center3 v)\n        wait (0.07) seconds\n        switch costume to (center4 v)\n        wait (0.07) seconds\n    end\nend\n\nwhen I receive [start games v]\nforever\n    if <<touching color (#f35e88)?> or <touching color (#004eb9)?>> then\n        broadcast (Start outro v)\n    end\nend\n\n