|| The Dark Life || A Platformer
@Stage\n\nwhen flag clicked\nforever\n    broadcast (scrolling b ground v)\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        switch backdrop to (arrière plan1 v)\n    end\n    if <(Level) = [?]> then\n        switch backdrop to (arrière plan2 v)\n    end\n    if <(Level) = [?]> then\n        switch backdrop to (arrière plan3 v)\n    end\nend\n\n@player\n\nwhen I receive [scrolling b ground v]\nif <(paused) = [0]> then\n    change [y v] by (-1)\n    if <<<<mouse down?> and <(x position) > (mouse x)>> or <key (left arrow v) pressed?>> or <key (a v) pressed?>> then\n        change [x v] by (-0.7)\n    end\n    if <<<<mouse down?> and <(mouse x) > (x position)>> or <key (right arrow v) pressed?>> or <key (d v) pressed?>> then\n        change [x v] by (0.7)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-5)\n        change x by ((x) * (-1))\n        if <<<<mouse down?> and <(mouse y) > (y position)>> or <key (up arrow v) pressed?>> or <key (w v) pressed?>> then\n            set [y v] to [10]\n            if <([abs v] of (x) ) = (x)> then\n                set [x v] to [-20]\n            else\n                set [x v] to [20]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching (ground v)?> then\n        change y by ((0) - (y))\n        set [y v] to [1]\n    end\n    change y by (-2)\n    if <<touching (ground v)?> and <<<<mouse down?> and <(mouse y) > (y position)>> or <key (up arrow v) pressed?>> or <key (w v) pressed?>>> then\n        set [y v] to [15]\n    end\n    change y by (2)\n    if <(y position) > [180]> then\n        set [y v] to [0]\n    end\n    if <<[-175] > (y position)> or <touching (figur7 v)?>> then\n        set [x v] to [0]\n        set [y v] to [0]\n        go to x: (-200) y: (0)\n    end\n    if <(x position) > [230]> then\n        if <not <(Level) = [13]>> then\n            set [x v] to [0]\n            set [y v] to [0]\n            broadcast (slide v)\n            go to x: (-200) y: (0)\n            hide\n        end\n    end\nend\n\nwhen I receive [scrolling b ground v]\nset size to (40) %\ngo to [front v] layer\ngo [backward v] (1) layers\nif <touching (mouse-pointer v)?> then\n    set [ghost v] effect to (60)\nelse\n    set [ghost v] effect to (30)\nend\n\nwhen flag clicked\nset [paused v] to [1]\nhide\nwait (2.5) seconds\nset [paused v] to [0]\n\nwhen flag clicked\ngo to x: (159) y: (69)\n\nwhen flag clicked\ngo to x: (-164) y: (-88)\npoint in direction (90)\nshow\nset [level v] to [1]\n\nwhen I receive [slide v]\nset [paused v] to [1]\nhide\nwait (0.5) seconds\nbroadcast (levelup v)\nwait (0.5) seconds\nchange [level v] by (1)\nwait (1.5) seconds\nset [paused v] to [0]\nshow\n\nwhen flag clicked\nforever\n    switch costume to (costume1 v)\n    if <<<<mouse down?> and <(mouse y) > (y position)>> or <key (up arrow v) pressed?>> or <key (w v) pressed?>> then\n        repeat (10)\n            next costume\n        end\n    end\nend\n\nwhen flag clicked\nshow\n\n@ground\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nswitch costume to (1 v)\nset [ghost v] effect to (0)\n\nwhen I receive [scrolling b ground v]\ngo to [front v] layer\n\nwhen I receive [thumbnail v]\nswitch costume to (thumb v)\n\nwhen I receive [levelup v]\nnext costume\n\nwhen flag clicked\nset [level v] to [1]\n\nwhen flag clicked\nshow\n\n@Figur7\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nforever\n    point in direction ((([sin v] of ((timer) * (Rot Velocity)) ) * ((Rot Velocity) * (0.5))) + (90))\nend\n\nwhen flag clicked\nbroadcast (start v)\nhide\n\nwhen I receive [thumbnail v]\ndelete this clone\n\ndefine new saw at (level) position (x) (y) type (type)\nif <(type) = [1]> then\n    if <(Level) = (level)> then\n    go to x: (x) y: (y)\n    create clone of (_myself_ v)\nelse\n    if <(type) = [2]> then\n        if <(Level) = (level)> then\n        wait (0.1) seconds\n        go to x: (x) y: (y)\n        show\n        forever\n            if <(Level) = (level)> then\n                repeat (60)\n                    change x by (5)\n                    turn right (15) degrees\n                end\n                repeat (60)\n                    change x by (-5)\n                    turn right (15) degrees\n                end\n                go to x: (x) y: (y)\n            end\n        end\n    else\n        if <(Level) = (level)> then\n        wait (0.1) seconds\n        forever\n            if <(Level) = (level)> then\n                show\n                go to x: (x) y: (180)\n                repeat (30)\n                    change y by (-10)\n                    turn right (15) degrees\n                end\n                go to x: (y) y: (-180)\n                repeat (30)\n                    change y by (10)\n                    turn right (15) degrees\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [levelup v]\nhide\ndelete this clone\n\nwhen flag clicked\nnew saw at [1] position [0] [-95] type [1]\nnew saw at [2] position [100] [-170] type [1]\nnew saw at [2] position [55] [-170] type [1]\nnew saw at [2] position [15] [-170] type [1]\nnew saw at [3] position [-75] [-150] type [2]\nnew saw at [4] position [0] [0] type [1]\nnew saw at [5] position [0] [0] type [1]\n\n@decorations\n\nwhen I receive [levelup v]\nnext costume\n\nwhen I receive [thumbnail v]\nswitch costume to (thumb v)\n\nwhen I receive [start v]\nshow\nswitch costume to (1 v)\nset [ghost v] effect to (14)\ngo to x: (0) y: (0)\npoint in direction (90)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (40)\n    else\n        set [ghost v] effect to (30)\n    end\nend\n\nwhen flag clicked\nswitch costume to (de v)\n\nwhen flag clicked\nshow\n\n@grass\n\ndefine Grass\nset [ghost v] effect to (30)\nif <touching (ground v)?> then\n    repeat until <<not <touching (ground v)?>> or <touching (_edge_ v)?>>\n        change y by (1)\n    end\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\n    change x by (-4)\nelse\n    repeat until <touching (ground v)?>\n        change y by (-5)\n        if <touching (_edge_ v)?> then\n            delete this clone\n        end\n    end\n    change y by (-10)\nend\n\ndefine Sway\nset [magnitude v] to (((xmotion) + (pick random (-15) to (5))) * (2))\nset [sway v] to [0]\nrepeat until <<[0] = (round ((Magnitude) * (2)))> or <<touching (player v)?> and <([abs v] of (Magnitude) ) < ([abs v] of ((xmotion) * (2)) )>>>\n    point in direction ((90) - (([sin v] of (sway) ) * (Magnitude)))\n    change [sway v] by (-10)\n    set [magnitude v] to ((0.9) * (Magnitude))\nend\n\nwhen I start as a clone\nshow\nGrass\nforever\n    if <<touching (player v)?> or <touching (mouse-pointer v)?>> then\n        Sway\n    end\nend\n\nwhen flag clicked\nbroadcast (start v)\n\nwhen I receive [thumbnail v]\ndelete this clone\n\nwhen I receive [start v]\nwait until <(Level) = [1]>\nGrass from [-250] to [220]\nwait until <(Level) = [2]>\nGrass from [-250] to [220]\nwait until <(Level) = [3]>\nGrass from [-250] to [220]\nwait until <(Level) = [5]>\nGrass from [-250] to [-100]\nGrass from [190] to [220]\nwait until <(Level) = [6]>\nGrass from [-250] to [220]\n\ndefine Grass from (xpos1) to (xpos2)\nshow\ngo to x: (xpos1) y: (0)\npoint in direction (90)\nrepeat until <(x position) > (xpos2)>\n    set size to (100) %\n    switch costume to (pick random (1) to (5))\n    create clone of (_myself_ v)\n    change x by (20)\nend\nhide\n\nwhen I receive [levelup v]\ndelete this clone\n\n@DE1F1155-FB89-43AF-96BA-55A788B29A2C\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\nset [ghost v] effect to (85)\nrepeat until <(timer) > [5]>\n\n@particul effect\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\n    wait (0.5) seconds\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to (player v)\nshow\ngo to [front v] layer\nset [ghost v] effect to (60)\nswitch costume to (dot v)\nset size to (pick random (10) to (30)) %\nset [brightness v] effect to (0)\nset [cy2 v] to (pick random (20) to (30))\nset [cx1 v] to (pick random (-5) to (5))\nrepeat until <touching (_edge_ v)?>\n    change x by (cx1)\n    change y by (cy2)\n    change [cy2 v] by (-2)\nend\ndelete this clone\n\nwhen I receive [levelup v]\ndelete this clone\n\n@Sprite1\n\nwhen flag clicked\nshow\nclear graphic effects\nwait (2.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [slide v]\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [scrolling b ground v]\ngo to [front v] layer\n\n@Sprite2\n\nwhen flag clicked\nhide\nwait until <(Level) = [1]>\nnew chain at [20] [90]\nnew chain at [-10] [110]\nnew chain at [50] [110]\nnew chain at [-40] [140]\nnew chain at [80] [140]\nwait until <(Level) = [2]>\nnew chain at [-200] [50]\nnew chain at [-150] [100]\nnew chain at [-100] [150]\nnew chain at [175] [90]\nnew chain at [200] [90]\nwait until <(Level) = [3]>\nnew chain at [200] [150]\nnew chain at [175] [125]\nnew chain at [150] [100]\nnew chain at [125] [75]\nnew chain at [100] [50]\nnew chain at [75] [25]\nwait until <(Level) = [4]>\nnew chain at [20] [100]\nnew chain at [-200] [100]\nnew chain at [-175] [125]\nnew chain at [-150] [150]\nnew chain at [-225] [75]\n\nwhen I receive [start v]\nset [level v] to [1]\n\nwhen I receive [levelup v]\nwait (0.5) seconds\ndelete this clone\n\nwhen I start as a clone\nforever\n    show\n    set [ghost v] effect to (30)\n    point in direction (90)\n    forever\n        point in direction ((([sin v] of ((timer) * (Rot Velocity)) ) * ((Rot Velocity) * (0.01))) + (90))\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (30)\n        else\n            set [ghost v] effect to (60)\n        end\n    end\nend\n\ndefine new chain at (x) (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\n@Sprite3\n\nwhen I start as a clone\ngo to (random position v)\ngo to [back v] layer\nshow\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nrepeat (40)\n    change [ghost v] effect by (-1)\nend\nrepeat (40)\n    change [ghost v] effect by (1)\nend\ndelete this clone\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    wait (0.7) seconds\n    create clone of (_myself_ v)\nend\n\n@144872B1-5D12-4590-9C17-6F73DB4ACDBF\n\nwhen flag clicked\nhide\n\n
The Dark Life - a mobile platformer by @Loupdef1 and helped by @TimMcCool \nPlay in fullscreen  \nHow to play: Arrow keys or tap to move. Avoid saws and don't fall into holes. Complete all 5 levels! \nCredits: Art - 100% by me in Scratch vector editor Coding - 95% by me - Thanks to @TimMcCool and @TimMcCool and also @TimMcCool