Valley ll Scrolling platformer

Instructions:                                       •Valley•\n              •A Multiplayer Scrolling Platformer•\n\nlook at https://scratch.mi t.edu/projects/451207709/\nreshshared to add a intro!\nCan we get this top loved?\nMY BEST GAME SO FOR SO PLS HEART, FAV, AND FOLLOW!\n\n❌ANY ADDS WILL ME DELETED\n⛔TELL ME ANY GLICHES OR PROBLEMS \n                                  Instructions\nWelcome to the  Vᴀʟʟᴇʏ! Collect coins to buy items from the shop. Make sure to watch out for dangers like, spikes, lava, and saws!  Enjoy :)\n         ✦✦ How to play ✦✦\n➜ Collect coins, use them to buy items in the shop\n➜ Press the SPACE key to activate a parachute. \n➜ [N] to turn on/off names\n\n                               ✦✦ Credits ✦✦\n➜ @StratfordJames for tons of art and some code\n➜ @GameDev46 for tons on code\n➜ @suhalo_351 for the coin counter\n➜@-pickleanimator-  for intro\n➜ Rest by me\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#Games #art #all #kimj12 #GameDev46 #platformer #scrolling 

@Stage\n\n@Player\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen I receive [connecting v]\nhide\n\nif <touching (checkpoints v)?> then\n    set [__checkpoint x v] to (____SCROLL X)\n    set [__checkpoint y v] to (_____SCROLL Y)\nend\nif <touching (water  v)?> then\n    change [y velocity v] by (-1.1)\n    if <(Hs watered?) = [False]> then\n        start sound [Splash v]\n        set [hs watered? v] to [True]\n    end\nelse\n    set [hs watered? v] to [False]\nend\nif <touching (bounce v)?> then\n    set [y velocity v] to [-25]\n    start sound [Bounce pad v]\nend\n\ndefine Platformer physics (side speed) <jump> <right> <left>\nswitch costume to (hitbox v)\nif <right> then\n    point in direction (90)\n    change [sx v] by ((side speed) * (-1))\nend\nif <left> then\n    change [sx v] by (side speed)\n    point in direction (-90)\nend\nset [sx v] to ((sx) * (0.75))\nif <[0.1] < ([abs v] of (sx) )> then\n    Change X by (round (sx))\nend\nif <<key (space v) pressed?> and <[4] < (In air)>> then\n    set [y velocity v] to [1]\nelse\n    change [y velocity v] by (1)\nend\nChange Y by (Y velocity) <jump>\nif <jump> then\n    if <touching (water  v)?> then\n        change [y velocity v] by (-1)\n    else\n        if <(In air) < [4]> then\n            set [y velocity v] to [-12]\n            if <(In air) < [1]> then\n                broadcast (jump v)\n            end\n        end\n    end\nend\nPosition\nswitch costume to (Costume #)\n\nwhen I receive [start v]\nshow\ngo to x: (0) y: (0)\nset [__checkpoint x v] to [0]\nset [__checkpoint y v] to [0]\nset [_____scroll y v] to [0]\nset [____scroll x v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [x vel v] to [0]\nset [y velocity v] to [0]\nset [is grounded v] to [False]\nset [__is dead?? v] to [False]\nset [in air v] to [0]\nset rotation style [left-right v]\npoint in direction (90)\ngo to x: (0) y: (0)\nforever\n    Platformer physics [3] <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>>\n    if <(__Is dead??) = [True]> then\n        set [is moving v] to [False]\n        broadcast (die sound v)\n        broadcast (Player death particles v)\n        switch costume to (still v)\n        set [ghost v] effect to (0)\n        set rotation style [all around v]\n        repeat (50)\n            change [ghost v] effect by (2)\n            change y by (3)\n            turn right (5) degrees\n        end\n        set rotation style [left-right v]\n        point in direction (90)\n        Reset\n        set [__is dead?? v] to [False]\n        set [ghost v] effect to (0)\n    end\n    go to [front v] layer\n    go [backward v] (10) layers\nend\n\nwhen flag clicked\nhide\n\nbroadcast (Start v)\n\ndefine Reset\nset [__is dead?? v] to [False]\nset [x v] to (__CHECKPOINT X)\nset [y v] to (__CHECKPOINT Y)\nset [_____scroll y v] to (__CHECKPOINT Y)\nset [____scroll x v] to (__CHECKPOINT X)\nset [x vel v] to [0]\nset [y velocity v] to [0]\nset [is moving v] to [False]\nset [is grounded v] to [False]\n\nwhen I receive [die v]\nset [__is dead?? v] to [True]\n\ndefine Position\ngo to x: ((____SCROLL X) - (round (X))) y: (round ((_____SCROLL Y) - (Y)))\nchange [____scroll x v] by (((round (X)) - (____SCROLL X)) / (10))\nchange [_____scroll y v] by (round (((Y) - (_____SCROLL Y)) / (3)))\nif <[0] < (____SCROLL X)> then\n    set [____scroll x v] to [0]\nend\nif <[40] < (_____SCROLL Y)> then\n    set [_____scroll y v] to [40]\nend\nif <(y position) < [-175]> then\n    set [__is dead?? v] to [True]\nend\n\ndefine Change X by (sx)\nchange [x v] by (sx)\nPosition in script\nif <touching (ground v)?> then\n    repeat (8)\n        change [y v] by (-1)\n        Position in script\n        if <not <touching (ground v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (8)\n    set [sx v] to [0]\n    repeat until <not <touching (ground v)?>>\n        if <[0] < (sx)> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position in script\n    end\nend\n\ndefine Position in script\ngo to x: ((____SCROLL X) - (X)) y: ((_____SCROLL Y) - (Y))\n\ndefine Change Y by (sy) <jump?>\nchange [y v] by (sy)\nPosition in script\nchange [in air v] by (1)\nset [is grounded v] to [False]\nrepeat until <not <touching (ground v)?>>\n    if <[0] < (sy)> then\n        change [y v] by (-1)\n        set [in air v] to [0]\n    else\n        change [y v] by (1)\n    end\n    Position in script\n    set [y velocity v] to [0]\nend\nset [is moving v] to [False]\nif <(In air) < [4]> then\n    set [is grounded v] to [True]\nend\nif <[0.1] < ([abs v] of (sx) )> then\n    set [is moving v] to [True]\nend\nSense\n\nset [_____scroll y v] to [-1200]\nset [____scroll x v] to [-8100]\nset [y v] to (_____SCROLL Y)\nset [x v] to (____SCROLL X)\n\nwhen I receive [start v]\nset rotation style [left-right v]\nset [costume # v] to [2]\nforever\n    if <<key (space v) pressed?> and <[4] < (In air)>> then\n        if <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <<<mouse down?> or <key (a v) pressed?>> or <key (d v) pressed?>>> then\n            set [costume # v] to [8]\n        else\n            set [costume # v] to [9]\n        end\n    else\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <[0] < (mouse y)>>> then\n            set [costume # v] to [2]\n            wait until <not <(In air) = [0]>>\n            repeat until <(In air) = [0]>\n                Update while in air\n            end\n        else\n            if <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <<<mouse down?> or <key (a v) pressed?>> or <key (d v) pressed?>>> then\n                set [costume # v] to [3]\n            else\n                set [costume # v] to [2]\n            end\n        end\n    end\nend\n\ndefine Sense\nif <touching (death v)?> then\n    set [__is dead?? v] to [True]\nend\nif <touching (death2 v)?> then\n    set [__is dead?? v] to [True]\nend\nif <touching (enemies v)?> then\n    set [__is dead?? v] to [True]\nend\nif <touching (saws v)?> then\n    set [__is dead?? v] to [True]\nend\nif <touching (checkpoints v)?> then\n    set [__checkpoint x v] to (____SCROLL X)\n    set [__checkpoint y v] to (_____SCROLL Y)\nend\nif <touching (water  v)?> then\n    change [y velocity v] by (-1.1)\n    if <(Hs watered?) = [False]> then\n        broadcast (splash v)\n        set [hs watered? v] to [True]\n    end\nelse\n    set [hs watered? v] to [False]\nend\n\nset [costume # v] to [2]\n\ndefine Update while in air\nif <((([abs v] of (Y velocity) ) / (Y velocity)) * (-1)) = [1]> then\n    if <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <<<mouse down?> or <key (a v) pressed?>> or <key (d v) pressed?>>> then\n        set [costume # v] to [6]\n    else\n        set [costume # v] to [4]\n    end\nelse\n    if <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <<<mouse down?> or <key (a v) pressed?>> or <key (d v) pressed?>>> then\n        set [costume # v] to [7]\n    else\n        set [costume # v] to [5]\n    end\nend\nif <<key (space v) pressed?> and <[4] < (In air)>> then\n    if <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <<<mouse down?> or <key (a v) pressed?>> or <key (d v) pressed?>>> then\n        set [costume # v] to [8]\n    else\n        set [costume # v] to [9]\n    end\nend\n\nwhen I receive [bounce v]\nset [y velocity v] to [-25]\n\nwhen I receive [start v]\n\nwhen I receive [talk v]\nthink (@USERNAME@) for (4.5) seconds\n\nwhen I receive [start v]\nforever\n    set [scrollx v] to (____SCROLL X)\n    set [scrolly v] to (____SCROLL X)\nend\n\n@Ground\n\ndefine Go to (x) (y)\nset size to (400) %\ngo to x: (x) y: (y)\nset size to (100) %\nif <<((round ((x) * (10))) / (10)) = ((round ((x position) * (10))) / (10))> and <((round ((y) * (10))) / (10)) = ((round ((y position) * (10))) / (10))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [start v]\nSetup level\n\nwhen flag clicked\nhide\nhide variable [player time v]\n\nwhen I start as a clone\nforever\n    Go to ((____SCROLL X) - (X)) ((_____SCROLL Y) - (Y))\n    go to [front v] layer\n    go [backward v] (20) layers\nend\n\ndefine Setup level\nswitch costume to (costume2 v)\nCreate platform [0] [0]\nCreate platform [-480] [0]\nCreate platform [-960] [0]\nCreate platform [-1440] [0]\nCreate platform [-1920] [0]\nCreate platform [-2400] [0]\nCreate platform [-2880] [0]\nCreate platform [-3360] [0]\nCreate platform [-3840] [0]\nCreate platform [-4320] [0]\nCreate platform [-4800] [0]\nCreate platform [-5280] [-500]\nCreate platform [-5760] [-500]\nCreate platform [-6720] [-590]\nCreate platform [-7200] [-200]\nCreate platform [-7680] [-100]\n\nset [i v] to [0]\n\nchange [i v] by (-480)\n\ndefine Create platform (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nset [_____player has key?? v] to [True]\n\nwhen I receive [+1 v]\n\n@saws\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<((round ((x) * (10))) / (10)) = ((round ((x position) * (10))) / (10))> and <((round ((y) * (10))) / (10)) = ((round ((y position) * (10))) / (10))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [start v]\nSetup level\n\nwhen flag clicked\nhide\nhide variable [player time v]\nset [___coins v] to [0]\n\nwhen I start as a clone\nforever\n    Go to ((____SCROLL X) - (X)) ((_____SCROLL Y) - (Y))\n    turn right (8) degrees\n    go to [front v] layer\n    go [backward v] (60) layers\nend\n\ndefine Setup level\nset [i v] to [0]\nswitch costume to (saw v)\nCreate platform [-1000] [20]\nCreate platform [-2630] [-270]\nCreate platform [-3800] [-330]\nCreate platform [-4100] [-390]\nCreate platform [-6500] [-330]\n\ndefine Create platform (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\n@Menu\n\nwhen flag clicked\nhide\n\ndefine Setup main menu\nswitch costume to (dot v)\nset size to (100) %\nswitch costume to (backing v)\nset [main menu instructions?? v] to [False]\nset [type v] to [1]\ncreate clone of (_myself_ v)\nset [type v] to [2]\ncreate clone of (_myself_ v)\nset [type v] to [3]\ncreate clone of (_myself_ v)\nset [type v] to [4]\ncreate clone of (_myself_ v)\nset [type v] to [5]\ncreate clone of (_myself_ v)\nset [type v] to [6]\ncreate clone of (_myself_ v)\nset [type v] to [7]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Type) = [1]> then\n    forever\n        switch costume to (menu backing v)\n        go to x: (0) y: (0)\n        set [ghost v] effect to (7)\n        go to [back v] layer\n        go [forward v] (10) layers\n    end\nelse\n    if <(Type) = [2]> then\n        forever\n            switch costume to (menu text v)\n            go to x: (0) y: (0)\n            set [ghost v] effect to (0)\n            go to [back v] layer\n            go [forward v] (20) layers\n        end\n    else\n        if <(Type) = [3]> then\n            forever\n                switch costume to (play button v)\n                go to x: (-80) y: (20)\n                set [ghost v] effect to (0)\n                go to [front v] layer\n            end\n        else\n            if <(Type) = [4]> then\n                forever\n                    switch costume to (play button backing v)\n                    go to x: (-80) y: (20)\n                    if <touching (mouse-pointer v)?> then\n                        set [ghost v] effect to (20)\n                        if <mouse down?> then\n                            broadcast (Start v)\n                            broadcast (Remove main menu v)\n                            wait until <not <mouse down?>>\n                        end\n                    else\n                        set [ghost v] effect to (100)\n                    end\n                    go to [front v] layer\n                    go [backward v] (10) layers\n                end\n            else\n                if <(Type) = [5]> then\n                    forever\n                        switch costume to (info button2 v)\n                        go to x: (-80) y: (-40)\n                        set [ghost v] effect to (0)\n                        go to [front v] layer\n                    end\n                else\n                    if <(Type) = [6]> then\n                        forever\n                            switch costume to (info button backing2 v)\n                            go to x: (-80) y: (-40)\n                            if <touching (mouse-pointer v)?> then\n                                set [ghost v] effect to (20)\n                                if <mouse down?> then\n                                    wait until <not <mouse down?>>\n                                    set [main menu instructions?? v] to [True]\n                                end\n                            else\n                                set [ghost v] effect to (100)\n                            end\n                            go to [front v] layer\n                            go [backward v] (10) layers\n                        end\n                    else\n                        if <(Type) = [7]> then\n                            forever\n                                switch costume to (instructions v)\n                                go to x: (0) y: (0)\n                                if <(Main menu instructions??) = [True]> then\n                                    show\n                                else\n                                    hide\n                                end\n                                if <mouse down?> then\n                                    set [main menu instructions?? v] to [False]\n                                end\n                                go to [front v] layer\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\ndelete this clone\n\nwhen I receive [remove main menu v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [message1 v]\nshow\nset [ghost v] effect to (0)\nSetup main menu\nswitch costume to (dot v)\nset size to (120) %\nforever\n    switch costume to (backing v)\n    go to x: ((mouse x) / (10)) y: ((mouse y) / (10))\n    go to [back v] layer\nend\n\n@Checkpoints\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<((round ((x) * (10))) / (10)) = ((round ((x position) * (10))) / (10))> and <((round ((y) * (10))) / (10)) = ((round ((y position) * (10))) / (10))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [start v]\nSetup level\n\nwhen flag clicked\nhide\nhide variable [player time v]\n\nwhen I start as a clone\nset [color v] effect to (0)\nforever\n    Go to ((____SCROLL X) - (X)) ((_____SCROLL Y) - (Y))\n    Detect <touching (player v)?>\n    go to [front v] layer\n    go [backward v] (1234690-09876534879834775) layers\nend\n\ndefine Setup level\nset [i v] to [-1550]\nswitch costume to (platform 1 v)\nrepeat (3)\n    Create platform (I) [-100]\n    change [i v] by (-480)\n    next costume\nend\nset [i v] to [-4000]\nswitch costume to (platform 1 v)\nrepeat (3)\n    Create platform (I) [-400]\n    change [i v] by (-480)\n    next costume\nend\n\ndefine Create platform (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nset [_____player has key?? v] to [True]\n\ndefine Detect <player?>\nif <player?> then\n    set [color v] effect to (-50)\nend\n\n@Sound\n\nwhen I start as a clone\nswitch costume to (backing v)\nshow\nforever\n    go to x: (180) y: (150)\n    if <touching (mouse-pointer v)?> then\n        set size to (110) %\n        if <mouse down?> then\n            if <(Music ON/OFF ??) = [Off]> then\n                set [music on/off ?? v] to [On]\n                broadcast (unmute v)\n            else\n                set [music on/off ?? v] to [Off]\n                broadcast (mute v)\n            end\n            wait until <not <mouse down?>>\n        end\n    else\n        set size to (100) %\n    end\n    go to [front v] layer\n    go [backward v] (10) layers\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [music on/off ?? v] to [On]\ncreate clone of (_myself_ v)\nswitch costume to (on v)\nshow\nforever\n    go to x: (180) y: (150)\n    if <(Music ON/OFF ??) = [On]> then\n        switch costume to (on v)\n    else\n        switch costume to (off v)\n    end\n    go to [front v] layer\nend\n\n@Screen effects\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\n    go [backward v] (5) layers\nend\n\n@Coins\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<((round ((x) * (10))) / (10)) = ((round ((x position) * (10))) / (10))> and <((round ((y) * (10))) / (10)) = ((round ((y position) * (10))) / (10))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [start v]\nSetup level\n\nwhen flag clicked\nhide\nhide variable [player time v]\nset [___coins v] to [0]\n\nwhen I start as a clone\nforever\n    Go to ((____SCROLL X) - (X)) ((_____SCROLL Y) - (Y))\n    Sense <touching (player v)?>\n    change [y v] by (([cos v] of ((timer) * (120)) ) * (0.7))\n    go to [front v] layer\n    go [backward v] (20) layers\nend\n\ndefine Setup level\nset [i v] to [0]\nswitch costume to (coin v)\nCreate platform [-100] [40]\nCreate platform [-200] [-20]\nCreate platform [-480] [-60]\nCreate platform [-600] [-60]\nCreate platform [-1280] [80]\nCreate platform [-1380] [100]\nCreate platform [-1900] [20]\nCreate platform [-2390] [-170]\nCreate platform [-2390] [-200]\nCreate platform [-2390] [-230]\nCreate platform [-2800] [-280]\nCreate platform [-3300] [-300]\nCreate platform [-4000] [-330]\n\ndefine Create platform (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\ndefine Sense <player>\nif <player> then\n    broadcast (+1 v)\n    broadcast (coin  v)\n    change [___coins v] by (1)\n    delete this clone\nend\n\n@Death\n\nwhen I start as a clone\nforever\n    Go to ((____SCROLL X) - (X)) ((_____SCROLL Y) - (Y))\n    change [y v] by (([cos v] of (((timer) + (offset)) * (120)) ) * (0.7))\n    set [ghost v] effect to (60)\n    go to [front v] layer\n    go [backward v] (30) layers\nend\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<((round ((x) * (10))) / (10)) = ((round ((x position) * (10))) / (10))> and <((round ((y) * (10))) / (10)) = ((round ((y position) * (10))) / (10))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [start v]\nSetup level\n\nwhen flag clicked\nhide\nhide variable [player time v]\n\nwhen I start as a clone\nforever\n    Go to ((____SCROLL X) - (X)) ((_____SCROLL Y) - (Y))\n    go to [back v] layer\n    go [forward v] (20) layers\nend\n\ndefine Setup level\nset [i v] to [-480]\nswitch costume to (platform 1 v)\nrepeat (1)\n    repeat (3)\n        set [offset v] to [-1]\n        Create platform (I) [0]\n        change [offset v] by (1)\n    end\n    change [i v] by (-480)\n    next costume\nend\nset [i v] to [-2000]\nswitch costume to (platform 2 v)\nrepeat (1)\n    repeat (3)\n        set [offset v] to [-1]\n        Create platform (I) [0]\n        change [offset v] by (1)\n    end\n    change [i v] by (-480)\n    next costume\nend\nset [i v] to [-5030]\nswitch costume to (platform 3 v)\nrepeat (1)\n    repeat (3)\n        set [offset v] to [-1]\n        Create platform (I) [0]\n        change [offset v] by (1)\n    end\n    change [i v] by (-480)\n    next costume\nend\nset [i v] to [-7150]\nswitch costume to (platform 5 v)\nrepeat (1)\n    repeat (3)\n        set [offset v] to [-1]\n        Create platform (I) [0]\n        change [offset v] by (1)\n    end\n    change [i v] by (-480)\n    next costume\nend\n\ndefine Create platform (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nset [_____player has key?? v] to [True]\n\n@Bounce\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<((round ((x) * (10))) / (10)) = ((round ((x position) * (10))) / (10))> and <((round ((y) * (10))) / (10)) = ((round ((y position) * (10))) / (10))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [start v]\nSetup level\n\nwhen flag clicked\nhide\nhide variable [player time v]\n\nwhen I start as a clone\nforever\n    Go to ((____SCROLL X) - (X)) ((_____SCROLL Y) - (Y))\n    if <touching (player v)?> then\n        if <<([y position v] of [player v]) > (y position)> and <([y v] of [player v]) < [-1]>> then\n            switch costume to (platform 2 v)\n            broadcast (BOUNCE v)\n            wait (0.1) seconds\n            switch costume to (platform 7 v)\n        end\n    end\n    go to [front v] layer\n    go [forward v] (30) layers\nend\n\ndefine Setup level\nswitch costume to (platform 7 v)\nCreate platform [-2390] [-120]\nCreate platform [-4000] [-410]\n\ndefine Create platform (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nset [_____player has key?? v] to [True]\n\n@Death2\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<((round ((x) * (10))) / (10)) = ((round ((x position) * (10))) / (10))> and <((round ((y) * (10))) / (10)) = ((round ((y position) * (10))) / (10))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [start v]\nSetup level\n\nwhen flag clicked\nhide\nhide variable [player time v]\n\nwhen I start as a clone\nforever\n    Go to ((____SCROLL X) - (X)) ((_____SCROLL Y) - (Y))\n    go to [front v] layer\n    go [forward v] (20) layers\nend\n\ndefine Setup level\nswitch costume to (level 1 3 v)\nCreate platform [-1400] [0]\nCreate platform [-3400] [-200]\nCreate platform [-4200] [-200]\nCreate platform [-7000] [-330]\n\ndefine Create platform (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nset [_____player has key?? v] to [True]\n\n@ThumbnailSprite2\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n@Water \n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<((round ((x) * (10))) / (10)) = ((round ((x position) * (10))) / (10))> and <((round ((y) * (10))) / (10)) = ((round ((y position) * (10))) / (10))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [start v]\nSetup level\n\nwhen flag clicked\nhide\nhide variable [player time v]\n\nwhen I start as a clone\nforever\n    Go to ((____SCROLL X) - (X)) ((_____SCROLL Y) - (Y))\n    change [y v] by (([cos v] of (((timer) + (I)) * (120)) ) * (0.7))\n    set [ghost v] effect to (50)\n    go to [front v] layer\n    go [backward v] (30) layers\nend\n\ndefine Setup level\nswitch costume to (platform 1 v)\nset [i v] to [-1]\nrepeat (1)\n    Create platform [-1090] [0]\n    change [i v] by (1)\nend\nswitch costume to (platform 2 v)\nset [i v] to [-1]\nrepeat (3)\n    Create platform [-3850] [-3]\n    change [i v] by (1)\nend\nswitch costume to (platform 3 v)\nset [i v] to [-1]\nrepeat (3)\n    Create platform [-6000] [-3]\n    change [i v] by (1)\nend\n\ndefine Create platform (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nset [_____player has key?? v] to [True]\n\n@score\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nforever\n    go to [front v] layer\n    set size to ((((([cos v] of ((timer) * (120)) ) * (6)) - (y position)) * (0.3)) + (200)) %\n    change y by ((((([cos v] of (((timer) + ((digits) / (8))) * (120)) ) * (6)) - (y position)) * (0.3)) + (40))\n    turn right ((((90) + (([cos v] of (((timer) + ((digits) / (8))) * (110)) ) * (5))) - (direction)) * (.4)) degrees\n    if <not <(length of (Coiiins)) < (digits)>> then\n        switch costume to (letter (digits) of (Coiiins))\n        show\n    else\n        hide\n    end\n    set x to (((16) * (digits)) - (200))\nend\n\ndefine Print (no)\nrepeat (length of (no))\n    change [digits v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nforever\n    set [coiiins v] to (coins)\nend\n\nwhen I receive [start v]\nhide\ngo to x: (0) y: (0)\nset [digits v] to [0]\nhide\nrepeat (40)\n    Print (Coiiins)\nend\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [+1 v]\nset [ghost v] effect to (0)\nswitch costume to (+1 v)\nshow\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [+3 v]\nset [ghost v] effect to (0)\nswitch costume to (+2 v)\nshow\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\n@backing\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<((round ((x) * (10))) / (10)) = ((round ((x position) * (10))) / (10))> and <((round ((y) * (10))) / (10)) = ((round ((y position) * (10))) / (10))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [start v]\nSetup level\n\nwhen flag clicked\nhide\nhide variable [player time v]\n\nwhen I start as a clone\nforever\n    Go to (((____SCROLL X) / (10)) - (X)) (((_____SCROLL Y) / (8)) - (Y))\n    go to [back v] layer\n    go [backward v] (12345678580-) layers\nend\n\ndefine Setup level\nswitch costume to (parallax v)\nCreate platform [0] [-100]\n\ndefine Create platform (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nset [_____player has key?? v] to [True]\n\n@sound\n\nwhen I receive [coin  v]\nif <(Music ON/OFF ??) = [On]> then\n    start sound [Coin v]\nend\n\nwhen I receive [bounce v]\nif <(Music ON/OFF ??) = [On]> then\n    start sound [Bounce pad v]\nend\n\nwhen I receive [die sound v]\nif <(Music ON/OFF ??) = [On]> then\n    start sound [Oops v]\nend\n\nwhen I receive [jump v]\nif <(Music ON/OFF ??) = [On]> then\n    start sound [smw_jump v]\nend\n\nwhen I receive [splash v]\nif <(Music ON/OFF ??) = [On]> then\n    play sound [Splash v] until done\nend\n\n@game \n\nwhen I receive [start v]\nset [chat open???????? v] to [closed]\nforever\n    if <key (t v) pressed?> then\n        if <(chat open????????) = [open]> then\n            set [chat open???????? v] to [closed]\n            wait (1) seconds\n            wait until <key (t v) pressed?>\n        else\n            broadcast (chat v)\n            set [chat open???????? v] to [open]\n            wait (1) seconds\n            wait until <key (t v) pressed?>\n        end\n    end\nend\n\n@sun\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\n\n@clouds\n\nwhen I receive [start v]\nforever\n    if <touching (_edge_ v)?> then\n        create clone of (_myself_ v)\n        wait (30) seconds\n    end\nend\n\nwhen I receive [start v]\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to x: (36) y: (28)\nforever\n    change x by (0.2)\n    show\n    go to [front v] layer\n    go [backward v] (30) layers\n    set [ghost v] effect to (50)\nend\n\n@Ground2\n\ndefine Go to (x) (y)\nset size to (400) %\ngo to x: (x) y: (y)\nset size to (100) %\nif <<((round ((x) * (10))) / (10)) = ((round ((x position) * (10))) / (10))> and <((round ((y) * (10))) / (10)) = ((round ((y position) * (10))) / (10))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [start v]\nSetup level\n\nwhen flag clicked\nhide\nhide variable [player time v]\n\nwhen I start as a clone\nforever\n    Go to ((____SCROLL X) - (X)) ((_____SCROLL Y) - (Y))\n    go to [back v] layer\n    go [forward v] (20) layers\nend\n\ndefine Setup level\nswitch costume to (costume2 v)\nCreate platform [0] [0]\nCreate platform [-480] [0]\nCreate platform [-960] [0]\nCreate platform [-1440] [0]\nCreate platform [-1920] [0]\nCreate platform [-2400] [0]\nCreate platform [-2880] [0]\nCreate platform [-3360] [0]\nCreate platform [-3840] [0]\nCreate platform [-4320] [0]\nCreate platform [-4800] [0]\nCreate platform [-5280] [-500]\nCreate platform [-5760] [-500]\nCreate platform [-6720] [-590]\n\nset [i v] to [0]\n\nchange [i v] by (-480)\n\ndefine Create platform (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nset [_____player has key?? v] to [True]\n\n@star\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<((round ((x) * (10))) / (10)) = ((round ((x position) * (10))) / (10))> and <((round ((y) * (10))) / (10)) = ((round ((y position) * (10))) / (10))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [start v]\nSetup level\n\nwhen flag clicked\nhide\nhide variable [player time v]\nset [___coins v] to [0]\n\nwhen I start as a clone\nforever\n    Go to ((____SCROLL X) - (X)) ((_____SCROLL Y) - (Y))\n    Sense <touching (player v)?>\n    change [y v] by (([cos v] of ((timer) * (120)) ) * (0.7))\n    go to [front v] layer\n    go [backward v] (20) layers\nend\n\ndefine Setup level\nset [i v] to [0]\nswitch costume to (coin v)\nCreate platform [-7600] [-100]\n\ndefine Create platform (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\ndefine Sense <player>\nif <player> then\n    broadcast (WIN!! v)\n    delete this clone\nend\n\n@AlertsUI\n\nwhen I receive [afk v]\nset size to (100) %\nclear graphic effects\ngo to x: (0) y: (0)\nswitch costume to (timeout v)\nshow\ngo to [front v] layer\nset [exit v] to [null]\nstop [all v]\n\nwhen I receive [win!! v]\nset [win v] to [1]\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nshow\nswitch costume to (blank v)\nset size to (150) %\nswitch costume to (win screen v)\nrepeat until <(size) < [101]>\n    go to [front v] layer\n    switch costume to (blank v)\n    change size by (((100) - (size)) / (7))\n    switch costume to (win screen v)\n    change [ghost v] effect by (-5)\n    set x to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\n    set y to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\nend\ngo to x: (0) y: (0)\ndraw (round (TIME)) [1]\ngo to x: (0) y: (0)\nwait (3) seconds\nset [@id v] to [button]\ncreate clone of (_myself_ v)\n\ndraw (join (exp) (join [/] [40])) [0]\n\nwhen I receive [start v]\nset [time v] to [0]\nwait until <<mouse down?> or <key (any v) pressed?>>\nforever\n    change [time v] by (1)\n    wait (1) seconds\nend\n\ndefine draw (i) (c)\nclear graphic effects\nif <(c) = [1]> then\n    go to x: ((2) - (((length of (i)) + (5)) * (5.5))) y: (-54)\n    set size to (80) %\n    set [@id v] to [null]\n    switch costume to (time v)\n    create clone of (_myself_ v)\n    change x by (50)\n    change y by (3)\nelse\n    if <(i) = [0/40]> then\n        go to x: (16) y: (-76)\n    else\n        go to x: (20) y: (-76)\n    end\n    set size to (100) %\n    set [@id v] to [null]\n    switch costume to (exp v)\n    create clone of (_myself_ v)\n    if <(i) = [0/40]> then\n        change x by (-53)\n        change y by (3)\n    else\n        change x by (-63)\n        change y by (3)\n    end\nend\nset size to (27) %\nset [brightness v] effect to (20)\nset [c_! v] to [1]\nrepeat (length of (i))\n    switch costume to (join (letter (c_!) of (i)) [a])\n    set [@id v] to [null]\n    create clone of (_myself_ v)\n    change [c_! v] by (1)\n    if <<(costume [name v]) = [/a]> or <(costume [name v]) = [1a]>> then\n        change x by (9)\n    else\n        change x by (12)\n    end\nend\nset size to (100) %\nswitch costume to (win screen v)\ngo to x: (0) y: (0)\nclear graphic effects\n\nwhen I start as a clone\nif <(@id) = [null]> then\n    go to [front v] layer\n    show\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    forever\n        go to [front v] layer\n    end\nelse\n    if <(@id) = [button]> then\n        go to x: (0) y: (0)\n        switch costume to (continue00 v)\n        show\n        set size to (80) %\n        set [ghost v] effect to (100)\n        repeat until <(size) > [99]>\n            change [ghost v] effect by (-10)\n            change size by (((102) - (size)) / (7))\n            go to [front v] layer\n        end\n        forever\n            go to [front v] layer\n            switch costume to (c1 v)\n            if <touching (mouse-pointer v)?> then\n                switch costume to (continue10 v)\n                if <mouse down?> then\n                    set [win v] to [0]\n                    broadcast (hide v)\n                    set [click2 v] to [0]\n                    repeat (10)\n                        change [ghost v] effect by (10)\n                    end\n                    delete this clone\n                end\n            else\n                switch costume to (c2 v)\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (continue01 v)\n                    if <mouse down?> then\n                        repeat (10)\n                            change [ghost v] effect by (10)\n                        end\n                        delete this clone\n                    end\n                else\n                    switch costume to (continue00 v)\n                end\n            end\n        end\n    else\n        if <(@id) = [lovefav]> then\n            go to x: (0) y: (0)\n            show\n            switch costume to (lovefav v)\n            set [ghost v] effect to (100)\n            set size to (50) %\n            repeat until <(size) > [100]>\n                go to [front v] layer\n                change size by (((102) - (size)) / (7))\n                change [ghost v] effect by (-8)\n            end\n            wait (2) seconds\n            repeat until <(size) < [50]>\n                go to [front v] layer\n                change size by (((size) - (110)) / (8))\n                change [ghost v] effect by (10)\n            end\n        end\n    end\nend\n\nwhen I receive [hide v]\ngo to x: (1) y: (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nset [win v] to [0]\nset [exit v] to [reg]\nhide\nset [pause v] to [0]\nwait (1) seconds\nforever\n    if <(lives) < [1]> then\n        wait (0.3) seconds\n        set [ghost v] effect to (100)\n        go to x: (0) y: (0)\n        switch costume to (over v)\n        show\n        go to [front v] layer\n        set size to (50) %\n        set [pause v] to [1]\n        repeat until <(size) > [100]>\n            go to [front v] layer\n            change size by (((102) - (size)) / (7))\n            change [ghost v] effect by (-8)\n        end\n        wait (1) seconds\n        repeat until <(size) < [50]>\n            go to [front v] layer\n            change size by (((size) - (110)) / (8))\n            change [ghost v] effect by (10)\n        end\n        set [lives v] to [2]\n        set [coins v] to [0]\n        set [pause v] to [0]\n        broadcast (reset v)\n    end\nend\n\nwhen I receive [alert v]\nset [@id v] to [lovefav]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    go to [front v] layer\n    go [forward v] (21345671345780098765432123456944444444444444444444444444444444444444444444444444406543223456890) layers\nend\n\nwhen I start as a clone\n\nwhen I receive [win!! v]\nforever\n    go to [front v] layer\n    go [forward v] (213456713457880098765432123456944444444444444444444444444444444444444444444444444406543223456890) layers\nend\n\n@Intro2\n\nwhen I start as a clone\nif <(Clone) = [Particles]> then\n    switch costume to (pick random (29) to (31))\n    set size to (pick random (50) to (150)) %\n    set [ghost v] effect to (pick random (0.) to (5.))\n    set [brightness v] effect to (pick random (-25.) to (100.))\n    go to x: (0) y: (0)\n    point in direction (pick random (-180) to (180))\n    set [x v] to (pick random (10.) to (12.))\n    set [i v] to (pick random (2.) to (9.))\n    go to [front v] layer\n    show\n    repeat until <touching (_edge_ v)?>\n        move (X) steps\n        change y by (I)\n        change [i v] by (-0.4)\n        set [x v] to ((X) * (0.95))\n    end\n    delete this clone\nend\n\ndefine Particles\nset [clone v] to [Particles]\nrepeat (50)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(Clone) = [Name]> then\n    switch costume to (name v)\n    set size to (50) %\n    clear graphic effects\n    go to [front v] layer\n    go to x: (0) y: (-100)\n    point in direction (0)\n    show\n    repeat (50)\n        go to [front v] layer\n        change size by (((130) - (size)) / (8))\n        change y by (((0) - (y position)) / (8))\n        turn right (((90) - (direction)) / (8)) degrees\n    end\n    set [i v] to [-1]\n    repeat (10)\n        go to [front v] layer\n        change size by (I)\n        change [i v] by (join [-] (([abs v] of (I) ) / (2)))\n        turn right (I) degrees\n    end\n    switch costume to (logo v)\n    repeat (40)\n        go to [front v] layer\n        change size by (((130) - (size)) / (8))\n        turn right (((90) - (direction)) / (8)) degrees\n    end\n    set [i v] to [-1]\n    repeat (20)\n        go to [front v] layer\n        change size by ((I) / (3))\n        change [i v] by (join [-] (([abs v] of (I) ) / (4)))\n        turn right ((I) / (-3)) degrees\n    end\n    delete this clone\nend\n\nwhen flag clicked\nreset timer\nhide\nstart sound [Prismo - Stronger v]\nset volume to (100) %\nclear graphic effects\nset size to (100) %\npoint in direction (90)\ngo to x: (0) y: (0)\nset [clone v] to [Square]\ncreate clone of (_myself_ v)\nwait (1) seconds\nset [clone v] to [Name]\ncreate clone of (_myself_ v)\nwait (0) seconds\nrepeat (2)\n    Spiral spline explosion\n    Particles\n    Rect\n    Spiral spline explosion\nend\nCircle\nrepeat (4)\n    Spiral spline explosion\n    Particles\n    Rect\n    Spiral spline explosion\nend\nCircle\nrepeat (2)\n    Spiral spline explosion\n    Rect\n    Spiral spline explosion\nend\nbroadcast (message1 v)\n\nwhen I start as a clone\nif <(Clone) = [Square]> then\n    clear graphic effects\n    show\n    set size to (0) %\n    go to x: (0) y: (300)\n    point in direction (0)\n    switch costume to (square v)\n    repeat (20)\n        change size by (((100) - (size)) / (5))\n        turn right (((90) - (direction)) / (5)) degrees\n        change y by (((0) - (y position)) / (5))\n    end\n    point in direction (90)\n    repeat (12)\n        next costume\n    end\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((2000) - (size)) / (5))\n        switch costume to (square13 v)\n    end\n    wait (3) seconds\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((100) - (size)) / (5))\n        switch costume to (square13 v)\n    end\n    repeat (12)\n        switch costume to ((costume [number v]) - (1))\n        change size by (-5)\n    end\n    set [i v] to [-1]\n    repeat (20)\n        change size by ((I) / (3))\n        change [i v] by (join [-] (([abs v] of (I) ) / (4)))\n        turn right ((I) / (-3)) degrees\n        change y by ((I) / (3))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Bursts]> then\n    switch costume to (lineexplosion1 v)\n    clear graphic effects\n    go to [front v] layer\n    go [backward v] (1) layers\n    set [i v] to (pick random (1) to (3))\n    if <(I) = [1]> then\n        set [brightness v] effect to (100)\n    else\n        if <(I) = [2]> then\n            set [brightness v] effect to (25)\n        else\n            set [brightness v] effect to (-25)\n        end\n    end\n    show\n    set [i v] to [20]\n    Animate   x: [0] y: [0] size: [0] rotate: (pick random (-180) to (180)) speed: [1]\n    repeat (2)\n        set [i v] to ((I) * (0.9))\n        move (I) steps\n        Size: [100] speed: [5]\n    end\n    repeat (10)\n        set [i v] to ((I) * (0.9))\n        move (I) steps\n        Size: [100] speed: [5]\n        change [ghost v] effect by (10)\n        next costume\n    end\n    delete this clone\nend\n\ndefine Animate   x: (x) y: (y) size: (s) rotate: (r) speed: (s)\nchange x by (((round (x)) - (round (x position))) / (s))\nchange y by (((round (y)) - (round (y position))) / (s))\nchange size by (((round (s)) - (round (size))) / (s))\nturn right (((round (r)) - (round (direction))) / (s)) degrees\n\ndefine Spiral spline explosion\nset [clone v] to [Bursts]\nrepeat (5)\n    create clone of (_myself_ v)\nend\n\ndefine Size: (s) speed: (spd)\nchange size by (((round (s)) - (round (size))) / (spd))\n\ndefine Rect\nset [clone v] to [Rect]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Clone) = [Rect]> then\n    clear graphic effects\n    show\n    set size to (0) %\n    go to (random position v)\n    point in direction (90)\n    switch costume to (background rect v)\n    repeat until <(round (size)) = [300]>\n        change size by (((300) - (size)) / (15))\n        change [ghost v] effect by (4)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Circle]> then\n    clear graphic effects\n    set [brightness v] effect to (100)\n    go to [front v] layer\n    go [backward v] (2) layers\n    show\n    set size to (0) %\n    go to x: (0) y: (0)\n    point in direction (90)\n    switch costume to (circle explosion 1 v)\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((300) - (size)) / (5))\n        switch costume to (circle explosion 1 v)\n    end\n    delete this clone\nend\n\ndefine Circle\nset [clone v] to [Circle]\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nset [clone v] to [Circle 2]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Clone) = [Circle 2]> then\n    clear graphic effects\n    set [brightness v] effect to (0)\n    go to [front v] layer\n    go [backward v] (1) layers\n    show\n    set size to (0) %\n    go to x: (0) y: (0)\n    point in direction (90)\n    switch costume to (circle explosion 1 v)\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((300) - (size)) / (5))\n        switch costume to (circle explosion 1 v)\n    end\n    delete this clone\nend\n\n