Lost (Scrolling Platformer) Mobile Friendly
@Stage\n\nwhen [m v] key pressed\nset [mouse v] to (join ((mouse x) + (Scroll X)) (join [,] ((mouse y) + (Scroll Y))))\n\nwhen I receive [start v]\nswitch backdrop to (1 v)\nstop [other scripts in sprite v]\nbroadcast (BG v)\nwait (1) seconds\nforever\n    play sound [906563_Twenty-Six-O-Eight-Loop v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (6 v)\nset [level v] to [1]\n\nwhen I receive [bg v]\nforever\n    if <(Level) = [1]> then\n        switch backdrop to (1 v)\n    end\n    if <(Level) = [2]> then\n        wait (0.5) seconds\n        switch backdrop to (2 v)\n    end\n    if <(Level) = [3]> then\n        wait (0.5) seconds\n        switch backdrop to (3 v)\n    end\n    if <(Level) = [4]> then\n        wait (0.5) seconds\n        switch backdrop to (4 v)\n    end\n    if <(Level) = [5]> then\n        wait (0.5) seconds\n        switch backdrop to (5 v)\n        wait (5) seconds\n        broadcast (outro v)\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\n@Blank\n\n@Player\n\nwhen I receive [green flag v]\nbroadcast (Next v)\nhide\ngo to [back v] layer\ngo [forward v] (5) layers\n\ndefine Play Game\nset [x v] to (Checkpoint X)\nset [y v] to (Checkpoint Y)\nset [sy v] to [0]\nset [sx v] to [0]\nset [in air v] to [0]\nset [finish v] to []\nset [scroll x v] to [0]\nset [scroll y v] to [0]\npoint in direction (90)\nshow\n\ndefine Tick\nif <(Paused?) = [No]> then\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>> then\n        point in direction (-90)\n        change [sx v] by (-2)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        point in direction (90)\n        change [sx v] by (2)\n    end\nend\nif <(Paused?) = [No]> then\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\nend\nif <(Paused?) = [No]> then\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        if <(in air) < [4]> then\n            set [sy v] to [16]\n        end\n    end\n    if <(sy) > [-20]> then\n        change [sy v] by (-2)\n    end\n    Change Player y by (sy)\n    -Life\n    set [scroll x v] to (x)\n    if <(Scroll X) < [0]> then\n        set [scroll x v] to [0]\n    end\n    if <<(Level) = [1]> or <(Level) = [2]>> then\n        if <(Scroll X) > [6865]> then\n            set [scroll x v] to [6865]\n        end\n    end\n    if <<(Level) = [3]> or <(Level) = [4]>> then\n        if <(Scroll X) > [6888]> then\n            set [scroll x v] to [6888]\n        end\n    end\n    if <(Level) = [5]> then\n        if <<(Scroll X) < [0]> or <(Scroll X) > [0]>> then\n            set [scroll x v] to [0]\n        end\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 [finish v] to [No]\n    end\nend\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Play Game\n    repeat until <(Finish) > []>\n        Tick\n        broadcast (Tick v) and wait\n    end\n    if <(Finish) = [Yes]> then\n        Game-Win\n    else\n        Game-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 (platforms 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 [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (Scroll X)) y: ((y) - (Scroll Y))\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> 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 (platforms 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 -Life\nif <touching (danger v)?> then\n    set [finish v] to [No]\nend\n\ndefine Game-Die\nset [finish v] to []\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\n\ndefine Game-Win\nchange [level v] by (1)\nbroadcast (Next v)\nbroadcast (Transition v)\nwait (0.5) seconds\n\nwhen I receive [start v]\nset [coins v] to [0]\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I receive [next v]\nbroadcast (Refresh v)\nset [paused? v] to [No]\nset [checkpoint x v] to [-199]\nset [checkpoint y v] to [-120]\n\nwhen flag clicked\nhide\n\nwhen I receive [outro v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [start v]\nset [costume v] to [1]\nforever\n    switch costume to (Costume)\n    if <key (q v) pressed?> then\n        change [costume v] by (-1)\n        wait until <not <key (q v) pressed?>>\n    end\n    if <key (e v) pressed?> then\n        change [costume v] by (1)\n        wait until <not <key (e v) pressed?>>\n    end\nend\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (Scroll X)) ((y) - (Scroll 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\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 receive [setup 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: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\nelse\n    if <(Level) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n    else\n        if <(Level) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n        else\n            if <(Level) = [4]> then\n                switch costume to (level 4 1 v)\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n            else\n                switch costume to (level 5 1 v)\n            end\n        end\n    end\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [outro v]\nhide\nstop [other scripts in sprite v]\n\n@Coins\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    change [coins v] by (1)\n    delete this clone\nend\n\ndefine position (x) (y)\nset size to (90) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I receive [refresh v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    switch costume to (coin v)\n    Clone at x: [63] y: [-102]\n    Clone at x: [63] y: [-50]\n    Clone at x: [310] y: [-6]\n    Clone at x: [362] y: [-6]\n    Clone at x: [927] y: [-119]\n    Clone at x: [968] y: [-119]\n    Clone at x: [1009] y: [-119]\n    Clone at x: [1049] y: [-119]\n    Clone at x: [1086] y: [-119]\n    Clone at x: [1126] y: [-119]\n    Clone at x: [1164] y: [-119]\n    Clone at x: [1209] y: [-119]\n    Clone at x: [1249] y: [-119]\n    Clone at x: [1286] y: [-119]\n    Clone at x: [2036] y: [-58]\n    Clone at x: [2083] y: [-58]\n    Clone at x: [2232] y: [-116]\n    Clone at x: [2282] y: [-116]\n    Clone at x: [2817] y: [-22]\n    Clone at x: [2458] y: [17]\n    Clone at x: [2577] y: [86]\n    Clone at x: [2689] y: [52]\n    Clone at x: [3947] y: [75]\n    Clone at x: [3890] y: [75]\n    Clone at x: [3919] y: [75]\n    Clone at x: [5161] y: [80]\n    Clone at x: [5186] y: [80]\n    Clone at x: [5210] y: [80]\n    Clone at x: [5234] y: [80]\n    Clone at x: [5258] y: [80]\n    Clone at x: [5282] y: [80]\n    Clone at x: [5991] y: [53]\n    Clone at x: [5958] y: [53]\n    Clone at x: [6134] y: [-108]\n    Clone at x: [6511] y: [-84]\nelse\n    if <(Level) = [2]> then\n        switch costume to (coin v)\n        Clone at x: [-77] y: [-79]\n        Clone at x: [-32] y: [-51]\n        Clone at x: [11] y: [-79]\n        Clone at x: [245] y: [-76]\n        Clone at x: [349] y: [-76]\n        Clone at x: [511] y: [10]\n        Clone at x: [511] y: [68]\n        Clone at x: [759] y: [-80]\n        Clone at x: [1200] y: [1]\n        Clone at x: [1228] y: [1]\n        Clone at x: [1255] y: [1]\n        Clone at x: [1282] y: [1]\n        Clone at x: [513] y: [298]\n        Clone at x: [458] y: [298]\n        Clone at x: [485] y: [298]\n        Clone at x: [539] y: [298]\n        Clone at x: [564] y: [298]\n        Clone at x: [590] y: [298]\n        Clone at x: [615] y: [298]\n        Clone at x: [640] y: [298]\n        Clone at x: [668] y: [298]\n        Clone at x: [693] y: [298]\n        Clone at x: [718] y: [298]\n        Clone at x: [744] y: [298]\n        Clone at x: [769] y: [298]\n        Clone at x: [795] y: [298]\n        Clone at x: [820] y: [298]\n        Clone at x: [1631] y: [46]\n        Clone at x: [1470] y: [-21]\n        Clone at x: [1883] y: [-28]\n        Clone at x: [2442] y: [-56]\n        Clone at x: [2442] y: [-115]\n        Clone at x: [2510] y: [9]\n        Clone at x: [2610] y: [80]\n        Clone at x: [4083] y: [-115]\n        Clone at x: [4114] y: [-80]\n        Clone at x: [4140] y: [-115]\n        Clone at x: [4175] y: [-80]\n        Clone at x: [4711] y: [-6]\n        Clone at x: [4851] y: [39]\n        Clone at x: [4558] y: [-56]\n        Clone at x: [5075] y: [231]\n        Clone at x: [5049] y: [231]\n        Clone at x: [5099] y: [231]\n        Clone at x: [5127] y: [231]\n        Clone at x: [5155] y: [231]\n    else\n        if <(Level) = [3]> then\n            switch costume to (coin v)\n            Clone at x: [-77] y: [-79]\n            Clone at x: [-32] y: [-51]\n            Clone at x: [305] y: [-59]\n            Clone at x: [354] y: [-59]\n            Clone at x: [556] y: [100]\n            Clone at x: [585] y: [100]\n            Clone at x: [501] y: [100]\n            Clone at x: [527] y: [100]\n            Clone at x: [505] y: [-115]\n            Clone at x: [556] y: [-115]\n            Clone at x: [580] y: [-115]\n            Clone at x: [532] y: [-115]\n            Clone at x: [708] y: [-57]\n            Clone at x: [757] y: [-57]\n            Clone at x: [937] y: [-57]\n            Clone at x: [937] y: [-99]\n            Clone at x: [937] y: [-12]\n            Clone at x: [1068] y: [-57]\n            Clone at x: [1068] y: [-99]\n            Clone at x: [1068] y: [-12]\n            Clone at x: [1200] y: [-57]\n            Clone at x: [1200] y: [-99]\n            Clone at x: [1200] y: [-12]\n            Clone at x: [1320] y: [-57]\n            Clone at x: [1320] y: [-99]\n            Clone at x: [1320] y: [-12]\n            Clone at x: [1423] y: [-27]\n            Clone at x: [1547] y: [-27]\n            Clone at x: [1692] y: [18]\n            Clone at x: [1831] y: [-27]\n            Clone at x: [2020] y: [-37]\n            Clone at x: [2531] y: [-115]\n            Clone at x: [2504] y: [-115]\n            Clone at x: [2477] y: [-115]\n            Clone at x: [2558] y: [-115]\n            Clone at x: [3719] y: [120]\n            Clone at x: [3849] y: [19]\n            Clone at x: [4008] y: [135]\n            Clone at x: [4193] y: [-32]\n            Clone at x: [2589] y: [-115]\n            Clone at x: [4600] y: [298]\n            Clone at x: [4624] y: [322]\n            Clone at x: [4645] y: [298]\n            Clone at x: [4669] y: [322]\n            Clone at x: [4688] y: [298]\n        else\n            if <(Level) = [4]> then\n                switch costume to (coin v)\n                Clone at x: [-77] y: [-79]\n                Clone at x: [-36] y: [-37]\n                Clone at x: [-2] y: [-83]\n                Clone at x: [626] y: [-38]\n                Clone at x: [656] y: [-25]\n                Clone at x: [681] y: [-38]\n                Clone at x: [704] y: [-25]\n                Clone at x: [728] y: [-38]\n                Clone at x: [784] y: [-38]\n                Clone at x: [806] y: [-25]\n                Clone at x: [828] y: [-38]\n                Clone at x: [851] y: [-25]\n                Clone at x: [874] y: [-38]\n                Clone at x: [994] y: [-111]\n                Clone at x: [1034] y: [-111]\n                Clone at x: [1073] y: [-111]\n                Clone at x: [1108] y: [-111]\n                Clone at x: [1197] y: [-111]\n                Clone at x: [1260] y: [-111]\n                Clone at x: [1227] y: [-111]\n                Clone at x: [1288] y: [-111]\n                Clone at x: [2540] y: [-57]\n                Clone at x: [2511] y: [-57]\n                Clone at x: [2482] y: [-57]\n                Clone at x: [2570] y: [-57]\n                Clone at x: [2600] y: [-57]\n                Clone at x: [2878] y: [-95]\n                Clone at x: [2995] y: [-32]\n                Clone at x: [3116] y: [4]\n                Clone at x: [3244] y: [55]\n                Clone at x: [3390] y: [4]\n                Clone at x: [3800] y: [-4]\n                Clone at x: [3767] y: [-4]\n                Clone at x: [4228] y: [-25]\n                Clone at x: [5328] y: [-37]\n                Clone at x: [5328] y: [-99]\n                Clone at x: [5328] y: [-68]\n                Clone at x: [5952] y: [-55]\n                Clone at x: [5992] y: [-55]\n                Clone at x: [6152] y: [-30]\n                Clone at x: [6329] y: [-30]\n                Clone at x: [6507] y: [-30]\n                Clone at x: [6690] y: [-30]\n            end\n        end\n    end\nend\nset [x v] to [-99999]\n\nwhen I receive [next v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [outro v]\nhide\nstop [other scripts in sprite v]\n\n@Pause\n\nwhen I receive [start v]\nforever\n    if <key (space v) pressed?> then\n        if <(Paused?) = [No]> then\n            set [paused? v] to [Yes]\n        else\n            set [paused? v] to [No]\n        end\n        wait until <not <key (space v) pressed?>>\n    end\nend\n\nwhen I receive [start v]\nforever\n    go to [front v] layer\n    switch costume to (pause v)\n    go to x: (0) y: (0)\n    if <(Paused?) = [Yes]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [outro v]\nhide\nstop [other scripts in sprite v]\n\n@Decorations\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (Scroll X)) ((y) - (Scroll 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\ndefine Clone at x: (x) y: (y)\ngo to [back v] layer\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [setup 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: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\nelse\n    if <(Level) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n    else\n        if <(Level) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n        else\n            if <(Level) = [4]> then\n                switch costume to (level 4 1 v)\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n            else\n                switch costume to (level 5 1 v)\n            end\n        end\n    end\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [outro v]\nhide\nstop [other scripts in sprite v]\n\n@Score\n\nwhen I receive [start v]\nset [digits v] to [1]\nrepeat (30)\n    create clone of (_myself_ v)\n    change [digits v] by (1)\nend\nhide\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nforever\n    set size to (110) %\n    go to x: (((digits) * (15)) - (200)) y: (153)\n    if <(length of (Coins)) < (digits)> then\n        hide\n    else\n        show\n        switch costume to (letter (digits) of (Coins))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [outro v]\nhide\nstop [other scripts in sprite v]\n\n@Checkpoint\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (Scroll X)) ((y) - (Scroll 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\nwhen I receive [setup v]\nif <(Level) = [1]> then\n    set [x v] to [3015]\n    set [y v] to [-90]\nend\nif <(Level) = [2]> then\n    set [x v] to [3293]\n    set [y v] to [70]\nend\nif <(Level) = [3]> then\n    set [x v] to [3565]\n    set [y v] to [-90]\nend\nif <(Level) = [4]> then\n    set [x v] to [3675]\n    set [y v] to [-90]\nend\ngo to [back v] layer\ngo [forward v] (2) layers\nhide\n\nwhen I receive [next v]\nswitch costume to (checkpoint v)\nforever\n    if <touching (player v)?> then\n        switch costume to (checkpoint2 v)\n        set [checkpoint x v] to ((x) + (10))\n        set [checkpoint y v] to ((y) - (30))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [outro v]\nhide\nstop [other scripts in sprite v]\n\n@Exit\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (Scroll X)) ((y) - (Scroll 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\nwhen I receive [setup v]\nset [x v] to [7012]\nset [y v] to [-90]\ngo to [back v] layer\ngo [forward v] (2) layers\nhide\n\nwhen I receive [play game v]\nforever\n    if <touching (player v)?> then\n        set [finish v] to [Yes]\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [outro v]\nhide\nstop [other scripts in sprite v]\n\n@Danger\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (Scroll X)) ((y) - (Scroll 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\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 receive [setup 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: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\nelse\n    if <(Level) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n    else\n        if <(Level) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n        else\n            if <(Level) = [4]> then\n                switch costume to (level 4 1 v)\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n                Clone at x: [360] y: [0]\n            else\n                switch costume to (level 5 1 v)\n            end\n        end\n    end\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [outro v]\nhide\nstop [other scripts in sprite v]\n\n@Intro\n\nwhen flag clicked\nset [intro v] to [Yes]\nstart sound [Zaza - Be Together v]\ngo to x: (0) y: (0)\nswitch costume to (logo v)\npoint in direction (-70)\nset [ghost v] effect to (100)\nset size to (20) %\nshow\nrepeat (17)\n    turn left (10) degrees\n    change [ghost v] effect by (-5)\n    change size by (4)\nend\nrepeat (3)\n    turn left (7.5) degrees\n    change [ghost v] effect by (-3.75)\n    change size by (3)\nend\nrepeat (1)\n    turn left (5) degrees\n    change [ghost v] effect by (-2.5)\n    change size by (2)\nend\nrepeat (1)\n    turn left (3) degrees\n    set size to (100) %\n    clear graphic effects\nend\nwait (0.5) seconds\nwait (5.5) seconds\nstart sound [car passing v]\ncreate clone of (_myself_ v)\nswitch costume to (glide v)\ngo to x: (-800) y: (0)\nglide (0.2) secs to x: (0) y: (0)\nbroadcast (del v)\nbroadcast (Start v)\nglide (0.2) secs to x: (800) y: (0)\nhide\n\nwhen flag clicked\nwait (1.7) seconds\nset [x v] to [2]\nrepeat (8)\n    wait (0.4) seconds\n    create clone of (_myself_ v)\n    change [x v] by (1)\nend\nset [x v] to [999]\n\nwhen I receive [del v]\ndelete this clone\n\nwhen I start as a clone\nif <(intro) = [Yes]> then\n    if <(x) = [999]> then\nelse\n    go to [back v] layer\n    clear graphic effects\n    set size to (110) %\n    go to x: (0) y: (0)\n    switch costume to (costume1 v)\nend\n\nwhen I receive [outro v]\ngo to x: (0) y: (-25)\nshow\nset [sine v] to [0]\nswitch costume to (logo v)\nset [intro v] to [No]\ncreate clone of (_myself_ v)\nforever\n    change [sine v] by (7.5)\n    point in direction ((([sin v] of (sine) ) * (15)) + (90))\n    set size to ((([sin v] of ((sine) * (2)) ) * (25)) + (150)) %\nend\n\nwhen I receive [outro v]\nforever\n    play sound [Outro Music v] until done\nend\n\nwhen I receive [transition v]\npoint in direction (90)\nshow\nswitch costume to (transition v)\ngo to x: (-800) y: (0)\nglide (0.5) secs to x: (0) y: (0)\nglide (0.7) secs to x: (800) y: (0)\nhide\n\n@Splash\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ngo to [front v] layer\nswitch costume to (splash v)\nforever\n    go to x: (0) y: (0)\n    switch costume to (bg v)\n    if <not <(Level) = [5]>> then\n        show\n    else\n        hide\n    end\nend\n\n
*Press The Green Flag To Play. \n*Instructions Are In The Game.\n*If You Are The Best Find A Way To Get To The Hidden Coins.