GPT007/Scratch-platformers-10k huggingface dataset:
Flat (platformer)


@Stage\n\nwhen I receive [message1 v]\nnext backdrop\n\n@ Ball\n\nwhen flag clicked\nset [deaths v] to [0]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nset [y spawn v] to [-110]\nset [x spawn v] to [-224]\ngo to x: (X Spawn) y: (Y Spawn)\nset size to (50) %\nforever\n    if on edge, bounce\n    change [y v] by (-.5)\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [x v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change y by (1)\n                            if <touching color (#000000)?> then\n                                change y by (-6)\n                                change x by ((x) * (-1))\n                                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                    set [y v] to [10]\n                                    if <(x) > [0]> 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                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y)\n    if <touching color (#000000)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-0.5)\n    if <<touching color (#000000)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [y v] to [8]\n    end\n    change y by (0.5)\n    if <touching color (#ff0000)?> then\n        go to x: (X Spawn) y: (Y Spawn)\n        change [deaths v] by (1)\n    end\n    if <touching color (#003fff)?> then\n        set [y v] to [16]\n    end\n    if <<(x position) > [227]> and <(y position) > [-155]>> then\n        broadcast (message1 v)\n        go to x: (X Spawn) y: (Y Spawn)\n    end\nend\n\nwhen I start as a clone\nrepeat (10)\n    change [ghost v] effect by (25)\n    change size by (-3)\nend\ndelete this clone\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\n@TN\n\nwhen flag clicked\nshow variable [deaths v]\nhide\n\n
Red Cube - Platformer

Instructions: Use the arrow keys to move.\nYou can stick to ceilings and jump off them.\n\nThis platformer is a loop! \nYou go around in a circle. But as you go around, things get harder, until you get stuck and have to find a secret...\n

@Stage\n\n@Player\n\nwhen flag clicked\nforever\n    Scrolling Code\nend\n\ndefine Scrolling Code\nchange [y-vel v] by (-1)\nif <key (right arrow v) pressed?> then\n    change [x-vel v] by (1)\n    switch costume to (player v)\nend\nif <key (left arrow v) pressed?> then\n    change [x-vel v] by (-1)\n    switch costume to (player2 v)\nend\nset [x-vel v] to ((x-vel) * (0.9))\nchange x by (x-vel)\nif <touching (levels v)?> then\n    change y by (1)\nend\nif <touching (levels v)?> then\n    change y by (1)\nend\nif <touching (levels v)?> then\n    change y by (1)\nend\nif <touching (levels v)?> then\n    change y by (1)\nend\nif <touching (levels v)?> then\n    change y by (-4)\n    change x by ((x-vel) * (-1))\n    if <key (up arrow v) pressed?> then\n        set [y-vel v] to [15]\n        if <(x-vel) > [0]> then\n            set [x-vel v] to [-10]\n        else\n            set [x-vel v] to [10]\n        end\n    else\n        set [x-vel v] to [0]\n    end\nend\nchange y by (y-vel)\nif <touching (levels v)?> then\n    change y by ((y-vel) - ((y-vel) * (2)))\n    set [y-vel v] to [0]\nend\nchange y by (-1)\nif <<key (up arrow v) pressed?> and <touching (levels v)?>> then\n    set [y-vel v] to [15]\nend\nchange y by (1)\nchange [scroll x v] by ((x position) * (-1))\nchange [scroll y v] by ((y position) * (-1))\ngo to x: (0) y: (0)\nif <touching (lava v)?> then\n    Position\nend\nif <(Scroll Y) > [600]> then\n    Position\nend\n\ndefine Position\nset [scroll x v] to [217]\nset [scroll y v] to [119]\n\nwhen flag clicked\nforever\n\nwhen flag clicked\nshow\n\n@Levels\n\nwhen flag clicked\nset [scroll x v] to [217]\nset [scroll y v] to [119]\n\nwhen flag clicked\nforever\n    go to x: (Scroll X) y: (Scroll Y)\nend\n\nwhen flag clicked\nshow\n\n@Lava\n\nwhen flag clicked\n\nforever\n    if <<(Scroll X) = (x position)> and <(Scroll Y) = (y position)>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    go to (levels v)\nend\n\nwhen flag clicked\nshow\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\n@YT\n\nwhen flag clicked\nhide\nforever\n    wait (pick random (1) to (7)) seconds\n    switch costume to (costume1 v)\n    go to x: (351) y: (320)\n    show\n    go to [front v] layer\n    repeat (9)\n        change y by (-6)\n    end\n    repeat (5)\n        change y by (3)\n    end\n    repeat (5)\n        change y by (-1)\n    end\n    wait (2) seconds\n    repeat (15)\n        change y by (7)\n    end\n    hide\nend\n\n@Sound\n\nwhen flag clicked\nforever\n    play sound [Geometry Dash - Back on Track - All Coins v] until done\nend\n\n
Chinatown | A Platformer #Games #Trending #Platformer

Instructions: 《年内フォロワー1000人を目指しています!!どうかフォローをお願いします!!》\nーーーーーーー操作方法/Operation Methodーーーーー\n左右移動︰矢印キー 右もしくは左・AもしくはDキー\n・主人公の右もしくは左をタップ\nジャンプ︰矢印キー 上・Wキー・スペースキー\n・主人公の上をタップ\n\nLeft/Right Move︰Arrow keys Right or Left/A or D key\nTap right or left of the main character\nJump︰Arrow keys Up, W, Spaceker\nTap on the main character\nーーーーーーーゲームのヒント/Game Tipsーーーーーー《左右移動》\n上記の方法で、右または左に移動します。\n《ジャンプ》\n地面についている状態で上記の方法でジャンプします。\n《壁キック》\n壁についている状態で上記のジャンプと左右移動をして壁キックをします。\n《背景の字》\nそのステージに合わせたコメントが書かれています。\n少し参考にしてもいいでしょう。\n《次のステージへ行く方法》\nこのゲームは、いくつかのステージがあります。\n画面右端に行くと『NEXT』が現れるのでそれが終わると次のステージへ進みます。\n\n《Move left/right》\nMove to the right or left in the manner described above.\n《JUMP》\nJump in the above manner while on the ground.\n《Wall Kick》\nWhile on the wall, jump and move left and right as described above and kick the wall.\n《Background Characters》\nIt contains comments tailored to that stage.\nYou may use it as a little reference.\nHow to get to the next stage.\nThe game has several stages.\nWhen you go to the right end of the screen, "NEXT" will appear, and when that is over, you will proceed to

@Stage\n\nwhen [n v] key pressed\nnext backdrop\n\nwhen [b v] key pressed\nswitch backdrop to ((backdrop [number v]) - (1)) and wait\n\nwhen stage clicked\nif <(mouse y) < [-130]> then\n    if <(mouse x) > [130]> then\n        next backdrop\n    end\n    if <(mouse x) < [-120]> then\n        switch backdrop to ((backdrop [number v]) - (1))\n    end\nend\n\n@Platforms\n\n@Exit\n\n@Hero\n\n
Elements 2 | A platformer #all #games #art #platformer #trending

Instructions: - Use arrow keys to move\n- Hold arrow key while on a wall to slide\n- Press up arrow while sliding to wall jump\n- Press space to dash\n- Don't touch spikes!\n- Lamps are checkpoints\n- Get the bowl of noodles!

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\n\n@ball\n\nwhen flag clicked\nset [y spawn v] to [-129]\nset [x spawn v] to [-218]\ngo to x: (X Spawn) y: (Y Spawn)\nshow\nset size to (50) %\nset [x v] to [0]\nset [y v] to [0]\nforever\n    Platformer engine\nend\n\ndefine Platformer engine\nif on edge, bounce\nchange [y v] by (-0.5)\nif <key (left arrow v) pressed?> then\n    change [x v] by (-1)\nend\nif <key (right arrow v) pressed?> then\n    change [x v] by (1)\nend\nset [x v] to ((x) * (0.9))\nchange x by (x)\nif <touching color (#000000)?> then\n    change y by (1)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change y by (-6)\n                            change x by ((x) * (-1))\n                            if <key (up arrow v) pressed?> then\n                                set [y v] to [10]\n                                if <(x) > [0]> 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                    end\n                end\n            end\n        end\n    end\nend\nchange y by (y)\nif <touching color (#000000)?> then\n    change y by ((y) * (-1))\n    set [y v] to [0]\nend\nchange y by (-0.5)\nif <<touching color (#000000)?> and <key (up arrow v) pressed?>> then\n    set [y v] to [10]\nend\nchange y by (0.5)\nif <touching color (#ff0000)?> then\n    go to x: (X Spawn) y: (Y Spawn)\nend\nif <touching color (#003fff)?> then\n    set [y v] to [16]\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nchange [ghost v] effect by (1000)\n\n
Renew || A Platformer 

Instructions: Happy 560+ Loves & 475+ Favs!!!\nI Never Believed This Project Would Get Loved So Much! Thanks A Lot Fellow Scratchers!!!\n\nA Shout-Out To @ssnyder874 For Being The First Person To Actually Clear The Game & Score More Than 3000 Points!\n\nPlease Don't Comment About The Slope Glitch Because I Glitched It & I Wanted To Make It Almost Impossible!\n-------------------------------------------------------------------------\nControls & Objectives Are Inside.\n\nScore System - \n+ Every Time You Clear A Level, You Will get 200 Points. \n+ Every Time You Die, You Will Loose 100 Points.\n\nSo, Don't Die To Score More !

@Stage\n\nwhen flag clicked\nswitch backdrop to (level 1 v)\n\nwhen I receive [next level v]\nnext backdrop\n\nwhen backdrop switches to [thumbnail v]\nbroadcast (end game v)\n\nwhen flag clicked\nforever\n    play sound [Vexento - Inspire v] until done\nend\n\n@Sprite1\n\nwhen flag clicked\nshow\ngo to x: (-196) y: (-17)\nset [x v] to [0]\nset [y v] to [0]\nforever\n    change [y v] by (-1)\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching color (#000000)?> then\n        change y by (1)\n    end\n    if <touching color (#000000)?> then\n        change y by (1)\n    end\n    if <touching color (#000000)?> then\n        change y by (1)\n    end\n    if <touching color (#000000)?> then\n        change y by (1)\n    end\n    if <touching color (#000000)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <key (up arrow v) pressed?> 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 color (#000000)?> 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?> and <touching color (#000000)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <<(x position) = [255]> or <(x position) > [255]>> then\n        go to x: (-196) y: (-17)\n        broadcast (next level v)\n    end\n    if <touching color (#cd0101)?> then\n        go to x: (-196) y: (-17)\n    end\n    if <touching color (#00cc44)?> then\n        set [y v] to [20]\n    end\n    if <touching color (#ff9400)?> then\n        set [y v] to [0]\n        set [x v] to [0]\n    end\n    if <touching color (#14148d)?> then\n        if <key (right arrow v) pressed?> then\n            change [x v] by (3)\n        end\n        if <key (left arrow v) pressed?> then\n            change [x v] by (-3)\n        end\n    end\nend\n\nwhen I receive [end game v]\nhide\nstop [all v]\n\n
||-Colorless-|| (A Platformer) #Games #All #Trending #Platformer #Black and White


@Stage\n\nwhen I receive [next level v]\nnext backdrop\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\n@Ball\n\nwhen flag clicked\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    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\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 x) > (x position)>>> then\n            set [y v] to [17]\n            if <(x) > [0]> 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?> and <touching (ground v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <(x position) > [222]> then\n        go to x: (-217) y: (-20)\n        broadcast (NEXT LEVEL v)\n    end\n    if <touching color (#7bbae3)?> then\n        set [y v] to [22]\n    end\nend\n\nwhen I receive [next level v]\nchange [level v] by (1)\n\nwhen flag clicked\nforever\n    if <touching (spikes v)?> then\n        go to x: (-217) y: (-20)\n        change [deaths: v] by (1)\n    end\nend\n\nwhen flag clicked\nset [level v] to [0]\nchange [☁ views! v] by (1)\ngo to x: (-217) y: (-20)\n\n@ground\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    play sound (pick random (1) to (2)) until done\nend\n\nwhen I receive [next level v]\nnext costume\n\n@Spikes\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@NOTE!!\n\n@Trampoline\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (costume1 v)\n\n
Minecraft Platformer World[DEMO]

Instructions: ***Yo Scratch 3.0 kinda broke this (also I didn't make it very well) So this game is broken! Sorry!***\n\n\nTop loved!!!! :D Thanks! ♥\nPLEASE READ\n\nMr. Penguin wanted to travel and find some adventure. So that's exactly what he did.\n\nWelcome to Penguin Platformer! A platformer full of quests and penguins.\n\nA and D keys to move W to jump. Click on the penguins to talk to them. Press space to go through the slides. Get to the right side to advance to the next level. Don't touch the water!\n\nMake sure you finish all of the quests! Otherwise it's Game Over!\n\nNote: I will finish this, even if this isn't too popular.

@Stage\n\n@Player\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nReset Player Position\nset [force walk v] to [3]\nset [force gravity v] to [-1.5]\nset [force jump v] to [17]\nset [player speed x v] to [0]\nforever\n    Check Player Gravity\n    Check Player Walk\n    Check Player Touching\nend\n\ndefine move out (dx) (dy)\nrepeat until <not <touching color (#54e000)?>>\n    change x by (dx)\n    change y by (dy)\nend\n\ndefine Check Player Gravity\nchange [player speed y v] by (FORCE GRAVITY)\nchange y by (Player Speed Y)\nif <touching color (#54e000)?> then\n    if <(Player Speed Y) > [0]> then\n        move out [0] [-1]\n        set [player speed y v] to [0]\n    else\n        move out [0] [1]\n        if <key (up arrow v) pressed?> then\n            set [player speed y v] to (FORCE JUMP)\n        else\n            set [player speed y v] to [0]\n        end\n    end\nend\n\ndefine Check Player Walk\nif <key (left arrow v) pressed?> then\n    change [player speed x v] by ((-1) * (FORCE WALK))\nend\nif <key (right arrow v) pressed?> then\n    change [player speed x v] by ((1) * (FORCE WALK))\nend\nset [player speed x v] to ((Player Speed X) * (0.7))\nchange x by (Player Speed X)\nif <(Player Speed X) > [0]> then\n    move out [-1] [0]\nelse\n    move out [1] [0]\nend\n\ndefine Check Player Touching\nif <touching color (#f2ff00)?> then\n    broadcast (Complete level v) and wait\n    Reset Player Position\n    next backdrop\nend\nif <touching color (#7971ff)?> then\n    set [player speed y v] to [24]\nend\nif <touching color (#b9b9b9)?> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    Reset Player Position\nend\n\ndefine Reset Player Position\nclear graphic effects\ngo to x: (-200) y: (-10)\n\n@Collectable\n\nwhen backdrop switches to [backdrop2 v]\nshow\ngo to x: (-22) y: (78)\n\nwhen flag clicked\nhide\nforever\n    change [color v] effect by (3)\n    if <touching (player v)?> then\n        hide\n    end\nend\n\nwhen I receive [complete level v]\nhide\n\nwhen backdrop switches to [backdrop3 v]\nshow\ngo to x: (-179) y: (77)\n\n
Adventurer || A cloud scrolling platformer


@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (level)\nend\n\n@Sprite1\n\nwhen flag clicked\nforever\n    play sound [27 World of Goo  v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\ngo to x: (-184) y: (-40)\nset [x v] to [0]\nset [y v] to [0]\nset [level v] to [1]\nshow\nforever\n    if <key (right arrow v) pressed?> then\n        change [x v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (sprite2 v)?> then\n        change y by (1)\n        if <touching (sprite2 v)?> then\n            change y by (1)\n            if <touching (sprite2 v)?> then\n                change y by (1)\n                if <touching (sprite2 v)?> then\n                    change y by (1)\n                    if <touching (sprite2 v)?> then\n                        change y by (1)\n                        if <touching (sprite2 v)?> then\n                            change x by ((x) * (-1))\n                            if <not <touching (sprite2 v)?>> then\n                                change y by (-5)\n                            end\n                            if <key (up arrow v) pressed?> then\n                                if <(x) > [0]> then\n                                    set [x v] to [-5]\n                                else\n                                    set [x v] to [5]\n                                end\n                                set [y v] to [10]\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 (sprite2 v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (sprite2 v)?> then\n        if <key (up arrow v) pressed?> then\n            set [y v] to [10]\n        end\n    end\n    change y by (1)\n    if <(x position) > [240]> then\n        change [level v] by (1)\n        go to x: (-184) y: (-40)\n        set [x v] to [0]\n        set [y v] to [0]\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nforever\n    switch costume to (level)\n    if <key (q v) pressed?> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost v] effect to (100)\n    end\nend\n\nhide\n\n@Sprite3\n\nwhen flag clicked\npoint in direction (90)\ngo to x: (0) y: (0)\nhide\n\nshow\npoint in direction (90)\ngo to x: (0) y: (0)\ngo to [front v] layer\n\nset [level v] to [19]\n\nchange [level v] by (1)\n\n
Pen Platformer Engine

Instructions: WASD, arrow keys / press x to skip a level\n\nmobile support\n\nplot: You are on the moon\n\nreport bugs and faults in the comments\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)\n\nwhen I receive [next level v]\nchange [level v] by (1)\nnext costume\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