scroll platformer v 0.8
@Stage\n\nwhen [m v] key pressed\nset [mouse v] to (join ((mouse x) + (SCROLL X)) (join [,] ((mouse y) + (SCROLL Y))))\nshow variable [mouse v]\n\nwhen flag clicked\nforever\n    play sound [Alan Walker - Faded \(Instrumental Version\)\[Mpgun v] until done\nend\n\n@player\n\nwhen flag clicked\nbroadcast (green flag v) and wait\nbroadcast (play game v) and wait\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nset [level v] to [2]\nforever\n    broadcast (reset v) and wait\n    broadcast (setup v) and wait\n    game on\n    repeat until <(EXIT) > []>\n        tick\n        broadcast (tick v) and wait\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        GAME -DIE\n    end\nend\n\ndefine game on\nset [x v] to [0]\nset [y v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [scroll x v] to [0]\nset [scroll y v] to [0]\npoint in direction (90)\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\ndefine tick\nif <key (left arrow v) pressed?> then\n    change player x by [-8]\nend\nif <key (right arrow v) pressed?> then\n    change player x by [8]\nend\nif <key (up arrow v) pressed?> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nchange [sy v] by (-2)\nchange player y by (sy)\nposition\nTest-Die\nset [scroll x v] to (X)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((Y) - (SCROLL Y)) / (10)))\nposition\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to []\nend\nposition\nif <(Y) < [-180]> then\n    set [exit v] to [die]\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 (-8)\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 GAME -DIE\nset [exit 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 Test-Die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\n\ndefine Game - Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\nset [scroll y v] to [0]\n\nset [scroll x v] to [0]\n\nwhen flag clicked\nforever\n    hide variable [level v]\nend\n\n@platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\npositom ((X) - (SCROLL X)) ((Y) - (SCROLL Y))\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 2 v)\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 .0 v)\n        clone at x: [0] y: [110]\n        clone at x: [134] y: [450]\n        clone at x: [-180] y: [-200]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 0 v)\n            clone at x: [200] y: [250]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 4 1 v)\n                clone at x: [260] y: [240]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (level 1 2 v)\n                    clone at x: [260] y: [240]\n                    clone at x: [174] y: [150]\n                else\n                    if <(LEVEL) = [6]> then\n                        switch costume to (level 7 0 v)\n                        clone at x: [-500] y: [113]\n                        clone at x: [502] y: [200]\n                        switch costume to (level 7 2 v)\n                        clone at x: [-4] y: [220]\n                        switch costume to (level  8 0 v)\n                    else\n                        if <(LEVEL) = [7]> then\n                            switch costume to (level 7 0 v)\n                            clone at x: [-500] y: [113]\n                            clone at x: [502] y: [200]\n                        else\n                            if <(LEVEL) = [8]> then\n                                switch costume to (level  8 0 v)\n                                clone at x: [360] y: [0]\n                                switch costume to (level 8 1 v)\n                                clone at x: [360] y: [0]\n                                switch costume to (level 8 2 v)\n                                clone at x: [360] y: [0]\n                            else\n                                if <(LEVEL) = [9]> then\n                                    switch costume to (level 9 0 v)\n                                else\n                                    if <(LEVEL) = [10]> then\n                                        switch costume to (level 10 1 v)\n                                        clone at x: [71] y: [-37]\n                                        switch costume to (level 10 0 v)\n                                        clone at x: [360] y: [0]\n                                    else\n                                        if <(LEVEL) = [11]> then\n                                            switch costume to (level 11 v)\n                                            wait (3) seconds\n                                            stop [all v]\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine positom (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\nclone at x: [360] y: [0]\n\nchange [level v] by (1)\n\nchange [level v] by (1)\n\nchange [level v] by (1)\n\nclone at x: [-180] y: [-200]\n\nset [level v] to [5]\n\nswitch costume to (level 7 0 v)\n\nswitch costume to (level 7 0 v)\n\nclone at x: [-4] y: [220]\n\nclone at x: [360] y: [0]\nswitch costume to (level 8 1 v)\n\nswitch costume to (level 10 1 v)\nclone at x: [71] y: [-37]\nswitch costume to (level 10 0 v)\n\nclone at x: [360] y: [0]\n\n@danger\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\npositom ((X) - (SCROLL X)) ((Y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nshow variable [level v]\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]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 2 v)\n        clone at x: [-128] y: [-220]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 2 2 v)\n            clone at x: [888] y: [252]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 2 2 v)\n                clone at x: [888] y: [252]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (level 2 2 v)\n                    clone at x: [888] y: [252]\n                else\n                    if <(LEVEL) = [6]> then\n                        switch costume to (level 2 2 v)\n                        clone at x: [888] y: [252]\n                    else\n                        if <(LEVEL) = [7]> then\n                            switch costume to (level 2 2 v)\n                            clone at x: [38574897025748] y: [567]\n                        else\n                            if <(LEVEL) = [8]> then\n                                switch costume to (level 2 2 v)\n                                clone at x: [-808438950898439567467586069846757789'78098'8'654873555555689078] y: [57493846546]\n                            else\n                                if <(LEVEL) = [9]> then\n                                    switch costume to (level 2 2 v)\n                                    clone at x: [-808438950898439567467586069846757789'78098'8'654873555555689078] y: [57493846546]\n                                else\n                                    if <(LEVEL) = [10]> then\n                                        switch costume to (level 2 2 v)\n                                        clone at x: [-808438950898439567467586069846757789'78098'8'654873555555689078] y: [57493846546]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine positom (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\nclone at x: [134] y: [252]\n\nclone at x: [888] y: [110]\nclone at x: [800] y: [252]\n\nclone at x: [-178] y: [120]\n\nhide\n\n@collectables\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\npositom ((X) - (SCROLL X)) ((Y) - (SCROLL Y))\nif <touching (player v)?> then\n    change [collected v] by (1)\n    if <(collected) = (collected max)> then\n        broadcast (open portal v)\n    end\n    delete this clone\nend\n\nwhen I receive [setup v]\nhide\nset [collected max v] to [0]\nset [collected v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [2]> then\n    switch costume to (dot v)\n    clone at x: [133] y: [-.50]\nend\nset [x v] to [-99999]\n\nclone at x: [540] y: [-10]\nclone at x: [730] y: [30]\n\ndefine positom (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)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\n@exit\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\npositom ((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 [setup v]\nhide\nset [collected v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (closed v)\n    clone at x: [1276] y: [50]\nelse\n    clone at x: [286] y: [202]\n    if <(LEVEL) = [2]> then\n        switch costume to (closed v)\n        clone at x: [-10] y: [311]\n    else\n        clone at x: [146] y: [228]\n        if <(LEVEL) = [3]> then\n            switch costume to (open v)\n            clone at x: [-50] y: [442]\n        else\n            clone at x: [500] y: [228]\n            if <(LEVEL) = [4]> then\n                switch costume to (open v)\n                clone at x: [500] y: [340]\n            else\n                clone at x: [201] y: [612]\n                if <(LEVEL) = [5]> then\n                    switch costume to (open v)\n                    clone at x: [155] y: [291]\n                else\n                    clone at x: [201] y: [612]\n                    if <(LEVEL) = [6]> then\n                        switch costume to (open v)\n                        clone at x: [50] y: [295]\n                    else\n                        if <(LEVEL) = [7]> then\n                            switch costume to (open v)\n                            clone at x: [180] y: [524]\n                        else\n                            if <(LEVEL) = [8]> then\n                                switch costume to (open v)\n                                clone at x: [1208] y: [250]\n                            else\n                                clone at x: [201] y: [612]\n                                if <(LEVEL) = [9]> then\n                                    switch costume to (open v)\n                                    clone at x: [270] y: [250]\n                                else\n                                    clone at x: [201] y: [612]\n                                    if <(LEVEL) = [10]> then\n                                        switch costume to (open v)\n                                        clone at x: [655] y: []\n                                    else\n                                        clone at x: [201] y: [612]\n                                        if <(LEVEL) = [11]> then\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine positom (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 [open portal v]\nswitch costume to (open v)\n\nset [level v] to [5]\n\nclone at x: [201] y: [612]\n\n
use arrow keys to move \n\n\nhelp me to get this in trend\n