Stickman - A Scrolling Platformer- | Scrolling Platformer | Stickman

Instructions: Hi guys,\nThis is my New Game.\nStickman Scrolling Platformer, It is Mobile Friendly\n\nPress any Key or Click to Jump\nAvoid spikes and saws\nCollect all the coins\n\n\nSUBSCRIBE TO SL SMART MIND TO SEE HOW TO MAKE THIS AWESOME GAME!!!

@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\nswitch backdrop to (backdrop2 v)\nrepeat until <(backdrop [number v]) = [2]>\n    play sound [TheFatRat - Unity \(Instrumental\) v] until done\nend\n\nwhen I receive [reset v]\nif <(backdrop [number v]) = [3]> then\n    set [ghost v] effect to (20)\nend\n\n@Laggy\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]\nhide variable [mouse v]\nset [level v] to [1]\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 [-200]\nset [y v] to [0]\nset [speed y v] to [0]\nset [speed x 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]\nset size to (40) %\nclear graphic effects\nshow\n\ndefine Tick\npoint in direction (90)\nchange [speed x v] by (1.5)\nnext costume\nswitch costume to (hitbox v)\nchange [animate v] by (1)\nif <(Animate) = [9]> then\n    set [animate v] to [1]\nend\nset [speed x v] to ((Speed x) * (0.8))\nif <([abs v] of (Speed x) ) > [0.9]> then\n    Change player x by (round (Speed x))\nend\nif <<key (space v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <(in air) < [4]> then\n        set [speed y v] to [16]\n    end\nend\nif <(Speed y) > [-20]> then\n    change [speed y v] by (-2)\nend\nChange player y by (Speed y)\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(SCROLL X) > [3826]> then\n    set [scroll x v] to [3826]\nend\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-178]> then\n    set [exit v] to [Die]\nend\nif <<touching (saw v)?> or <touching (danger v)?>> then\n    start sound [crunch v]\n    set [exit v] to [Die]\nend\nif <touching (bounce v)?> then\n    start sound [boing v]\n    set [speed y v] to [28]\nend\nswitch costume to (Animate)\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 [speed y 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)\nend\nrepeat 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\nend\n\ndefine Game - Die\nset [exit v] to []\nrepeat (10)\n    change size by (3)\n    change [ghost v] effect by (5)\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 (-0.25)\n    change [ghost v] effect by (2)\nend\nhide\nclear graphic effects\nchange [level v] by (1)\nwait (1) seconds\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\nswitch backdrop to (backdrop3 v)\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\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 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]\nend\nif <(LEVEL) = [2]> then\n    switch costume to (level 2-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: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\nif <(LEVEL) = [3]> then\n    switch costume to (level 3-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: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\nif <(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]\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@BG\n\nwhen I receive [green flag v]\nhide\nswitch backdrop to (backdrop3 v)\n\nwhen I receive [tick v]\nPosition ((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 (1 v)\n    Clone at x: [480] y: [0]\n    next costume\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]\nend\nif <(LEVEL) = [2]> then\n    switch costume to (1 v)\n    Clone at x: [480] y: [0]\n    next costume\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]\nend\nif <(LEVEL) = [3]> then\n    switch costume to (1 v)\n    Clone at x: [480] y: [0]\n    next costume\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]\nend\nif <(LEVEL) = [4]> then\n    switch costume to (1 v)\n    Clone at x: [480] y: [0]\n    next costume\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\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)\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\nwhen I receive [setup v]\npoint in direction (90)\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: [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: [480] y: [0]\nend\nif <(LEVEL) = [2]> then\n    switch costume to (level 2-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: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\nif <(LEVEL) = [3]> then\n    switch costume to (level 3-1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\nif <(LEVEL) = [4]> then\n    switch costume to (levl 4-1 v)\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@Saw\n\nwhen I receive [green flag v]\nhide\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\nturn right (15) degrees\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    Clone at x: [33] y: [-143]\n    Clone at x: [2462] y: [-140]\nend\nif <(LEVEL) = [2]> then\n    Clone at x: [253] y: [-146]\n    Clone at x: [2336] y: [-12]\nend\nif <(LEVEL) = [3]> then\n    Clone at x: [1185] y: [-8]\n    Clone at x: [2288] y: [-142]\n    Clone at x: [2398] y: [-142]\nend\nset [x v] to [-99999]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [beep2 v]\ndelete this clone\n\n@Bounce\n\nwhen I receive [green flag v]\nhide\n\ndefine Position (x) (y)\npoint in direction (90)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\nif <touching (player v)?> then\n    switch costume to (2 v)\nelse\n    switch costume to (1 v)\nend\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [2]> then\n    Clone at x: [398] y: [-148]\n    Clone at x: [1195] y: [-144]\n    Clone at x: [1957] y: [-144]\nend\nif <(LEVEL) = [3]> then\n    Clone at x: [199] y: [-144]\nend\nset [x v] to [-99999]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\n@TM\n\nwhen [timer v] > (0.01)\nshow\ngo to [front v] layer\nset [pixelate v] effect to (100)\nset [ghost v] effect to (100)\nrepeat (20)\n    change [pixelate v] effect by (-5)\n    change [ghost v] effect by (-5)\nend\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\nforever\n    reset timer\nend\n\n@Colectables\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 [collected v] by (1)\n    start sound [collect v]\n    if <(COLLECTED) = (COINS)> then\n        broadcast (Open Portal v)\n    end\n    delete this clone\nend\n\nwhen I receive [setup v]\nhide\nset [collected v] to [0]\nset [coins v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    Clone at x: [100] y: [-104]\n    Clone at x: [280] y: [-124]\n    Clone at x: [509] y: [-52]\n    Clone at x: [764] y: [95]\n    Clone at x: [1148] y: [-46]\n    Clone at x: [1431] y: [30]\n    Clone at x: [2043] y: [-27]\nend\nif <(LEVEL) = [2]> then\n    Clone at x: [37] y: [-62]\n    Clone at x: [242] y: [-74]\n    Clone at x: [835] y: [-95]\n    Clone at x: [1187] y: [-67]\n    Clone at x: [1440] y: [-40]\n    Clone at x: [1809] y: [-102]\n    Clone at x: [2638] y: [31]\nend\nif <(LEVEL) = [3]> then\n    Clone at x: [45] y: [-111]\n    Clone at x: [187] y: [-91]\n    Clone at x: [908] y: [21]\n    Clone at x: [1242] y: [14]\n    Clone at x: [1388] y: [19]\n    Clone at x: [2106] y: [-109]\n    Clone at x: [2335] y: [-84]\nend\nset [x v] to [-999999999]\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\nturn right (10) degrees\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 [coins v] by (1)\nset size to (20) %\ncreate clone of (_myself_ 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))\nif <<(costume [name v]) = [Open Portal]> and <touching (player v)?>> then\n    start sound [portal v]\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) < [6]> then\n    if <(LEVEL) = [1]> then\n        switch costume to (close portal v)\n        Clone at x: [2548] y: [-91]\n    end\n    if <(LEVEL) = [2]> then\n        switch costume to (close portal v)\n        Clone at x: [3117] y: [-49]\n    end\n    if <(LEVEL) = [3]> then\n        switch costume to (close portal v)\n        Clone at x: [2571] y: [-40]\n    end\n    if <(LEVEL) = [4]> then\n        set [x v] to [-9999999999]\n    end\nelse\n    set [x v] to [-9999999999]\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\nturn right (15) degrees\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 portal v)\n\nwhen I receive [tick v]\nif <<touching (player v)?> and <not <(COLLECTED) = (COINS)>>> then\n    set [exit v] to [Die]\nend\n\n