3K - A Platformer (Mobile Friendly) #games
@Stage\n\n@Player\n\ndefine Tick\nbroadcast (tick v)\nif <touching (spikes v)?> then\n    set [boost v] to [0]\nelse\n    set [boost v] to ((2.2) - ((22) / (ZOOM)))\nend\nif <not <<(Game) = [message]> or <(Game) = [transition]>>> then\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > [25]>>> then\n        if <not <(x position) > [210]>> then\n            change [xv v] by (0.5)\n        end\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < [-25]>>> then\n        if <not <(x position) < [-210]>> then\n            change [xv v] by (-0.5)\n        end\n    end\n    set [xv v] to ((Xv) * (0.9))\n    if <([abs v] of (Xv) ) > [0.9]> then\n        X_move ((Boost) * (Xv))\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [25]>>> then\n        if <touching (spikes v)?> then\n            set [yv v] to ((Boost) * (12))\n        else\n            if <(time_jump) = [0]> then\n                set [yv v] to ((Boost) * (12))\n            end\n        end\n    end\nend\nchange [yv v] by ((-1.2) * (Boost))\nY_move (Yv)\nif <<<touching (spikes v)?> or <touching (lava v)?>> and <(Game) = [play]>> then\n    set [game v] to [die]\n    stop [this script v]\nend\nposition\nchange [scroll x v] by (round (((x_player) - (Scroll X)) / (4)))\nchange [scroll y v] by (round (((y_player) - (Scroll Y)) / (2)))\nif <(Scroll X) < [-1200]> then\n    set [scroll x v] to [-1200]\nend\nif <(Scroll X) > [2400]> then\n    set [scroll x v] to [2400]\nend\nposition\n\ndefine Y_move (yv)\nchange [y_player v] by (yv)\nchange [time_jump v] by (1)\nposition\nrepeat until <not <<touching (tk v)?> or <touching (moving shape v)?>>>\n    if <(yv) > [0]> then\n        change [y_player v] by (-2)\n    else\n        set [time_jump v] to [0]\n        change [y_player v] by (1)\n    end\n    position\n    set [yv v] to [0]\nend\n\ndefine X_move (xv)\nchange [x_player v] by (xv)\nposition\nif <<touching (tk v)?> or <touching (moving shape v)?>> then\n    repeat (8)\n        change [y_player v] by (1)\n        position\n        if <not <<touching (tk v)?> or <touching (moving shape v)?>>> then\n            stop [this script v]\n        end\n    end\n    change [y_player v] by (-8)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [20]>>> then\n        set [yv v] to ((Boost) * (12))\n        set [xv v] to (((0) - (Xv)) / (1.5))\n    end\n    set [xv v] to [0]\n    repeat until <not <<touching (tk v)?> or <touching (moving shape v)?>>>\n        if <(xv) > [0]> then\n            change [x_player v] by (-1)\n        else\n            change [x_player v] by (1)\n        end\n        position\n    end\nend\n\nwhen flag clicked\nset [checkpoint v] to [0]\nset [game v] to [menu]\nset [ghost v] effect to (100)\n\ndefine reset\ngo to [front v] layer\nif <(Checkpoint) = [0]> then\n    set size to (15) %\n    set [game v] to [menu]\n    set [x_player v] to [120]\n    set [y_player v] to [250]\n    set [scroll x v] to (x_player)\n    set [scroll y v] to (y_player)\n    set [xv v] to [0]\n    set [yv v] to [0]\n    set [time_jump v] to [0]\n    set [boost v] to [1.5]\n    set [zoom v] to [15]\nelse\n    set [game v] to [play]\n    set [x_player v] to [240]\n    set [y_player v] to [-100]\n    set [scroll x v] to (x_player)\n    set [scroll y v] to (y_player)\n    set [xv v] to [0]\n    set [yv v] to [15]\n    set [time_jump v] to [0]\n    set [boost v] to [1.5]\nend\n\ndefine position\ngo to x: (round (((x_player) - (Scroll X)) - (120))) y: (round (((y_player) - (Scroll Y)) + (50)))\n\nwhen I receive [start v]\nset [ghost v] effect to (100)\nset [game v] to [transition]\nset [x_player v] to [120]\nset [y_player v] to [415]\nset [scroll x v] to (x_player)\nset [scroll y v] to (y_player)\nposition\nwait (0.1) seconds\nbroadcast (tick v)\nrepeat until <(round ((ZOOM) / (10))) = [10]>\n    change [zoom v] by (((100) - (ZOOM)) / (8))\nend\nset [game v] to [play]\nset [xv v] to [0]\nset [yv v] to [20]\nrepeat until <(size) = [60]>\n    change size by (((60) - (size)) / (4))\n    change [ghost v] effect by (-5)\nend\nrepeat (10)\n    change [ghost v] effect by (-5)\nend\n\nwhen I receive [checkpoint 1 v]\nchange [checkpoint v] by (1)\nset [x_player v] to [240]\nset [y_player v] to [0]\nset [scroll x v] to (x_player)\nset [scroll y v] to (y_player)\nset [xv v] to [0]\nset [yv v] to [0]\nset [time_jump v] to [0]\n\nwhen I receive [pp start v]\nforever\n    reset\n    broadcast (tick v)\n    wait (0.05) seconds\n    if <(Checkpoint) = [0]> then\n        broadcast (menu v)\n    end\n    position\n    set [ghost v] effect to (0)\n    repeat until <<(Scroll Y) < ((ZOOM) * (-10))> or <<(Game) = [die]> or <(Game) = [win]>>>\n        Tick\n    end\n    if <(Game) = [die]> then\n        set [ghost v] effect to (0)\n        repeat (3)\n            repeat (3)\n                change [ghost v] effect by (-20)\n            end\n            repeat (3)\n                change [ghost v] effect by (20)\n            end\n        end\n        repeat (2)\n            change [ghost v] effect by (20)\n        end\n    end\nend\n\n@TK\n\nwhen I receive [tick v]\nposition (((x) / ((100) / (ZOOM))) - (Scroll X)) (((y) / ((100) / (ZOOM))) - (Scroll Y))\n\ndefine clone (x) (y) (costume)\nset [costume v] to (costume)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nchange [x v] by (1000)\n\ndefine position (x) (y)\nswitch costume to (/ v)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(x) < [2000]> then\n        show\n    end\nelse\n    hide\nend\nif <<(Game) = [menu]> or <(Game) = [message]>> then\n    switch costume to (join (costume) [-menu])\nelse\n    switch costume to (join (costume) (join [-] [play]))\nend\nset size to (ZOOM) %\n\nwhen I receive [pp start v]\ngo to x: (0) y: (0)\nclone [0] [250] [T]\nclone [350] [250] [H]\nclone [700] [250] [A]\nclone [1050] [250] [N]\nclone [1400] [250] [K]\nclone [200] [-250] [Y]\nclone [600] [-250] [O]\nclone [1000] [-250] [U]\nclone [1400] [-250] [!]\n\n@Flag\n\nwhen I receive [tick v]\nposition (((x) / ((100) / (ZOOM))) - (Scroll X)) (((y) / ((100) / (ZOOM))) - (Scroll Y))\nset size to (ZOOM) %\n\ndefine clone (x) (y)\nchange [id v] by (1)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nchange [x v] by (1000)\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(x) < [2000]> then\n        show\n    end\nelse\n    hide\nend\n\nwhen I receive [menu v]\nswitch costume to (1 v)\nset [ghost v] effect to (0)\n\nwhen I receive [start v]\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [pp start v]\nset [id v] to [0]\ngo to x: (0) y: (0)\nswitch costume to (1 v)\nclone [-100] [420]\nclone [1500] [180]\nclone [90] [-80]\nclone [1420] [-85]\n\nwhen I start as a clone\nforever\n    if <(Game) = [play]> then\n        if <<(id) = [2]> and <touching (player v)?>> then\n            point in direction (90)\n            repeat until <(round (direction)) = [60]>\n                turn left (((direction) - (60)) / (2)) degrees\n            end\n            repeat until <(round (direction)) = [90]>\n                turn left (((direction) - (90)) / (2)) degrees\n            end\n            broadcast (checkpoint 1 v)\n            wait until <not <<(id) = [2]> and <touching (player v)?>>>\n        end\n        if <<(id) = [4]> and <touching (player v)?>> then\n            point in direction (90)\n            repeat until <(round (direction)) = [60]>\n                turn left (((direction) - (60)) / (2)) degrees\n            end\n            repeat until <(round (direction)) = [90]>\n                turn left (((direction) - (90)) / (2)) degrees\n            end\n            broadcast (WIN v)\n            wait (3) seconds\n            set [game v] to [win]\n            set [checkpoint v] to [0]\n            wait until <not <<(id) = [4]> and <touching (player v)?>>>\n        end\n    end\nend\n\n@spikes\n\nwhen I receive [tick v]\nposition (((x) / ((100) / (ZOOM))) - (Scroll X)) (((y) / ((100) / (ZOOM))) - (Scroll Y))\n\ndefine clone (x) (y) (direction)\nset [direction v] to (direction)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nchange [x v] by (2000)\nchange [id v] by (1)\n\ndefine position (x) (y)\nswitch costume to (/ v)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(x) < [2000]> then\n        show\n    end\nelse\n    hide\nend\nif <(Game) = [menu]> then\n    hide\nend\nset size to (ZOOM) %\npoint in direction (direction)\nswitch costume to (spike v)\n\nwhen I receive [menu v]\nwait (0.5) seconds\nset [ghost v] effect to (100)\n\nwhen I receive [start v]\nwait (0.3) seconds\nrepeat (5)\n    change [ghost v] effect by (-20)\nend\n\nwhen I receive [pp start v]\nset [id v] to [1]\ngo to x: (0) y: (0)\nclone [200] [330] [-90]\nclone [150] [375] [90]\nclone [520] [330] [10]\nclone [700] [443] [-2]\nclone [860] [152] [70]\nclone [882] [280] [-90]\nclone [1140] [442] [0]\nclone [1220] [341] [0]\nclone [1510] [428] [5]\nclone [1620] [315] [0]\nclone [440] [-145] [-60]\nclone [598] [-60] [0]\nclone [760] [-145] [60]\n\nwhen I start as a clone\nswitch costume to (spike v)\nforever\n    if <(id) = [12]> then\n        repeat (20)\n            change [x v] by (1.2)\n            change [direction v] by (0.4)\n        end\n        repeat (40)\n            change [x v] by (-1.2)\n            change [direction v] by (-0.4)\n        end\n        repeat (20)\n            change [x v] by (1.2)\n            change [direction v] by (0.4)\n        end\n    end\nend\n\n@buttons\n\nwhen I receive [pp start v]\nforever\n    wait until <(Game) = [menu]>\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    wait (0.5) seconds\n    switch costume to (play v)\n    repeat (9)\n        change [ghost v] effect by (-10)\n    end\n    wait until <not <mouse down?>>\n    repeat until <not <(Game) = [menu]>>\n        if <(distance to [mouse-pointer v]) < [60]> then\n            change size by (((120) - (size)) / (4))\n            if <mouse down?> then\n                broadcast (start v)\n                repeat (5)\n                    change [ghost v] effect by (20)\n                end\n            end\n        end\n        change size by (((100) - (size)) / (4))\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (-150)\nset [ghost v] effect to (100)\n\nwhen I receive [pp start v]\nforever\n    wait until <(Game) = [message]>\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    wait (0.4) seconds\n    switch costume to (exit v)\n    repeat (9)\n        change [ghost v] effect by (-10)\n    end\n    wait until <not <mouse down?>>\n    repeat until <not <(Game) = [message]>>\n        if <(distance to [mouse-pointer v]) < [60]> then\n            change size by (((120) - (size)) / (4))\n            if <mouse down?> then\n                broadcast (menu v)\n                repeat (5)\n                    change [ghost v] effect by (20)\n                end\n            end\n        end\n        change size by (((100) - (size)) / (4))\n    end\nend\n\n@Moving shape\n\nwhen I receive [tick v]\nposition (((x) / ((100) / (ZOOM))) - (Scroll X)) (((y) / ((100) / (ZOOM))) - (Scroll Y))\nset size to (ZOOM) %\nswitch costume to (join (costume) (join [-] (Game)))\n\ndefine clone (x) (y) (costume)\nset [costume v] to (costume)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nchange [x v] by (1000)\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <(Game) = [play]> then\n    if <<(x) = (x position)> and <(y) = (y position)>> then\n        if <(x) < [2000]> then\n            show\n        end\n    else\n        hide\n    end\nelse\n    hide\nend\n\nwhen I start as a clone\nforever\n    repeat until <(round (x)) = [1200]>\n        change [x v] by (-2)\n    end\n    repeat until <(round (x)) = [1300]>\n        change [x v] by (2)\n    end\nend\n\nwhen I receive [pp start v]\ngo to x: (0) y: (0)\nclone [1300] [-150] [!]\n\n@lava\n\nwhen I receive [tick v]\nposition (((x) / ((100) / (ZOOM))) - (Scroll X)) (((((([sin v] of (((timer) + (id)) * (50)) ) * (1)) - ((id) * (10))) + (y)) / ((100) / (ZOOM))) - (Scroll Y))\n\ndefine clone (x) (y)\nset [cos v] to [1]\nset [x v] to (x)\nset [y v] to (y)\nrepeat (3)\n    change [id v] by (1)\n    create clone of (_myself_ v)\n    change [cos v] by (1)\nend\nchange [x v] by (1000)\n\ndefine position (x) (y)\nswitch costume to (/ v)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(x) < [2000]> then\n        show\n    end\nelse\n    hide\nend\nif <<(Game) = [menu]> or <(Game) = [message]>> then\n    hide\nend\nset size to (ZOOM) %\nswitch costume to (cos)\n\nwhen I receive [menu v]\nset [ghost v] effect to (20)\n\nwhen I receive [start v]\nwait (0.5) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [pp start v]\ngo to x: (0) y: (0)\nset [ghost v] effect to (20)\nset [id v] to [0]\nclone [328] [290]\nclone [1080] [330]\nclone [1380] [400]\nclone [220] [-60]\nclone [1010] [-140]\n\nwhen I start as a clone\nswitch costume to (cos)\nwait ((id) / (10)) seconds\nforever\n    repeat (15)\n        change [y v] by (1)\n    end\n    repeat (15)\n        change [y v] by (-1)\n    end\nend\n\n@Text\n\nwhen I receive [tick v]\nposition (((x) / ((100) / (ZOOM))) - (Scroll X)) (((y) / ((100) / (ZOOM))) - (Scroll Y))\nswitch costume to (id)\ngo to [front v] layer\n\ndefine clone (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nchange [x v] by (2000)\nchange [id v] by (1)\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(x) < [2000]> then\n        show\n    end\nelse\n    hide\nend\n\nwhen I receive [checkpoint 1 v]\nwait (0.5) seconds\nif <(id) = [1]> then\n    set size to (100) %\n    repeat (8)\n        change size by (1)\n        change [ghost v] effect by (-10)\n        change [y v] by (1)\n    end\n    wait (1) seconds\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\nend\n\nwhen I receive [pp start v]\ngo to x: (0) y: (0)\nset [id v] to [1]\nset size to (100) %\nset [ghost v] effect to (100)\nclone [90] [30]\nclone [1420] [-120]\n\nwhen I receive [win v]\nif <(id) = [2]> then\n    set size to (100) %\n    repeat until <(size) = [120]>\n        change [ghost v] effect by (-10)\n        change size by (((120) - (size)) / (2))\n    end\n    repeat until <(size) = [80]>\n        change size by (((100) - (size)) / (3))\n    end\nend\n\nwhen I receive [menu v]\nwait (0.5) seconds\nset [ghost v] effect to (100)\n\n@message\n\nwhen flag clicked\ngo to x: (200) y: (-140)\nset [ghost v] effect to (100)\nswitch costume to (1 v)\nset size to (28) %\n\nwhen I receive [menu v]\nif <(Game) = [message]> then\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\n    switch costume to (/ v)\n    stop [other scripts in sprite v]\n    set [game v] to [menu]\nelse\n    repeat (9)\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen I receive [start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nforever\n    if <<<mouse down?> and <(distance to [mouse-pointer v]) < [20]>> and <(Game) = [menu]>> then\n        stop [other scripts in sprite v]\n        switch costume to (2 v)\n        broadcast (message v)\n        set [game v] to [message]\n        repeat until <<<(round (x position)) = [0]> and <(round (y position)) = [0]>> and <(round (size)) = [140]>>\n            change x by (((0) - (x position)) / (3))\n            change y by (((0) - (y position)) / (3))\n            change size by (((140) - (size)) / (6))\n        end\n        wait until <(Game) = [message]>\n        wait until <(Game) = [menu]>\n    end\nend\n\nwhen I receive [menu v]\nforever\n    if <(distance to [mouse-pointer v]) > [20]> then\n        repeat until <(size) = [23]>\n            change size by (((23) - (size)) / (6))\n        end\n        repeat until <(size) = [20]>\n            change size by (((20) - (size)) / (6))\n        end\n    end\nend\n\n@detect\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to (mouse-pointer v)\n    if <touching (message v)?> then\n        set [click_mod v] to [message]\n    else\n        if <not <mouse down?>> then\n            if <([costume name v] of [buttons v]) = [click to start]> then\n                set [click_mod v] to [start]\n            else\n                set [click_mod v] to [quit_message]\n            end\n        end\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (0)\nwait (1.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (PP start v)\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\nwhen flag clicked\nset volume to (40) %\nforever\n    play sound [\[Drumstep\] - Tristam  \[Mpgun v] until done\nend\n\n@lava_bubble\n\nwhen I receive [tick v]\nposition (((x) / ((100) / (ZOOM))) - (Scroll X)) (((y) / ((100) / (ZOOM))) - (Scroll Y))\ngo to [back v] layer\n\ndefine clone (x) (y)\nswitch costume to (1 v)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nchange [x v] by (1000)\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(x) < [2000]> then\n        show\n    end\nelse\n    hide\nend\nif <<(Game) = [menu]> or <(Game) = [message]>> then\n    hide\nend\n\nwhen I receive [pp start v]\ngo to x: (0) y: (0)\nset [ghost v] effect to (20)\nset [id v] to [0]\nclone [350] [330]\nclone [1060] [340]\nclone [1390] [380]\nclone [220] [-100]\nclone [1010] [-210]\nchange [id v] by (1)\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nif <(id) = [0]> then\n    forever\n        if <(Game) = [play]> then\n            wait (pick random (0.2) to (2)) seconds\n            repeat (pick random (1) to (4))\n                change [id v] by (1)\n                set size to (pick random (25) to (55)) %\n                create clone of (_myself_ v)\n                wait (pick random (0.05) to (0.2)) seconds\n            end\n        end\n    end\nelse\n    switch costume to (pick random (1) to (3))\n    change [x v] by (pick random (-15) to (15))\n    set [ghost v] effect to (pick random (20) to (40))\n    broadcast (tick v)\n    repeat (30)\n        change size by (1)\n        change [y v] by (3)\n        change [ghost v] effect by (4)\n    end\n    delete this clone\nend\n\n
Hi ! This is just a little game for my 3k followers \n\n    ||| Thank you soo much guys |||\n\n> WASD or arrow keys to move\n\n> Don't touch red (lava or spikes)\n\n> Try to reach the next flag\n\n         Good Luck !