Shrunk || A scrolling platformer

Instructions: JUST CLICK OR PRESS ANY KEY TO START GEESE\n--------------------------------------------------------------------------\nThis is a game i made a long time ago but never finished.... so its not 100% perfect i fixed it up a bunch though!\n-----------------------------------------------------------------------\nControls\nArrow keys, WASD, or mobile. (animations are only for arrow keys)\nCOINS ARE NOT NECESSARY\n----------------------------------------------------------------------\nCredits\n@raymanworkshop idk how to spell that but for the music!\n@toadfanstool for coins!\n@griffpatch for scrolling engine!\n@XXX_FIRE_XXX (me) for the rest!

@Stage\n\nwhen [m v] key pressed\n\nset [mouse v] to (join ((mouse x) + (SCROLL X)) (join [, ] ((mouse y) + (SCROLL Y))))\nshow variable [mouse v]\n\nwhen I receive [tick v]\n\nif <not <(Level:) = [3]>> then\nelse\n    switch backdrop to (cave v)\nend\n\nswitch backdrop to (day v)\n\n@Blank\n\n@Player\n\nwhen I receive [play game v]\nset [blink time v] to [0]\nforever\n    wait (1) seconds\n    change [blink time v] by (1)\nend\n\ndefine Costume Control\nif <not <(Blink time) > [9]>> then\n    if <not <<<mouse down?> and <(mouse y) < [-100]>> or <<key (down arrow v) pressed?> or <key (s v) pressed?>>>> then\n        if <<<key (up arrow v) pressed?> or <<<mouse down?> and <(mouse y) < [0]>> or <key (w v) pressed?>>> and <not <<<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > [0]>>>> or <<key (left arrow v) pressed?> or <<<mouse down?> and <(mouse x) < [0]>> or <key (a v) pressed?>>>>>> then\n            switch costume to (3 v)\n        end\n        if <not <<<<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > [0]>>>> or <<key (left arrow v) pressed?> or <<<mouse down?> and <(mouse x) < [0]>> or <key (a v) pressed?>>>> or <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) < [0]>>> or <key (w v) pressed?>>>> then\n            switch costume to (2 v)\n        end\n        if <<<key (up arrow v) pressed?> or <<<mouse down?> and <(mouse y) < [0]>> or <key (w v) pressed?>>> and <<key (left arrow v) pressed?> or <<<mouse down?> and <(mouse x) < [0]>> or <key (a v) pressed?>>>> then\n            switch costume to (4 v)\n        end\n        if <<key (up arrow v) pressed?> and <key (right arrow v) pressed?>> then\n            switch costume to (4 v)\n        end\n        if <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> and <not <key (up arrow v) pressed?>>> then\n            switch costume to (1 v)\n        end\n    else\n        switch costume to (15 v)\n    end\nelse\n    if <(Blink time) > [9]> then\n        if <not <<<mouse down?> and <(mouse y) < [-100]>> or <<key (down arrow v) pressed?> or <key (s v) pressed?>>>> then\n            switch costume to (5 v)\n            wait (0.05) seconds\n            switch costume to (6 v)\n            wait (0.05) seconds\n            switch costume to (7 v)\n            wait (0.05) seconds\n            switch costume to (8 v)\n            wait (0.05) seconds\n            switch costume to (9 v)\n            wait (0.05) seconds\n            switch costume to (10 v)\n            wait (0.05) seconds\n            switch costume to (11 v)\n            wait (0.05) seconds\n            switch costume to (12 v)\n            wait (0.05) seconds\n            switch costume to (13 v)\n            wait (0.05) seconds\n            switch costume to (14 v)\n            wait (0.05) seconds\n            switch costume to (13 v)\n            wait (0.05) seconds\n            switch costume to (12 v)\n            wait (0.05) seconds\n            switch costume to (11 v)\n            wait (0.05) seconds\n            switch costume to (10 v)\n            wait (0.05) seconds\n            switch costume to (9 v)\n            wait (0.05) seconds\n            switch costume to (8 v)\n            wait (0.05) seconds\n            switch costume to (7 v)\n            wait (0.05) seconds\n            switch costume to (6 v)\n            wait (0.05) seconds\n            switch costume to (5 v)\n            wait (0.05) seconds\n            set [blink time v] to [0]\n        end\n        set [blink time v] to [0]\n    end\nend\n\nwhen flag clicked\nbroadcast (Green Flag v) and wait\nbroadcast (START SCREEN v) and wait\nbroadcast (Play Game v)\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\nset [deaths: v] to [0]\n\nwhen I receive [play game v]\nset [death switch v] to [on]\nset [move switch v] to [on]\nset [level: v] to [1]\nset [checkpiont v] to [0]\ndelete all of [check piont x v]\ndelete all of [check point y v]\nif <(Level:) = [1]> then\n    add [3490] to [check piont x v]\n    add [-70] to [check point y v]\nelse\n    if <(Level:) = [2]> then\n        add [2865] to [check piont x v]\n        add [200] to [check point y v]\n        add [2610] to [check piont x v]\n        add [650] to [check point y v]\n    else\n        if <(Level:) = [3]> then\n            delete all of [check piont x v]\n            delete all of [check point y v]\n            add [2510] to [check piont x v]\n            add [-75] to [check point y v]\n            add [8400] to [check piont x v]\n            add [-75] to [check point y v]\n            add [6460] to [check piont x v]\n            add [-140] to [check point y v]\n        else\n            if <(Level:) = [4]> then\n                delete all of [check piont x v]\n                delete all of [check point y v]\n                add [2350] to [check piont x v]\n                add [65] to [check point y v]\n            end\n        end\n    end\nend\nforever\n    broadcast (RESET v)\n    broadcast (Set up v)\n    Game On\n    repeat until <(EXIT) > []>\n        Tick\n        if <(toggle lag ON/OFF) = [on]> then\n            broadcast (Tick v)\n        else\n            broadcast (Tick v) and wait\n        end\n    end\n    if <(EXIT) = [win]> then\n        Game - win\n    else\n        if <(EXIT) = [die]> then\n            Game - Die\n        else\n            Reset pls\n        end\n    end\nend\n\ndefine Game On\nif <(CHECKPIONT) = [0]> then\n    set [x v] to [0]\n    set [y v] to [0]\nelse\n    set [x v] to (item (CHECKPIONT) of [check piont x v])\n    set [y v] to (item (CHECKPIONT) of [check point y v])\n    broadcast (game on\(flag\) v)\nend\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [speed y v] to [0]\nset [sx v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (65) %\nset [ghost v] effect to (0)\nshow\n\ndefine Tick\nif <(move switch) = [on]> then\n    if <<<mouse down?> and <(mouse x) < [0]>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        set rotation style [left-right v]\n        point in direction (-90)\n        change [sx v] by (-3)\n    end\n    if <<<mouse down?> and <(mouse x) > [0]>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        set rotation style [left-right v]\n        point in direction (90)\n        change [sx v] by (3)\n    end\n    set [sx v] to ((sx) * (0.8))\n    if <([abs v] of (sx) ) > [0.9]> then\n        Change Player X by (round (sx))\n    end\n    if <<<mouse down?> and <(mouse y) > [0]>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        if <(In air) < [4]> then\n            set [speed y v] to [16]\n        end\n    end\n    if <(Speed y) > [-15]> then\n        change [speed y v] by (-2)\n    end\n    Test-bouce\n    Change Player y by (Speed y)\n    Test - die\n    set [scroll x v] to (x)\n    if <(SCROLL X) < [0]> then\n        set [scroll x v] to [0]\n    end\n    change [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\n    if <(SCROLL Y) < [0]> then\n        set [scroll y v] to [0]\n    end\n    Position\n    if <(y) < [-180]> then\n        set [exit v] to [die]\n    end\nend\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platform v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [speed y v] to [0]\nend\n\ndefine Change Player X by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platform v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platform v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<mouse down?> and <(mouse y) > [0]>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platform v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game - Die\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    broadcast (flash v)\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\nchange [deaths: v] by (1)\n\ndefine Test - die\nif <(death switch) = [on]> then\n    if <touching (danger\( lava spikes etc\) v)?> then\n        set [exit v] to [die]\n    end\nend\n\ndefine Game - win\nset [checkpiont v] to [0]\nset rotation style [all around v]\nrepeat (50)\n    point towards (exit portal v)\n    turn right (65) degrees\n    move ((distance to [exit portal v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nset rotation style [left-right v]\nhide\nchange [level: v] by (1)\nif <(Level:) = [2]> then\n    delete all of [check piont x v]\n    delete all of [check point y v]\n    add [2865] to [check piont x v]\n    add [200] to [check point y v]\n    add [2610] to [check piont x v]\n    add [650] to [check point y v]\nelse\n    if <(Level:) = [3]> then\n        delete all of [check piont x v]\n        delete all of [check point y v]\n        add [2510] to [check piont x v]\n        add [-75] to [check point y v]\n        add [8400] to [check piont x v]\n        add [-75] to [check point y v]\n        add [6460] to [check piont x v]\n        add [-140] to [check point y v]\n    else\n        if <(Level:) = [4]> then\n            delete all of [check piont x v]\n            delete all of [check point y v]\n            add [2350] to [check piont x v]\n            add [65] to [check point y v]\n        end\n    end\nend\n\nwhen flag clicked\nset [blink time v] to [0]\nforever\n    Costume Control\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Test-bouce\nif <<<touching (boing v)?> or <touching (boing2 v)?>> or <<touching (boing3 v)?> or <touching (boing4 v)?>>> then\n    set [speed y v] to [25]\nend\n\nreplace item (1) of [check piont x v] with [thing]\n\nset [blink motion v] to [16]\nrepeat until <(costume [name v]) = [20]>\n    switch costume to (Blink motion)\n    wait (0.05) seconds\n    change [blink motion v] by (1)\nend\nrepeat until <(costume [name v]) = [15]>\n    switch costume to (Blink motion)\n    wait (0.05) seconds\n    change [blink motion v] by (-1)\nend\n\nset [blink motion v] to [5]\n\nchange [blink motion v] by (1)\n\nrepeat until <(costume [number v]) = [13]>\n    switch costume to (Blink motion)\nend\nrepeat until <(costume [number v]) = [5]>\n    switch costume to (Blink motion)\n    wait (0.05) seconds\n    change [blink motion v] by (-1)\nend\nset [blink time v] to [0]\n\ndefine Reset pls\nset [exit v] to []\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nset [ghost v] effect to (0)\n\nwhen I receive [play game v]\nforever\n    Costume Control\nend\n\nwhen flag clicked\npoint in direction (90)\n\nadd [2350] to [check piont x v]\nadd [65] to [check point y v]\n\n@Platform\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [set up v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level:) = [1]> then\n    go to [front v] layer\n    switch costume to (level 1 1 v)\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\nelse\n    if <(Level:) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [450] y: [0]\n        Clone at x: [450] y: [0]\n        Clone at x: [550] y: [0]\n        Clone at x: [450] y: [0]\n        Clone at x: [450] y: [0]\n        Clone at x: [450] y: [0]\n        Clone at x: [0] y: [350]\n        Clone at x: [0] y: [350]\n        Clone at x: [0] y: [350]\n    else\n        if <(Level:) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [550] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [0] y: [350]\n            Clone at x: [0] y: [350]\n            Clone at x: [0] y: [350]\n            Clone at x: [1000] y: []\n        else\n            if <(Level:) = [4]> then\n                switch costume to (level 4 1 v)\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [0] y: [350]\n                Clone at x: [350] y: [100]\n                Clone at x: [1000] y: [-400]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [350] y: [0]\n            else\n                switch costume to (level 4 18 v)\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@danger( lava spikes etc)\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [set up v]\nhide\ngo to [back v] layer\nset [x v] to [0]\nset [y v] to [0]\nif <(Level:) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    go to [front v] layer\n    Clone at x: [450] y: [0]\nelse\n    if <(Level:) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [450] y: [0]\n        Clone at x: [450] y: [0]\n        Clone at x: [550] y: [0]\n        Clone at x: [450] y: [0]\n        Clone at x: [450] y: [0]\n        Clone at x: [450] y: [0]\n        Clone at x: [0] y: [350]\n        Clone at x: [0] y: [350]\n        Clone at x: [0] y: [350]\n    else\n        if <(Level:) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [550] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [0] y: [350]\n            Clone at x: [0] y: [350]\n            Clone at x: [0] y: [350]\n            Clone at x: [1000] y: []\n        else\n            if <(Level:) = [4]> then\n                switch costume to (level 4 1 v)\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [0] y: [350]\n                Clone at x: [350] y: [100]\n                Clone at x: [1000] y: [-400]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n            else\n                switch costume to (level 4 16 v)\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I start as a clone\nif <<(costume [number v]) = [54]> or <(costume [number v]) = [52]>> then\n    forever\n        repeat (20)\n            change [y v] by (0.5)\n        end\n        repeat (20)\n            change [y v] by (-0.5)\n        end\n    end\nend\n\nwait (0.01) seconds\nwait (0.01) seconds\n\nwhen [space v] key pressed\n\n@Text & fake objects\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [set up v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level:) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    go to [back v] layer\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\n    Clone at x: [450] y: [0]\nelse\n    if <(Level:) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [450] y: [0]\n        Clone at x: [450] y: [0]\n        Clone at x: [550] y: [0]\n        Clone at x: [450] y: [0]\n        Clone at x: [450] y: [0]\n        Clone at x: [450] y: [0]\n        Clone at x: [0] y: [350]\n        Clone at x: [0] y: [350]\n        Clone at x: [0] y: [350]\n    else\n        if <(Level:) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [550] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [450] y: [0]\n            Clone at x: [0] y: [350]\n            Clone at x: [0] y: [350]\n            Clone at x: [0] y: [350]\n            Clone at x: [1000] y: []\n        else\n            if <(Level:) = [4]> then\n                switch costume to (level 4 1 v)\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [480] y: [0]\n                Clone at x: [0] y: [350]\n                Clone at x: [350] y: [100]\n                Clone at x: [1000] y: [-400]\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    if <(Level:) = [3]> then\n        go to [back v] layer\n    end\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@exit portal\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<(costume [name v]) = [open]> and <touching (player v)?>> then\n    set [exit v] to [win]\nend\n\nwhen I receive [set up v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level:) = [1]> then\n    switch costume to (open v)\n    Clone at x: [4520] y: [-35]\nelse\n    if <(Level:) = [2]> then\n        Clone at x: [2709] y: [1288]\n    else\n        if <(Level:) = [3]> then\n            Clone at x: [9700] y: [1000]\n        else\n            if <(Level:) = [4]> then\n                Clone at x: [7700] y: [55]\n            else\n                if <(Level:) = [5]> then\n                    Clone at x: [7700] y: [2000000000000000]\n                end\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\n@clouds\n\nwhen flag clicked\nchange [ghost v] effect by (15)\nhide\nforever\n    if <not <(Level:) = [3]>> then\n        create clone of (_myself_ v)\n        wait (2) seconds\n        create clone of (_myself_ v)\n        wait (6) seconds\n    end\nend\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (3))\ngo to x: (300) y: (pick random (195) to (125))\nshow\nrepeat until <(x position) < [-250]>\n    change x by (-3)\nend\nrepeat (5)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@music\n\nwhen I receive [play game v]\nstop all sounds\nforever\n    play sound [Music v] until done\n    wait (3) seconds\nend\n\nwhen I receive [play game v]\nset volume to (100) %\nforever\n    wait until <key (m v) pressed?>\n    set volume to (0) %\n    wait until <not <key (m v) pressed?>>\n    wait until <key (m v) pressed?>\n    set volume to (100) %\n    wait until <not <key (m v) pressed?>>\nend\n\n@Collectibles\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    start sound [Collect v]\n    change [coins:2 v] by (1)\n    delete this clone\nend\n\nwhen I receive [set up v]\nhide\nset [coins:2 v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(Level:) = [1]> then\n    switch costume to (coin1 v)\n    Clone at x: [168] y: [-49]\n    Clone at x: [235] y: [-49]\n    Clone at x: [520] y: [27]\n    Clone at x: [382] y: [120]\n    Clone at x: [560] y: [200]\n    Clone at x: [1827] y: [-50]\n    Clone at x: [1900] y: [-50]\nelse\n    if <(Level:) = [2]> then\n        switch costume to (coin1 v)\n        Clone at x: [478] y: [42]\n        Clone at x: [673] y: [118]\n        Clone at x: [990] y: [125]\n        Clone at x: [965] y: [-75]\n        Clone at x: [1387] y: [75]\n        Clone at x: [1453] y: [40]\n        Clone at x: [2020] y: [100]\n        Clone at x: [2586] y: [0]\n        Clone at x: [2586] y: [65]\n        Clone at x: [2586] y: [150]\n        Clone at x: [2783] y: [210]\n        Clone at x: [2770] y: [335]\n        Clone at x: [2763] y: [448]\n        Clone at x: [2760] y: [560]\n    else\n        if <(Level:) = [3]> then\n            Clone at x: [859] y: [-50]\n            Clone at x: [940] y: [-55]\n            Clone at x: [1020] y: [-50]\n            Clone at x: [1393] y: [5]\n            Clone at x: [1546] y: [5]\n            Clone at x: [1696] y: [5]\n            Clone at x: [1978] y: [-52]\n            Clone at x: [2035] y: [-70]\n            Clone at x: [2100] y: [-77]\n            Clone at x: [2345] y: [-65]\n            Clone at x: [2638] y: [-65]\n            Clone at x: [3145] y: [-50]\n            Clone at x: [3215] y: [-20]\n            Clone at x: [3278] y: [-50]\n        end\n    end\n    set [x v] to [-99999]\nend\nset [x v] to [-99999]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [a-base y v] to (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    next costume\n    wait (0.05) seconds\nend\n\nif <(Level:) = [1]> then\n\nwhen I start as a clone\nforever\n    set [y v] to ((A-base Y) + (([cos v] of (((timer) - (3)) * (100)) ) * (10)))\nend\n\nnext costume\nwait (0.05) seconds\n\n@DONT DELETE ME\n\nwhen I receive [tick v]\nPosition (round (((x) - (SCROLL X)) / (5))) (round (((y) - (SCROLL Y)) / (2)))\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    go to [back v] layer\n    show\nelse\n    hide\nend\n\nwhen I receive [play game v]\nforever\n    go to [back v] layer\nend\n\nwhen I receive [play game v]\nforever\n    if <(Level:) = [1]> then\n        switch costume to (costume2 v)\n    else\n        if <(Level:) = [2]> then\n            switch costume to (costume3 v)\n        else\n            if <(Level:) = [3]> then\n                switch costume to (costume3 v)\n            else\n                if <(Level:) = [4]> then\n                    switch costume to (costume4 v)\n                end\n            end\n        end\n    end\nend\n\nshow\nshow\nhide\n\n@Sprite2\n\nwhen I receive [flash v]\ngo to [front v] layer\nshow\nwait (0.05) seconds\nhide\n\nwhen flag clicked\nhide\n\nwhen [l v] key pressed\nif <(toggle lag ON/OFF) = [on]> then\n    set [toggle lag on/off v] to [off]\nelse\n    set [toggle lag on/off v] to [on]\nend\n\n@goombs@#@$!%%@!\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\n\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<(costume [name v]) = [open]> and <touching (player v)?>> then\n    set [exit v] to [win]\nend\n\nwhen I receive [set up v]\nhide\n\nset [x v] to [0]\nset [y v] to [0]\nif <(Level:) = [1]> then\n    switch costume to (open v)\n    Clone at x: [2500] y: [0]\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [set up v]\n\nforever\n    if <not <(costume [number v]) > [26]>> then\n        next costume\n        wait (0.1) seconds\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [gooms b gone v]\n\nstop [other scripts in sprite v]\nhide\nstop [this script v]\n\n@boing\n\ndefine boing\nwait (0.05) seconds\nswitch costume to (costume2 v)\nwait (0.05) seconds\nswitch costume to (costume3 v)\nwait (0.05) seconds\nswitch costume to (costume2 v)\nwait (0.05) seconds\nswitch costume to (costume1 v)\n\nwhen I receive [play game v]\nforever\n    if <touching (player v)?> then\n        boing\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [set up v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level:) = [1]> then\n    Clone at x: [2200] y: [-70]\nelse\n    if <(Level:) = [2]> then\n        Clone at x: [2590] y: [-70]\n    else\n        if <(Level:) = [3]> then\n            Clone at x: [1400] y: [-70]\n        else\n            if <(Level:) = [4]> then\n                Clone at x: [30000] y: [-70]\n            end\n        end\n    end\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\n@Checkpoint #1\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [set up v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (flag v)\nif <(Level:) = [1]> then\n    Clone at x: [3500] y: [-60]\nelse\n    if <(Level:) = [2]> then\n        Clone at x: [2890] y: [205]\n    else\n        if <(Level:) = [3]> then\n            Clone at x: [2509] y: [-65]\n        else\n            if <(Level:) = [4]> then\n                Clone at x: [2335] y: [75]\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\ndefine Raise the flag\nswitch costume to (flag2 v)\nwait (0.01) seconds\nswitch costume to (flag3 v)\nwait (0.01) seconds\nswitch costume to (flag4 v)\nwait (0.01) seconds\nswitch costume to (flag5 v)\nwait (0.01) seconds\nswitch costume to (flag6 v)\nwait (0.01) seconds\nswitch costume to (flag7 v)\nwait (0.01) seconds\nswitch costume to (flag8 v)\nwait (0.01) seconds\nswitch costume to (flag9 v)\nwait (0.01) seconds\nswitch costume to (flag10 v)\nwait (0.01) seconds\nswitch costume to (flag11 v)\nwait (0.01) seconds\n\nwhen I receive [play game v]\nforever\n    if <touching (player v)?> then\n        if <not <(costume [number v]) > [1]>> then\n            start sound [Connect v]\n            set [checkpiont v] to [1]\n            Raise the flag\n        end\n    end\nend\n\nstop [this script v]\n\nwhen I receive [game on\(flag\) v]\nif <(CHECKPIONT) > [0]> then\n    switch costume to (flag11 v)\nend\n\n@exit portal3\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [set up v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (flag v)\nif <(Level:) = [1]> then\n    Clone at x: [3500] y: [3000]\nelse\n    if <(Level:) = [2]> then\n        Clone at x: [2585] y: [300000]\n    else\n        if <(Level:) = [3]> then\n            Clone at x: [8418] y: [-55]\n        else\n            if <(Level:) = [4]> then\n                Clone at x: [8418] y: [-55]\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\ndefine Raise the flag\nswitch costume to (flag2 v)\nwait (0.01) seconds\nswitch costume to (flag3 v)\nwait (0.01) seconds\nswitch costume to (flag4 v)\nwait (0.01) seconds\nswitch costume to (flag5 v)\nwait (0.01) seconds\nswitch costume to (flag6 v)\nwait (0.01) seconds\nswitch costume to (flag7 v)\nwait (0.01) seconds\nswitch costume to (flag8 v)\nwait (0.01) seconds\nswitch costume to (flag9 v)\nwait (0.01) seconds\nswitch costume to (flag10 v)\nwait (0.01) seconds\nswitch costume to (flag11 v)\nwait (0.01) seconds\n\nwhen I receive [play game v]\nforever\n    if <(Level:) = [2]> then\n        point in direction (-90)\n    else\n        point in direction (90)\n    end\n    if <touching (player v)?> then\n        start sound [Connect v]\n        set [checkpiont v] to [2]\n        Raise the flag\n        stop [this script v]\n    end\nend\n\nwhen I receive [game on\(flag\) v]\nif <(CHECKPIONT) > [1]> then\n    switch costume to (flag11 v)\nend\n\n@boing2\n\ndefine boing\nwait (0.05) seconds\nswitch costume to (costume2 v)\nwait (0.05) seconds\nswitch costume to (costume3 v)\nwait (0.05) seconds\nswitch costume to (costume2 v)\nwait (0.05) seconds\nswitch costume to (costume1 v)\n\nwhen I receive [play game v]\nforever\n    if <touching (player v)?> then\n        boing\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [set up v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level:) = [1]> then\n    Clone at x: [2200] y: [2000000]\nelse\n    if <(Level:) = [2]> then\n        Clone at x: [2590] y: [20000000]\n    else\n        if <(Level:) = [3]> then\n            Clone at x: [1700] y: [-70]\n        else\n            Clone at x: [0] y: [3000]\n        end\n    end\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\n@boing3\n\ndefine boing\nwait (0.05) seconds\nswitch costume to (costume2 v)\nwait (0.05) seconds\nswitch costume to (costume3 v)\nwait (0.05) seconds\nswitch costume to (costume2 v)\nwait (0.05) seconds\nswitch costume to (costume1 v)\n\nwhen I receive [play game v]\nforever\n    if <touching (player v)?> then\n        boing\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [set up v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level:) = [1]> then\n    Clone at x: [2200] y: [20000000]\nelse\n    if <(Level:) = [2]> then\n        Clone at x: [2590] y: [200000000]\n    else\n        if <(Level:) = [3]> then\n            Clone at x: [1550] y: [-70]\n        else\n            Clone at x: [0] y: [30000]\n        end\n    end\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\n@boing4\n\ndefine boing\nwait (0.05) seconds\nswitch costume to (costume2 v)\nwait (0.05) seconds\nswitch costume to (costume3 v)\nwait (0.05) seconds\nswitch costume to (costume2 v)\nwait (0.05) seconds\nswitch costume to (costume1 v)\n\nwhen I receive [play game v]\nforever\n    if <touching (player v)?> then\n        boing\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [set up v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level:) = [1]> then\n    Clone at x: [2200] y: [20000000]\nelse\n    if <(Level:) = [2]> then\n        Clone at x: [2590] y: [200000000]\n    else\n        if <(Level:) = [3]> then\n            Clone at x: [3700] y: [-80]\n        else\n            Clone at x: [0] y: [30000]\n        end\n    end\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\n@easter egg\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [set up v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (flag v)\nif <(Level:) = [1]> then\n    Clone at x: [3500] y: [3000]\nelse\n    if <(Level:) = [2]> then\n        Clone at x: [3500] y: [3000]\n    else\n        if <(Level:) = [3]> then\n            Clone at x: [6480] y: [-122]\n        else\n            if <(Level:) = [4]> then\n                Clone at x: [0] y: [3000]\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\ndefine Raise the flag\nswitch costume to (flag2 v)\nwait (0.01) seconds\nswitch costume to (flag3 v)\nwait (0.01) seconds\nswitch costume to (flag4 v)\nwait (0.01) seconds\nswitch costume to (flag5 v)\nwait (0.01) seconds\nswitch costume to (flag6 v)\nwait (0.01) seconds\nswitch costume to (flag7 v)\nwait (0.01) seconds\nswitch costume to (flag8 v)\nwait (0.01) seconds\nswitch costume to (flag9 v)\nwait (0.01) seconds\nswitch costume to (flag10 v)\nwait (0.01) seconds\nswitch costume to (flag11 v)\nwait (0.01) seconds\n\nwhen I receive [play game v]\nforever\n    if <touching (player v)?> then\n        if <not <(costume [number v]) > [1]>> then\n            start sound [Connect v]\n            set [checkpiont v] to [3]\n            broadcast (easter egg! v)\n            Raise the flag\n        end\n    end\nend\n\nwhen I receive [game on\(flag\) v]\nif <(CHECKPIONT) > [2]> then\n    switch costume to (flag11 v)\nelse\n    switch costume to (flag v)\nend\n\nstop [this script v]\n\n@Sprite3\n\nwhen I receive [easter egg! v]\nshow\ngo to [front v] layer\nset rotation style [left-right v]\nforever\n    if <not <key (down arrow v) pressed?>> then\n        go to (player v)\n    else\n        go to (player v)\n        change y by (-13)\n    end\n    if <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> then\n        if <key (right arrow v) pressed?> then\n            point in direction (90)\n            switch costume to (costume2 v)\n        end\n        if <key (left arrow v) pressed?> then\n            point in direction (-90)\n            switch costume to (costume2 v)\n        end\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nhide\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (200) y: (-162)\nforever\n    go to [front v] layer\n    point in direction ((([sin v] of ((30) + ((timer) * (100))) ) * (7)) + (90))\n    if <touching (mouse-pointer v)?> then\n        change size by (((100) - (size)) / (3))\n        set [brightness v] effect to (-50)\n        set [ghost v] effect to (50)\n    else\n        change size by (((90) - (size)) / (3))\n        set [brightness v] effect to (0)\n        set [ghost v] effect to (0)\n    end\n    if <(Level:) < [5]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nset [level: v] to ((Level:) + (1))\nset [checkpiont v] to [0]\nset [exit v] to [reset]\n\n@Sprite4\n\nwhen flag clicked\nshow\ngo to [front v] layer\n\nwhen I receive [start screen v]\nclear graphic effects\nreset timer\nshow\ngo to [front v] layer\nwait until <<mouse down?> or <<key (any v) pressed?> or <(timer) > [3]>>>\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nwhen I receive [play game v]\nforever\n    show\n    go to [front v] layer\nend\n\n