Parkour scrolling platformer game II Enjoy pls.
@Stage\n\nwhen [m v] key pressed\nset [mouse v] to (join ((mouse x) + (SCROLLX)) (join [,] ((mouse y) + (SCROLLY))))\nshow variable [mouse v]\n\nwhen flag clicked\nforever\n    play sound [Vexento - Tevo \(Original Mix\) v] until done\nend\n\nwhen I receive [change backdrop v]\nif <(LEVEL) = [1]> then\n    switch backdrop to (backdrop2 v)\nend\nif <(LEVEL) = [2]> then\n    switch backdrop to (backdrop2 v)\nend\nif <(LEVEL) = [2]> then\n    switch backdrop to (backdrop1 v)\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nforever\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v) and wait\n\n@BLANK\n\n@player\n\ndefine GAME ON\nset [x v] to [0]\nset [y v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [scrollx v] to [0]\nset [scrolly v] to [0]\nset [exit v] to []\nset [ghost v] effect to (0)\nshow\nset size to (40) %\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nforever\n    broadcast (RESET v)\n    broadcast (Setup v)\n    GAME ON\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (TICK v) and wait\n    end\n    if <(EXIT) = [Win]> then\n        Player win\n    else\n        Player die\n    end\nend\n\ndefine Tick\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    point in direction (-90)\n    change [sx v] by (-2)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    point in direction (90)\n    change [sx v] by (2)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change player x by (round (sx))\nend\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nchange [sy v] by (-2)\nTrap die\nChange player y by (sy)\nif <(SCROLLX) < [0]> then\n    set [scrollx v] to [0]\nend\nPosition\nset [scrollx v] to (x)\nChange player y by (sy)\nif <(y) < [-180]> then\n    set [exit v] to [dead]\nend\nchange [scrolly v] by (round (((y) - (SCROLLY)) / (10)))\nif <(SCROLLY) < [0]> then\n    set [scrolly v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [dead]\nend\n\ndefine Change player x by (sx)\nchange [x v] by (sx)\nchange [in air v] by (1)\nPosition\nif <touching (obstacles/ground v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (obstacles/ground 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?>> 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 (obstacles/ground 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 Position\ngo to x: ((x) - (SCROLLX)) y: ((y) - (SCROLLY))\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (obstacles/ground 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 Player 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\nPosition\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\n\ndefine Trap die\nif <touching (danger!!! v)?> then\n    set [exit v] to [dead]\nend\n\ndefine Player win\nrepeat (50)\n    point towards (open/ closed portal v)\n    turn right (65) degrees\n    move ((distance to [open/ closed portal 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\nbroadcast (Change backdrop v) and wait\n\nwhen I receive [player die v]\nset [exit v] to [dead]\n\nwhen I receive [start game v]\nset [timer v] to [0]\nset [level v] to [1]\nshow variable [level v]\nif <(PLAYER COLOR) = [Red]> then\n    switch costume to (red v)\nend\nif <(PLAYER COLOR) = [Blue]> then\n    switch costume to (blue v)\nend\nif <(PLAYER COLOR) = [Green]> then\n    switch costume to (green v)\nend\nbroadcast (Change backdrop v) and wait\nbroadcast (Green flag v) and wait\nbroadcast (PLAY GAME v) and wait\n\n@obstacles/ground\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 [tick v]\nPosition ((x) - (SCROLLX)) ((y) - (SCROLLY))\n\ndefine clone at (x) (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nhide\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    clone at [360] [0]\n    clone at [380] [0]\n    clone at [380] [0]\nend\nif <(LEVEL) = [2]> then\n    switch costume to (level 2 1 v)\n    clone at [150] [200]\n    clone at [360] [100]\nend\nif <(LEVEL) = [3]> then\n    switch costume to (level 3 1 v)\n    clone at [360] [0]\n    clone at [360] [0]\n    clone at [360] [0]\n    clone at [1348] [187]\n    clone at [360] [0]\nend\nif <(LEVEL) = [4]> then\n    switch costume to (level 4 1 v)\nend\n\nclone at [380] [0]\nclone at [380] [0]\nclone at [380] [0]\nclone at ((360) * (2)) [0]\nclone at ((360) * (1)) [0]\nclone at ((360) * (1)) [0]\nclone at ((360) * (1)) [0]\nclone at ((360) * (1)) [0]\n\nclone at [360] [0]\nclone at [360] [0]\n\n@danger!!!\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 [tick v]\nPosition ((x) - (SCROLLX)) ((y) - (SCROLLY))\n\ndefine clone at (x) (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nhide\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    clone at [360] [0]\n    clone at [380] [0]\n    clone at [380] [0]\nend\nif <(LEVEL) = [2]> then\n    switch costume to (level 2 1 v)\n    clone at [150] [200]\n    clone at [360] [100]\nend\nif <(LEVEL) = [3]> then\n    switch costume to (level 3 1 v)\n    clone at [360] [0]\n    clone at [360] [0]\n    clone at [360] [0]\nend\n\nclone at [380] [0]\nclone at ((360) * (2)) [0]\nclone at [380] [0]\nclone at [380] [0]\nclone at [380] [0]\nclone at [380] [0]\n\nif <(LEVEL) = [4]> then\n    switch costume to (level 4 1 v)\nend\n\nclone at [0] [0]\nclone at [0] [0]\n\n@Open/ closed portal\n\ndefine clone at (x) (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\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) < [4]> then\n    if <(LEVEL) = [1]> then\n        switch costume to (closed portal v)\n        clone at [1743] [22]\n    end\n    if <(LEVEL) = [2]> then\n        switch costume to (closed portal v)\n        clone at [947] [517]\n    end\n    if <(LEVEL) = [3]> then\n        switch costume to (closed portal v)\n        clone at [1283] [172]\n    end\nelse\n    set [x v] to [-99999]\nend\n\nwhen I receive [open portal v]\nswitch costume to (open portal v)\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLLX)) ((y) - (SCROLLY))\nif <<(costume [name v]) = [open portal]> and <touching (player v)?>> then\n    set [exit v] to [Win]\nend\n\n\n\n@collectables\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) (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\nswitch costume to (pick random (1) to (8))\ncreate clone of (_myself_ v)\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLLX)) ((y) - (SCROLLY))\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]\nset [collected max v] to [0]\nset [collected v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nhide\nif <(LEVEL) = [1]> then\n    clone at [360] [0]\n    clone at ((360) * (2)) [0]\n    clone at ((360) * (3.3)) [0]\n    clone at ((360) * (4)) [0]\n    clone at ((300) * (3)) [112]\n    clone at ((300) * (3.6)) [112]\nend\nif <(LEVEL) = [2]> then\n    clone at [-134] [134]\n    clone at [190] [273]\n    clone at [0] [367]\n    clone at [479] [340]\n    clone at [622] [405]\nend\nset [x v] to [-999999999]\nif <(LEVEL) = [3]> then\n    clone at [360] [-37]\n    clone at [946] [-50]\n    clone at [1346] [-14]\nend\nset [x v] to [-999999999]\n\nclone at [-291] [-180]\n\nwhen I receive [green flag v]\nhide\n\nclone at [360] [112]\nclone at [360] [112]\n\n@saw\n\nwhen I receive [setup v]\n\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [player dying v] to [N]\nif <(LEVEL) = [2]> then\n    clone at [334] [257]\nend\nset [x v] to [-99999]\n\nif <(LEVEL) = [1]> then\n    clone at [360] [0]\n    clone at [380] [0]\n    clone at [380] [0]\nend\n\ndefine clone at (x) (y)\n\nchange [x v] by (x)\nchange [y v] by (y)\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nPosition\n\nnext costume\n\ndefine Position (x) (y)\n\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]\n\ndelete this clone\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\n\nPosition ((x) - (SCROLLX)) ((y) - (SCROLLY))\nif <<touching (player v)?> and <(PLAYER DYING) = [N]>> then\n    set [player dying v] to [Y]\n    broadcast (Player die v) and wait\n    set [player dying v] to [N]\nend\n\nwhen I start as a clone\n\nforever\n    wait (0.05) seconds\n    next costume\nend\n\nPosition\n\n@Play button\n\nwhen flag clicked\ngo to x: (0) y: (-90)\nset size to (0) %\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (3))\n        set [ghost v] effect to (30)\n    else\n        change size by (((100) - (size)) / (3))\n        set [ghost v] effect to (-10)\n    end\nend\n\nwhen this sprite clicked\nstart sound [pop v]\nhide\nbroadcast (Start Game v)\nstop [this script v]\n\n@Words\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset size to (0) %\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (3))\n        set [ghost v] effect to (30)\n    else\n        change size by (((100) - (size)) / (3))\n        set [ghost v] effect to (-10)\n    end\nend\n\nwhen I receive [start game v]\nhide\n\n@character 1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (not selected v)\ngo to [front v] layer\nshow\n\nwhen I receive [start game v]\nhide\n\nwhen this sprite clicked\nswitch costume to (slected v)\nset [player color v] to [Red]\nbroadcast (Selected Color v)\n\nwhen I receive [selected color v]\nif <(PLAYER COLOR) = [Red]> then\n    switch costume to (slected v)\nelse\n    switch costume to (not selected v)\nend\n\n@Character 2\n\nwhen flag clicked\nswitch costume to (not selected v)\ngo to x: (152) y: (0)\ngo to [front v] layer\nshow\n\nwhen I receive [start game v]\nhide\n\nwhen this sprite clicked\nswitch costume to (selected v)\nset [player color v] to [Blue]\nbroadcast (Selected Color v)\n\nwhen I receive [selected color v]\nif <(PLAYER COLOR) = [Blue]> then\n    switch costume to (selected v)\nelse\n    switch costume to (not selected v)\nend\n\n@Character 3\n\nwhen flag clicked\ngo to x: (-139) y: (-5)\nswitch costume to (not selected v)\ngo to [front v] layer\nshow\n\nwhen I receive [start game v]\nhide\n\nwhen this sprite clicked\nswitch costume to (slected v)\nset [player color v] to [Green]\nbroadcast (Selected Color v)\n\nwhen I receive [selected color v]\nif <(PLAYER COLOR) = [Green]> then\n    switch costume to (slected v)\nelse\n    switch costume to (not selected v)\nend\n\n@You Win!!\n\nwhen flag clicked\nhide\nhide variable [timer v]\nset [timer v] to [0]\n\nwhen I receive [start game v]\nshow variable [timer v]\ngo to x: (0) y: (0)\nwait until <(LEVEL) = [4]>\nwait (1) seconds\nshow\n\nwhen I receive [start game v]\nforever\n    set [timer v] to (timer)\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nhide\n\n
Collect the colored circles to unlock the portal that brings you to the next level. Use W, A, S, D or arrow keys to move. Pls enjoy. Comment any problems and if you want any more levels. \n\nBe free to remix, like, and follow me.