GPT007/Scratch-platformers-10k huggingface dataset:
[Old project] Rainbow- A mobile friendly platformer

Instructions: This is mobile friendly\n\nCONTROLS:\n\n➡Left arrow key to go left\n➡Right arrow key to go right\n➡Up arrow key to jump.

@Stage\n\nwhen flag clicked\n\n    play sound [Garden v] until done\nend\n\n@Sprite1\n\nwhen flag clicked\nswitch costume to (rainbow1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Sprite2\n\ndefine Tick\nif <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > [10]>>> then\n    change [xv v] by (1)\n    switch costume to (costume1 v)\nend\nif <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < [-10]>>> then\n    change [xv v] by (-1)\n    switch costume to (costume2 v)\nend\nchange x by (Xv)\nset [xv v] to ((Xv) * (0.9))\nif <touching color (#ff0000)?> then\n    change y by (1)\n    if <touching color (#ff0000)?> then\n        change y by (1)\n        if <touching color (#ff0000)?> then\n            change y by (1)\n            if <touching color (#ff0000)?> then\n                change y by (1)\n                if <touching color (#ff0000)?> then\n                    change y by (1)\n                    if <touching color (#ff0000)?> then\n                        change x by ((Xv) * (-1))\n                        change y by (-5)\n                        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                            if <(Xv) > [0]> then\n                                set [xv v] to [-10]\n                            else\n                                set [xv v] to [10]\n                            end\n                            set [yv v] to [15]\n                        else\n                            set [xv v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange [yv v] by (-1)\nchange y by (Yv)\nif <touching color (#ff0000)?> then\n    change y by ((Yv) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <touching color (#ff0000)?> then\n        set [yv v] to [13]\n    end\nend\nif <touching color (#ffd342)?> then\n    set [yv v] to [18]\nend\nif <touching color (#c5c5c5)?> then\n    go to x: (-163) y: (-80)\nend\nchange y by (1)\n\nwhen I receive [tick v]\nTick\n\nwhen flag clicked\ngo to x: (-163) y: (-80)\ngo to [front v] layer\nswitch costume to (costume1 v)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    broadcast (Tick v)\nend\n\nwhen flag clicked\nforever\n    if <touching color (#00f7ff)?> then\n        broadcast (next level v)\n        go to x: (-163) y: (-80)\n        go to [front v] layer\n        switch costume to (costume1 v)\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nhide\n\n
Platformer Engine/Tutorial

Instructions: This is a platformer Engine and a tutorial use the arrow keys to move around and it is also available for mobile\n\nTo see the Tutorial click the see inside button on the top/middle left corner\n\n\n  

@Stage\n\n@player\n\nwhen flag clicked\nshow\nhide variable [y v]\nhide variable [x v]\nswitch costume to (front v)\nset size to (100) %\ngo to x: (-195) y: (-61)\n\nwhen flag clicked\nforever\n    if <touching (spikes v)?> then\n        go to x: (-195) y: (-61)\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (front v)\n    if <<mouse down?> and <(mouse x) > (x position)>> then\n        switch costume to (right  v)\n        change [x v] by (0.8)\n    end\n    if <<mouse down?> and <(mouse x) < (x position)>> then\n        switch costume to (left  v)\n        change [x v] by (-0.8)\n    end\n    if <key (right arrow v) pressed?> then\n        switch costume to (right  v)\n        change [x v] by (0.8)\n    end\n    if <key (left arrow v) pressed?> then\n        switch costume to (left  v)\n        change [x v] by (-0.8)\n    end\n    set [x v] to ((X) * (0.9))\n    change x by (X)\n    if <touching (platform  v)?> then\n        change y by (1)\n        if <touching (platform  v)?> then\n            change y by (1)\n            if <touching (platform  v)?> then\n                change y by (1)\n                if <touching (platform  v)?> then\n                    change y by (1)\n                    if <touching (platform  v)?> then\n                        change y by (1)\n                        if <touching (platform  v)?> then\n                            change y by (-5)\n                            change x by ((X) * (-1))\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                if <(X) > [0]> then\n                                    set [x v] to [-4]\n                                else\n                                    set [x v] to [4]\n                                end\n                                set [y v] to [8.7]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (Y)\n    if <touching (platform  v)?> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (platform  v)?> then\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            change [y v] by (11)\n        end\n    end\n    change y by (1)\nend\n\nchange y by (1)\n\n@Platform \n\nwhen flag clicked\nhide variable [level v]\nshow\nset [level v] to [1]\nforever\n    go to x: (50) y: (-132)\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    switch costume to (level 3 v)\nend\n\nwhen flag clicked\nshow\n\n@spikes\n\nwhen flag clicked\nshow\ngo to x: (44) y: (-61)\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\n
Platformer Engine

Instructions: Hello, @vivmsquash here, with a platformer engine! This platformer engine includes:\n• Wall detection\n• Ceiling detection\n• Wall jumping\n• Water detection\n• Trampoline detection\n• Lava/spike detection\n• Velocity movement\n100% by me! Feel free to remix without credit or use code with credit!

@Stage\n\n@level\n\n@player\n\nwhen flag clicked\nset [wall jumping v] to [1]\nreset\n\ndefine Touch ground <something above>\nchange [in air? v] by (1)\nif <touching color (#323232)?> then\n    repeat until <not <touching color (#323232)?>>\n        if <something above> then\n            change y by (-1)\n        else\n            change y by (1)\n            set [in air? v] to [0]\n        end\n        set [yv v] to [0]\n    end\nelse\n    if <(yv) < [0]> then\n        repeat until <not <touching color (#ffff00)?>>\n            change y by (1)\n            set [yv v] to [22]\n            set [in air? v] to [0]\n        end\n    end\nend\n\ndefine reset\ngo to x: (0) y: (0)\nset [yv v] to [0]\nset [xv v] to [0]\nforever\n    change [xv v] by (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>)\n    set [xv v] to ((xv) * (0.88))\n    change x by (xv)\n    if <touching color (#323232)?> then\n        change x by ((0) - (xv))\n        if <(Wall jumping) = [1]> then\n            if <key (up arrow v) pressed?> then\n                if <(xv) > [0]> then\n                    set [xv v] to [-12]\n                else\n                    set [xv v] to [12]\n                end\n                set [yv v] to [12]\n            else\n                set [xv v] to [0]\n            end\n        end\n    end\n    if <touching color (#57a1ff)?> then\n        if <key (up arrow v) pressed?> then\n            change [yv v] by (0.5)\n        else\n            change [yv v] by (-.05)\n        end\n    else\n        change [yv v] by (-1)\n    end\n    if <key (up arrow v) pressed?> then\n        if <touching color (#57a1ff)?> then\n        else\n            if <(in air?) < [4]> then\n                set [yv v] to [12]\n            end\n        end\n    end\n    change y by (yv)\n    if <touching color (#ff4b4b)?> then\n        go to [back v] layer\n        reset\n    else\n        go to [front v] layer\n    end\n    Touch ground <(yv) > [0]>\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\n\n
Pi  || Platformer                                                              #games #platformer

Instructions: Hi Scratchers! This is my 2nd platformer, and I worked really hard on it, so please don't troll! I would really love a heart, star, nice comments, and constructive feedback! If we reach 100 loves I will make a sequel! If we reach 50 loves I will add 3 new levels! Instructions are in game.\n\nYAY 30 LOVES! Thanks to @avis2014 for being the 30th lover!\n\n20 FAVES! Thanks to @--PlatformerLover-- !!!

@Stage\n\n@Circle\n\ndefine Move\nif <key (left arrow v) pressed?> then\n    change x by (-8)\n    switch costume to (walk left v)\nend\nif <key (right arrow v) pressed?> then\n    change x by (8)\n    switch costume to (walk right v)\nend\n\ndefine jump/gravity\nif <touching color (#959595)?> then\n    set [y speed v] to [0]\n    if <key (up arrow v) pressed?> then\n        change [y speed v] by (10)\n    end\nelse\n    change [y speed v] by (-.5)\nend\nchange y by (y speed)\n\nwhen flag clicked\nshow\nbroadcast (message1 v)\nStart Talk\nswitch backdrop to (level 1 v)\nbroadcast (Level One v)\nshow\nReset\nrepeat until <touching color (#9c0091)?>\n    Move\n    jump/gravity\n    Touching?\nend\n\ndefine Start Talk\nswitch costume to (talking v)\ngo to x: (55) y: (-17)\nset size to (100) %\nswitch backdrop to (city v)\nrepeat (50)\n    change size by (1)\nend\nsay [Hey! I'm Circle!] for (2) seconds\nsay [I'm a perfect circle from that city named Circlus behind me!] for (4) seconds\nsay [I'm also an archeologist!] for (2) seconds\nsay [I'm trying to find an artifact called the Ancient Book of Pi.] for (4) seconds\nsay [Here's what it looks like!] for (2) seconds\nhide\nswitch backdrop to (book of pi v)\nwait (5) seconds\nswitch backdrop to (city v)\nshow\nsay [This book is very important to the circles of Circlus.] for (2) seconds\nsay [We have no idea what the true value of pi is.] for (2) seconds\nsay [All we know is that pi is the ratio of the circumference of any circle to the diameter of that circle. ] for (5) seconds\nsay [We also know that the book is in the ancient stronghold.] for (3) seconds\nsay [It was lost in ancient times during a war.] for (2) seconds\nsay [So let's go find it!] for (2) seconds\nswitch backdrop to (intermission v)\nhide\nwait (5) seconds\n\ndefine Reset\nset size to (50) %\ngo to x: (-192) y: (-166)\n\ndefine Touching?\nif <touching color (#cdcdcd)?> then\n    Reset\nend\nif <(x position) > [240]> then\n    Reset\n    next backdrop\nend\nif <touching color (#616161)?> then\n    change [y speed v] by (-5)\nend\nif <touching color (#9c0091)?> then\n    switch backdrop to (book of pie >:\) v)\n    hide\n    wait (2) seconds\n    switch backdrop to (book of pie >:\)2 v)\n    wait (2) seconds\n    switch backdrop to (book of pie >:\)3 v)\n    wait (5) seconds\n    switch backdrop to (end v)\n    stop [all v]\nend\n\n
~Orchard~ | 360 Platformer

Instructions: ~Orchard~\n\n~Instructions~\n- Arrow Keys to move\n- Avoid the grey rock\n- Get to the yellow flag\n\n~Notes~\n- All art 100% made in scratch by @-Invert-\n- Sorry it is short, though I might make a sequel if this gets popular...\n- I am taking a mini hiatus for 2-4 days, so will be a bit slow replying to comments :D\n\n~Credits~\n- @pranavhaha - Engine\n- @-Invert- - Art+Some code

@Stage\n\nwhen flag clicked\nforever\n    play sound [Vexento - Tevo \(Original Mix\) v] until done\nend\n\n@Platform\n\nwhen flag clicked\nbroadcast (respawn v)\nSize: [300]\nforever\n    change [y vel v] by (1)\n    if <key (right arrow v) pressed?> then\n        change [d vel v] by (-0.3)\n    end\n    if <key (left arrow v) pressed?> then\n        change [d vel v] by (0.3)\n    end\n    set [d vel v] to ((d vel) * (0.8))\n    turn right (d vel) degrees\n    if <touching (player v)?> then\n        change y by (-1)\n        if <touching (player v)?> then\n            change y by (-1)\n            if <touching (player v)?> then\n                change y by (-1)\n                if <touching (player v)?> then\n                    change y by (-1)\n                    if <touching (player v)?> then\n                        change y by (4)\n                        turn right ((d vel) * (-1)) degrees\n                        set [d vel v] to [0]\n                    end\n                end\n            end\n        end\n    end\n    change y by (y vel)\n    if <touching (player v)?> then\n        change y by ((y vel) * (-1))\n        set [y vel v] to [0]\n    end\n    change y by (1)\n    if <touching (player v)?> then\n        if <key (up arrow v) pressed?> then\n            set [y vel v] to [-12]\n        end\n    end\n    change y by (-1)\nend\n\nwhen I receive [respawn v]\npoint in direction (90)\ngo to x: (-10) y: (-500)\nset [d vel v] to [0]\nset [y vel v] to [0]\n\ndefine Size: (#)\nswitch costume to (costume2 v)\nset size to (#) %\nswitch costume to (costume1 v)\n\n@player\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen I receive [respawn v]\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nforever\n    change y by (-5)\n    if <touching color (#7c7c7c)?> then\n        broadcast (respawn v)\n    end\n    if <<touching color (#c9c9c9)?> or <touching color (#fff537)?>> then\n        broadcast (win v)\n    end\n    change y by (5)\nend\n\n@Art\n\nwhen flag clicked\nbroadcast (respawn v)\nswitch costume to (costume2 v)\nset size to (300) %\nswitch costume to (costume1 v)\nforever\n    turn right (d vel) degrees\n    go to (platform v)\nend\n\nwhen I receive [respawn v]\npoint in direction (90)\ngo to x: (-10) y: (-500)\nset [d vel v] to [0]\nset [y vel v] to [0]\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nshow\n\n@Sprite2\n\nwhen flag clicked\nhide\n\n
Seasons- A 360 Platformer V2.4

Instructions: use arrow keys to move\nwhen you start it will pick 1 of 6 levels to play\nSoon I make more levels\nTry doing turbo mode shift + green flag\nNEW rainbow level?

@Stage\n\n@player\n\nwhen flag clicked\ngo to x: (0) y: (-1)\nhide\n\nwhen I receive [respawn v]\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nforever\n    change y by (-5)\n    if <touching color (#ff0000)?> then\n        broadcast (respawn v)\n    end\n    if <touching color (#0e00ff)?> then\n        set [y vel v] to [-20]\n    end\n    if <touching color (#b0b0b0)?> then\n        broadcast (respawn v)\n    end\n    if <touching color (#5d5d5d)?> then\n        broadcast (respawn v)\n    end\n    change y by (5)\nend\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [hey v]\nbroadcast (Green flag v)\n\nwhen I receive [green flag v]\nforever\n    play sound [Dance_Monkey v] until done\nend\n\n@Platform\n\ndefine SET HACK SIZE TO (number or text)\nswitch costume to (size hack v)\nset size to (number or text) %\n\nwhen I receive [respawn v]\npoint in direction (90)\ngo to x: (-10) y: (-500)\nset [d vel v] to [0]\nset [y vel v] to [0]\n\nwhen I receive [green flag v]\nshow\nbroadcast (respawn v)\nSET HACK SIZE TO [200]\nforever\n    change [y vel v] by (1)\n    if <key (right arrow v) pressed?> then\n        change [d vel v] by (-0.2)\n    end\n    if <key (left arrow v) pressed?> then\n        change [d vel v] by (0.2)\n    end\n    set [d vel v] to ((d vel) * (0.8))\n    turn right (d vel) degrees\n    if <touching (player v)?> then\n        change y by (-1)\n        if <touching (player v)?> then\n            change y by (-1)\n            if <touching (player v)?> then\n                change y by (-1)\n                if <touching (player v)?> then\n                    change y by (-1)\n                    if <touching (player v)?> then\n                        change y by (4)\n                        turn right ((d vel) * (-1)) degrees\n                        set [d vel v] to [0]\n                    end\n                end\n            end\n        end\n    end\n    change y by (y vel)\n    if <touching (player v)?> then\n        change y by ((y vel) * (-1))\n        set [y vel v] to [0]\n    end\n    change y by (1)\n    if <touching (player v)?> then\n        if <key (up arrow v) pressed?> then\n            set [y vel v] to [-12]\n        end\n    end\n    change y by (-1)\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\n\nwhen I receive [hey v]\nswitch costume to (pick random (1) to (7))\nbroadcast (Green flag v)\n\n@Sprite1\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (100)\nend\nbroadcast (hey v)\n\n
Platformer Games Challenge (sort of)


@Stage\n\n@player\n\ndefine engine\nchange x (((2) * <(xspeed) > [0]>) - (1))\nchange y (((2) * <(yspeed) > [0]>) - (1))\nchange [yspeed v] by (-1.5)\nset [xspeed v] to ((0.8) * ((xspeed) + ((2) * (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>))))\n\ndefine change x (positive)\nrepeat ([abs v] of (xspeed) )\n    change x by (positive)\n    if <touching (level v)?> then\n        change y by (2)\n        if <touching (level v)?> then\n            change y by (-2)\n            change x by (() - (positive))\n            set [xspeed v] to [0]\n        end\n    end\nend\n\ndefine change y (positive)\nrepeat ([abs v] of (yspeed) )\n    change y by (positive)\n    if <touching (level v)?> then\n        change y by (() - (positive))\n        set [yspeed v] to (((18) * <[0] > (positive)>) * <key (up arrow v) pressed?>)\n    end\nend\n\nwhen flag clicked\nset [xspeed v] to [0]\nset [yspeed v] to [0]\ngo to x: (-120) y: (-100)\nforever\n    engine\nend\n\n@level\n\n@slides\n\nwhen flag clicked\ngo to x: (-203) y: (44)\nswitch costume to (1 v)\nrepeat until <touching (player v)?>\n    turn right (2) degrees\n    set y to (((5) * ([sin v] of ((180) * (timer)) )) + (44))\nend\nbroadcast (flash v)\npoint in direction (90)\ngo to x: (0) y: (0)\nswitch costume to (2 v)\nforever\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > [50]>>> then\n        if <[11] > (costume [number v])> then\n            broadcast (flash v)\n            next costume\n            wait until <not <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > [50]>>>>\n        end\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <[-50] > (mouse x)>>> then\n        if <(costume [number v]) > [2]> then\n            broadcast (flash v)\n            switch costume to ((costume [number v]) - (1))\n            wait until <not <<key (left arrow v) pressed?> or <<mouse down?> and <[-50] > (mouse x)>>>>\n        end\n    end\nend\n\n@flash\n\nwhen I receive [flash v]\nshow\nclear graphic effects\nrepeat (9)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nhide\n\n
a random platformer

Instructions: try turbo mode (shift+green flag)\nuse the arrow keys\n

@Stage\n\n@Spikes\n\nwhen flag clicked\nswitch costume to (costume9 v)\n\nwhen I receive [new level v]\nnext costume\n\n@Ground\n\nwhen flag clicked\nswitch costume to (level 1 v)\n\nwhen I receive [new level v]\nnext costume\n\nwhen flag clicked\nforever\n    go to x: (19) y: (-35)\n    if <(costume [number v]) = [11]> then\nend\n\n@Player 1\n\nwhen flag clicked\nbroadcast (Restart v)\nshow\nset [x v] to [0]\nset [y v] to [0]\nforever\n    change [y v] by (-1)\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-1)\n        point in direction (-90)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\n        point in direction (90)\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 (-4)\n        change x by ((x) * (-1))\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [y v] to [15]\n            if <([abs v] of (x) ) = (x)> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\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 ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (ground v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\nend\n\nwhen I receive [restart v]\ngo to x: (-225) y: (-45)\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <(x position) > [235]> then\n        broadcast (New Level v)\n        broadcast (Restart v)\n        change [level v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (spikes v)?> or <(y position) < [-170]>> then\n        broadcast (Restart v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (jump v)?> then\n        set [y v] to [15]\n    end\nend\n\nwhen flag clicked\ngo to x: (225-) y: (110-)\nforever\n    set drag mode [not draggable v]\nend\n\n@Sprite1\n\nwhen I start as a clone\nshow\nrepeat (100)\n    change y by (2)\n    turn left ((x position) / (100)) degrees\n    change [ghost v] effect by (1)\nend\ndelete this clone\n\nwhen flag clicked\nhide\ngo to [back v] layer\nset size to (75) %\nforever\n    go to x: ((145) * ([sin v] of ((70) * (timer)) )) y: (-90)\n    point in direction ((30) * ([cos v] of ((75) * (timer)) ))\n    change [color v] effect by (3)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\ngo to [back v] layer\n\n