GPT007/Scratch-platformers-10k huggingface dataset:
Colorless Platformer

Instructions: Left and Right arrows to move, dodge, the lightning, and get color back!

@Stage\n\n@why\n\nwhen I start as a clone\nwait (0.1) seconds\nrepeat (4)\n    change [ghost v] effect by (25)\n    wait (0.01) seconds\nend\ndelete this clone\n\nwhen I receive [respawn v]\nset [ghost v] effect to (0)\nset rotation style [left-right v]\ngo to x: (-175) y: (50)\nrepeat (10)\n    create clone of (_myself_ v)\n    change y by (-5)\n    wait (0.01) seconds\nend\n\nwhen [right arrow v] key pressed\npoint in direction (90)\nrepeat until <not <key (right arrow v) pressed?>>\n    next costume\n    create clone of (_myself_ v)\n    glide (0.02) secs to x: ((x position) + (10)) y: (0)\nend\n\nwhen flag clicked\nshow\nclear graphic effects\ngo to [front v] layer\npoint in direction (90)\ngo to x: (-175) y: (0)\nswitch costume to (costume1 v)\ngo [backward v] (1) layers\n\nwhen [left arrow v] key pressed\npoint in direction (-90)\nrepeat until <not <key (left arrow v) pressed?>>\n    next costume\n    create clone of (_myself_ v)\n    glide (0.02) secs to x: ((x position) + (-10)) y: (0)\nend\n\nwhen I receive [rick rolled v]\nhide\nwait (0.1) seconds\nstop [other scripts in sprite v]\n\nwhen flag clicked\nforever\n    if <touching (here v)?> then\n        broadcast (Respawn v) and wait\n    end\nend\n\n@are\n\nwhen I receive [rick rolled v]\nhide\n\nwhen flag clicked\nshow\ngo to [back v] layer\ngo to x: (-1) y: (-32)\n\n@you\n\nwhen flag clicked\nshow\nset size to (50) %\ngo to [back v] layer\ngo [forward v] (1) layers\nforever\n    wait (0.01) seconds\n    repeat (2)\n        turn right (15) degrees\n    end\nend\n\nwhen I receive [rick rolled v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nforever\n    repeat (10)\n        change size by (1)\n    end\n    repeat (10)\n        change size by (-1)\n    end\nend\n\nwhen flag clicked\nwait until <touching (why v)?>\nbroadcast (Rick Rolled v) and wait\n\n@here\n\nwhen flag clicked\nhide\ngo to x: (0) y: (50)\nforever\n    wait (pick random (0.5) to (2)) seconds\n    go to x: (pick random (-175) to (50)) y: (50)\n    show\n    play sound [Thunder v] until done\n    hide\nend\n\nwhen I receive [rick rolled v]\nstop [other scripts in sprite v]\nstop all sounds\nhide\n\n@?\n\nwhen flag clicked\nhide\nset size to (163) %\nswitch costume to (4kl v)\n\nwhen I receive [rick rolled v]\nforever\n    show\n    next costume\n    wait (0.07) seconds\nend\n\nwhen I receive [rick rolled v]\nforever\n    play sound [Rick Astley - Never Gonna Give You Up \(Video\) v] until done\nend\n\n
Sunset - A Platformer


@Stage\n\n@Thumbnail\n\nwhen flag clicked\nstart sound [Best Day of my Life v]\nhide\n\ngo to [front v] layer\nshow\n\n@Orange\n\ndefine Movement\nchange [y velocity v] by (-1)\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x velocity v] by (-1)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x velocity v] by (1)\nend\nset [x velocity v] to ((X Velocity) * (0.9))\nchange x by (X Velocity)\nif <touching (red v)?> then\n    change y by (1)\nend\nif <touching (red v)?> then\n    change y by (1)\nend\nif <touching (red v)?> then\n    change y by (1)\nend\nif <touching (red v)?> then\n    change y by (1)\nend\nif <touching (red v)?> then\n    change y by (-4)\n    change x by ((X Velocity) * (-1))\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [y velocity v] to [13]\n        if <(X Velocity) > [0]> then\n            set [x velocity v] to [-10]\n        else\n            set [x velocity v] to [10]\n        end\n    else\n        set [x velocity v] to [0]\n    end\nend\nchange y by (Y Velocity)\nif <touching (red v)?> then\n    change y by ((Y Velocity) * (-1))\n    set [y velocity v] to [0]\nend\nchange y by (-1)\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (red v)?>> then\n    set [y velocity v] to [15]\nend\nchange y by (1)\n\nwhen flag clicked\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nReset\nforever\n    Movement\n    if <(x position) > [241]> then\n        broadcast (NEXT LEVEL v)\n        Reset\n    end\nend\n\ndefine Reset\ngo to x: (-180) y: (0)\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (10)\n    change [ghost v] effect by (19)\nend\ndelete this clone\n\nwhen flag clicked\nshow\nforever\n    if <touching (yellow v)?> then\n        Reset\n        repeat (10)\n            set [ghost v] effect to (10)\n        end\n    end\nend\n\nhide\n\n@Red\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\nhide\n\n@Yellow\n\nwhen flag clicked\nshow\ngo to [front v] layer\nswitch costume to (1 v)\n\nwhen I receive [next level v]\nnext costume\n\nhide\n\n
Platformer (tutorial)

Instructions: Press space for next step--- Please read the rest\n\n#8 ON TRENDING THANK YOU GUYS \n200 LIKES AND 200 FAVS THANKS GUYS :D\nthanks for 5K views \nfollow for more EZ to follow tutorials\n\nguys my cat is flying, what do i do?

@Stage\n\nwhen [space v] key pressed\nnext backdrop\n\nwhen flag clicked\nswitch backdrop to (main menu v)\n\nwhen flag clicked\nforever\n    play sound [Dog Song2 v] until done\nend\n\n
Colorless - A Platformer 

Instructions:                                 WELCOME TO:\n           \n          C O L O R L E S S    A    P L A T F O R M E R 

@Stage\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nshow\nwait (3) seconds\nrepeat (4)\n    change [ghost v] effect by (25)\nend\n\n@Black\n\ndefine Movement\nchange [y velocity v] by (-1)\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x velocity v] by (-1)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x velocity v] by (1)\nend\nset [x velocity v] to ((X Velocity) * (0.9))\nchange x by (X Velocity)\nif <touching (dark grey v)?> then\n    change y by (1)\nend\nif <touching (dark grey v)?> then\n    change y by (1)\nend\nif <touching (dark grey v)?> then\n    change y by (1)\nend\nif <touching (dark grey v)?> then\n    change y by (1)\nend\nif <touching (dark grey v)?> then\n    change y by (-4)\n    change x by ((X Velocity) * (-1))\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [y velocity v] to [13]\n        if <(X Velocity) > [0]> then\n            set [x velocity v] to [-10]\n        else\n            set [x velocity v] to [10]\n        end\n    else\n        set [x velocity v] to [0]\n    end\nend\nchange y by (Y Velocity)\nif <touching (dark grey v)?> then\n    change y by ((Y Velocity) * (-1))\n    set [y velocity v] to [0]\nend\nchange y by (-1)\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (dark grey v)?>> then\n    set [y velocity v] to [15]\nend\nchange y by (1)\n\nwhen flag clicked\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nReset\nforever\n    Movement\n    if <(x position) > [241]> then\n        broadcast (NEXT LEVEL v)\n        Reset\n    end\nend\n\ndefine Reset\ngo to x: (-180) y: (0)\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (10)\n    change [ghost v] effect by (19)\nend\ndelete this clone\n\nwhen flag clicked\nshow\nforever\n    if <touching (less dark gray v)?> then\n        Reset\n        repeat (10)\n            set [ghost v] effect to (10)\n        end\n    end\nend\n\nhide\n\n@Dark Grey\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\nhide\n\n@Less Dark Gray\n\nwhen flag clicked\nshow\ngo to [front v] layer\nswitch costume to (1 v)\n\nwhen I receive [next level v]\nnext costume\n\nhide\n\n
platformer cat

Instructions: why the heck does this have so many veiws?!

@Stage\n\n@Platformer\n\nwhen flag clicked\nbroadcast (Green Flag v)\n\nwhen I receive [green flag v]\nset [speed y v] to [0]\nset [speed x v] to [0]\ngo to x: (-215) y: (-72)\nset rotation style [left-right v]\nforever\n    Run game\nend\n\ndefine Run game\nchange [speed y v] by (-1)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [speed x v] by (3.4)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [speed x v] by (-3.4)\nend\nset [speed x v] to ((Speed x) * (0.7))\nchange x by (Speed x)\nif <touching (plat v)?> then\n    change y by (1)\n    if <touching (plat v)?> then\n        change y by (1)\n        if <touching (plat v)?> then\n            change y by (1)\n            if <touching (plat v)?> then\n                change y by (1)\n                if <touching (plat v)?> then\n                    change y by (1)\n                    if <touching (plat v)?> then\n                        change y by (1)\n                        if <touching (plat v)?> then\n                            change y by (1)\n                            if <touching (plat v)?> then\n                                change y by (1)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <touching (plat v)?> then\n    change y by (10)\n    repeat until <not <touching (plat v)?>>\n        change x by ((Speed x) * (-1))\n    end\n    if <<<key (space v) pressed?> or <key (space v) pressed?>> and <touching (plat v)?>> then\n        set [speed y v] to [10]\n        if <(Speed x) < [0]> then\n            set [speed x v] to [16]\n        else\n            set [speed x v] to [0]\n        end\n    else\n        set [speed x v] to [0]\n    end\nend\nchange y by (Speed Y)\nif <touching (plat v)?> then\n    repeat until <not <touching (plat v)?>>\n        change y by ((Speed Y) * (-1))\n    end\n    set [speed y v] to [0]\nend\nchange y by (-1)\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (plat v)?>> then\n    change [speed y v] by (15)\nend\nchange y by (1)\nif <(x position) > [238]> then\n    change [level v] by (1)\n    Reset\nend\nif <touching (dieeeeeeee v)?> then\n    Reset\nend\n\nwhen I receive [green flag v]\nReset\nforever\n    Run game\nend\n\ndefine Reset\nset [speed y v] to [0]\nset [speed x v] to [0]\ngo to x: (-215) y: (-72)\nset rotation style [left-right v]\n\n@Plat\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\n@Unity\n\nwhen flag clicked\nhide\ngo to x: (-126) y: (-74)\nstop all sounds\nforever\n    play sound [TheFatRat - Unity v] until done\nend\n\n@DIEEEEEEEE\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\n
Night- a mobile friendly platformer

Instructions: Welcome to my new platformer! Use arrows keys to move, or tap the screen. 100% possible. I am very happy on this platformer, because I did it entirely by myself. I also did it for SDS ( scratch design studio ). I hope you enjoy!                                            \n                                                                      @QualityQ

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\n@Blank\n\nwhen flag clicked\nforever\n    play sound [Fade v] until done\nend\n\n@Player\n\nwhen flag clicked\ngo to x: (-200) y: (-45)\nset size to (100) %\nset [level v] to [1]\nset [xv v] to [0]\nset [yv v] to [0]\nhide variable [level v]\nhide variable [xv v]\nhide variable [yv v]\nforever\n    change [yv v] by (-1)\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [xv v] by (0.9)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [xv v] by (-0.9)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching (platforms v)?> then\n        change y by (1)\n    end\n    if <touching (platforms v)?> then\n        change y by (1)\n    end\n    if <touching (platforms v)?> then\n        change y by (1)\n    end\n    if <touching (platforms v)?> then\n        change y by (1)\n    end\n    if <touching (platforms v)?> then\n        change y by (-4)\n        change x by ((Xv) * (-1))\n        if <<key (up arrow v) pressed?> or <mouse down?>> then\n            set [yv v] to [16]\n            if <(Xv) > [0]> then\n                set [xv v] to [-10]\n            else\n                set [xv v] to [10]\n            end\n        end\n    end\n    change y by (Yv)\n    if <touching (platforms v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<<key (up arrow v) pressed?> or <mouse down?>> and <touching (platforms v)?>> then\n        change [yv v] by (16)\n    end\n    change y by (1)\n    if <(x position) > [240]> then\n        change [level v] by (1)\n        go to x: (-200) y: (-45)\n    end\n    if <<touching (ennemi v)?> or <(y position) < [-175]>> then\n        go to x: (-200) y: (-45)\n    end\nend\n\n@Platforms\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@Light\n\nwhen flag clicked\nset size to (100) %\nforever\n    go to [back v] layer\n    go to (player v)\nend\n\n@Ennemi\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@Grass\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@Sprite1\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go to [back v] layer\n    show\nend\n\n
KotLC Platformer

Instructions: arrow keys \npart 2 at 23 likes and 17 stars\nPart 2 is out ! : https://scratch.mit.edu/projects/600986024/

@Stage\n\n@sophie\n\ndefine Set up\ngo to x: (-200) y: (0)\nset [level v] to [1]\nset [xv v] to [0]\nset [yv v] to [0]\nshow\n\ndefine Reset\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-200) y: (0)\n\ndefine Left and right Movement\nchange [xv v] by (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>)\nset [xv v] to ((Xv) * (0.9))\nchange x by (Xv)\n\ndefine Wal and Slope Detection\nrepeat (5)\n    change y by <touching (platform v)?>\nend\nif <touching (platform v)?> then\n    change x by ((Xv) * (-1))\n    change y by (-5)\n    if <key (up arrow v) pressed?> then\n        if <(Xv) > [0]> then\n            set [xv v] to [-5]\n        else\n            set [xv v] to [5]\n        end\n        set [yv v] to [12]\n    else\n        set [xv v] to [0]\n    end\nend\n\ndefine Ground and Ceiling Detection\nif <touching (platform v)?> then\n    change y by ((Yv) * (-1))\n    set [yv v] to [0]\nend\n\ndefine Up and Down Movement (jump height)\nGround and Ceiling Detection\nchange y by (-1)\nif <<touching (platform v)?> and <key (up arrow v) pressed?>> then\n    set [yv v] to ((jump height) + (1))\nend\nchange y by (1)\n\ndefine Main Game Loop\nLeft and right Movement\nWal and Slope Detection\nchange [yv v] by (-1)\nchange y by (Yv)\nUp and Down Movement [13]\nif <(x position) > [235]> then\n    Reset\n    change [level v] by (1)\n    broadcast (message1 v)\nend\nif <key (r v) pressed?> then\n    Reset\nend\nif <<(y position) < [-178]> or <touching (danger v)?>> then\n    Reset\nend\nif <touching (trampoline v)?> then\n    set [yv v] to [20]\nend\n\nwhen flag clicked\nSet up\nforever\n    Main Game Loop\nend\n\nwhen flag clicked\nshow\nforever\n    if <key (down arrow v) pressed?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (left arrow v) pressed?> then\n        switch costume to (costume2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (right arrow v) pressed?> then\n        switch costume to (costume1 v)\n    end\nend\n\nhide\n\n@danger\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    switch costume to (level)\nend\n\n@Platform\n\nwhen flag clicked\nshow\ngo to [front v] layer\nforever\n    switch costume to (level)\nend\n\nhide\n\n@trampoline\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    go to x: (0) y: (0)\n    switch costume to (level)\nend\n\n@Sprite2\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\n    go to x: (0) y: (0)\nend\n\n
Platformer World

Instructions: シンプルなplatformerです。\n\n操作・・矢印キーorクリック

@Stage\n\nwhen flag clicked\nswitch backdrop to (背景1 v)\nforever\n    play sound [ᴍᴜsɪᴄs v] until done\nend\n\nwhen I receive [メッセージ1 v]\nnext backdrop\n\n@you\n\ngo to x: (-200) y: (-93)\n\nwhen flag clicked\nshow\nset [x v] to [0]\nset [y v] to [0]\ngo to [front v] layer\nset size to (90) %\nset rotation style [left-right v]\npoint in direction (90)\ngo to x: (-200) y: (999)\nforever\n    if <<<(mouse x) > (x position)> and <mouse down?>> or <key (right arrow v) pressed?>> then\n        change [x v] by (1)\n    end\n    if <<<(x position) > (mouse x)> and <mouse down?>> or <key (left arrow v) pressed?>> then\n        change [x v] by (-1)\n    end\n    set [x v] to ((x) * (.89))\n    change x by (x)\n    if <touching (スプライト2 v)?> then\n        change y by (1)\n        if <touching (スプライト2 v)?> then\n            change y by (1)\n            if <touching (スプライト2 v)?> then\n                change y by (1)\n                if <touching (スプライト2 v)?> then\n                    change y by (1)\n                    if <touching (スプライト2 v)?> then\n                        change y by (1)\n                        if <touching (スプライト2 v)?> then\n                            change x by ((x) * (-1))\n                            change y by (-5)\n                            if <<<(mouse y) > (y position)> and <mouse down?>> or <key (up arrow v) pressed?>> then\n                                if <(x) > [0]> then\n                                    set [x v] to [-7]\n                                else\n                                    set [x v] to [7]\n                                end\n                                set [y v] to [12]\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 by (-1)\n    if <touching (スプライト2 v)?> then\n        if <<<(mouse y) > (y position)> and <mouse down?>> or <key (up arrow v) pressed?>> then\n            start sound [Jump v]\n            set [y v] to [15]\n        end\n    end\n    change y by (1)\n    change [y v] by (-1)\n    change y by (y)\n    if <touching (スプライト2 v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    if <(x position) > [190]> then\n        go to x: (-200) y: (999)\n        broadcast (メッセージ1 v)\n    end\n    if <<touching color (#ff0000)?> or <touching color (#a70000)?>> then\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        wait (0.5) seconds\n        go to x: (-200) y: (999)\n        repeat (20)\n            change [ghost v] effect by (-5)\n        end\n        show\n    end\nend\n\ngo to x: (-200) y: (-93)\n\n@スプライト2\n\nwhen flag clicked\nshow\nswitch costume to (コスチューム1 v)\n\nwhen I receive [メッセージ1 v]\nnext costume\n\n@スプライト1\n\nwhen flag clicked\nhide\n\n
Platformer Engine

Instructions: \n\n thumbs up!\nspace to stop the cray z ness

@Stage\n\n@Sprite1\n\nwhen I receive [loop v]\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (0)\n    change x by (speedx)\n    change y by (speedy)\n    change [speedx v] by ((-4) * (<key (left arrow v) pressed?> - <key (right arrow v) pressed?>))\n    set [speedx v] to ((speedx) * (0.6))\n    if <touching (level v)?> then\n        change y by ((0) - (speedy))\n        set [speedy v] to [0]\n        if <touching (level v)?> then\n            change y by (1)\n            switch costume to (costume1 v)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (-2)\n                                set [speedx v] to ((0) - (speedx))\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [speedy v] by (-0.8)\n    change y by (-1)\n    if <touching (level v)?> then\n        change [speedy v] by (<key (up arrow v) pressed?> * (12))\n    end\n    change y by (1)\n    if <[240] < (x position)> then\n        set x to (-210)\n        broadcast (next v)\n    end\n    if <(cost) = [1]> then\n        go to x: (-240) y: (0)\n        set [cost v] to [0]\n    end\nend\n\n@Level\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next v]\nnext costume\n\n
Simple Platformer Game remix

Instructions: Use arrow keys to move.\n\n

@Stage\n\n@Player\n\nwhen I receive [makeplayerfollowhitbox v]\ngo to (hitbox v)\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset rotation style [left-right v]\npoint in direction (90)\nforever\n    if <key (right arrow v) pressed?> then\n        switch costume to ((costume [number v]) + (1))\n        point in direction (90)\n    else\n        if <key (left arrow v) pressed?> then\n            switch costume to ((costume [number v]) - (1))\n            point in direction (-90)\n        else\n            switch costume to (costume1 v)\n        end\n    end\n    wait (0.04) seconds\nend\n\n@Hitbox\n\nwhen flag clicked\nshow\nset size to (50) %\nset [spawnx v] to [-203]\nset [spawny v] to [-71]\ngo to x: (SpawnX) y: (SpawnY)\nset rotation style [left-right v]\nset [xvelocity v] to [0]\nset [yvelocity v] to [0]\nset [ghost v] effect to (100)\nforever\n    broadcast (MakePlayerFollowHitbox v)\n    Up/Down Movement [12] [-1]\n    Right/Left Movement [10] [0.6]\n    CheckNextLevel\n    CheckFallOffScreen\nend\n\ndefine Up/Down Movement (jump height) (fall speed)\nchange y by (yVelocity)\nif <touching (level v)?> then\n    CheckTouchingLava\n    repeat ([ceiling v] of ([abs v] of (yVelocity) ) )\n        if <touching (level v)?> then\n            change y by (((yVelocity) / ([abs v] of (yVelocity) )) * (-1))\n        end\n    end\n    if <<not <(yVelocity) > [0]>> and <key (up arrow v) pressed?>> then\n        set [yvelocity v] to (jump height)\n    else\n        set [yvelocity v] to [0]\n    end\nelse\n    change [yvelocity v] by (fall speed)\nend\n\ndefine Right/Left Movement (move speed) (drag)\nchange x by (xVelocity)\nif <touching (level v)?> then\n    CheckTouchingLava\n    repeat ([ceiling v] of ([abs v] of (xVelocity) ) )\n        if <touching (level v)?> then\n            change x by (((xVelocity) / ([abs v] of (xVelocity) )) * (-1))\n        end\n    end\n    set [xvelocity v] to [0]\nend\nif <key (right arrow v) pressed?> then\n    set [xvelocity v] to (move speed)\nelse\n    if <key (left arrow v) pressed?> then\n        set [xvelocity v] to ((move speed) * (-1))\n    end\nend\nset [xvelocity v] to ((xVelocity) * (drag))\n\ndefine CheckNextLevel\nif <(x position) > [235]> then\n    broadcast (Next Level v)\n    go to x: (SpawnX) y: (SpawnY)\nend\n\ndefine CheckTouchingLava\nif <touching color (#ff0000)?> then\n    go to x: (SpawnX) y: (SpawnY)\nend\n\ndefine CheckFallOffScreen\nif <(y position) < [-170]> then\n    go to x: (SpawnX) y: (SpawnY)\nend\n\n@Level\n\nwhen flag clicked\nset [level v] to [1]\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nforever\n    play sound [Cave v] until done\nend\n\nwhen I receive [next level v]\nchange [level v] by (1)\nnext costume\n\nwhen flag clicked\nif <(costume [number v]) = [11]> then\n    stop [all v]\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\n\nset [ghost v] effect to (0)\n\n