wasteland (platformer)
@Stage\n\nwhen flag clicked\nforever\n    play sound [Legends Never Die \(ft v] until done\nend\n\nwhen flag clicked\nset volume to (10) %\nrepeat (90)\n    change volume by (1)\nend\n\n@player\n\nwhen flag clicked\nset [level v] to [1]\nset [x v] to [0]\nset [y v] to [0]\nset [glide? v] to [no]\ngo to x: (-230) y: (-30)\nforever\n    platformer [0.7] [-0.8] [0.8] [7.7]\nend\n\ndefine platformer (speed) (gravity) (friction ) (jump)\nswitch costume to (costume1 v)\nchange [y v] by (gravity)\nchange y by (y)\nif <touching (ground v)?> then\n    repeat until <not <touching (ground v)?>>\n        change y by ((([abs v] of (y) ) / (y)) * (-1))\n    end\n    set [y v] to ((jump) * <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(([abs v] of (y) ) / (y)) = [-1]>>)\nend\nset [x v] to ((friction ) * ((x) + (((speed) * <<key (right arrow v) pressed?> or <key (d v) pressed?>>) + (((speed) * (-1)) * <<key (left arrow v) pressed?> or <key (a v) pressed?>>))))\nchange x by (x)\nif <touching (ground v)?> then\n    repeat until <not <touching (ground v)?>>\n        change x by ((([abs v] of (x) ) / (x)) * (-1))\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [y v] to (jump)\n        set [x v] to ((([abs v] of (x) ) / (x)) * (-4))\n    end\nend\nif <touching (next v)?> then\n    go to x: (-230) y: (-30)\n    change [level v] by (1)\n    broadcast (refresh v)\nend\nif <touching (death v)?> then\n    go to x: (-230) y: (-30)\nend\nif <key (space v) pressed?> then\n    go to x: (-230) y: (-30)\n    broadcast (refresh v)\nend\n\n@ground\n\nwhen flag clicked\ngenerate level\n\ndefine generate level\nswitch costume to (costume3 v)\nset size to (400) %\nshow\ngo to x: (-230) y: (-175)\nrepeat (2)\n    repeat (7)\n        create clone of (_myself_ v)\n        change y by (20)\n    end\n    set y to (-175)\n    change x by (20)\nend\nrepeat (22)\n    set [level height v] to (pick random (0) to (15))\n    repeat (level height)\n        switch costume to (pick random (1) to (3))\n        create clone of (_myself_ v)\n        change y by (20)\n    end\n    set y to (-175)\n    change x by (20)\nend\nhide\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    delete this clone\nend\n\nwhen I receive [refresh v]\nset [delete? v] to [yes]\nwait (0) seconds\nset [delete? v] to [no]\ngenerate level\n\nwhen I start as a clone\nforever\n    if <(delete?) = [yes]> then\n        delete this clone\n    end\nend\n\n@next\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\n\n@death\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\n\n@text\n\nwhen flag clicked\nhide\nforever\n    text (level)\nend\n\ndefine text (level)\ngo to x: (-170) y: (150)\nset [digit v] to [0]\nrepeat (length of (level))\n    change [digit v] by (1)\n    switch costume to (letter (digit) of (level))\n    create clone of (_myself_ v)\n    change x by (14)\nend\n\nwhen I start as a clone\nshow\nwait (0) seconds\ndelete this clone\n\n@thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nhide\nforever\n    go to [front v] layer\n    reset timer\nend\n\nwhen [timer v] > (0.001)\nshow\n\n
hold on don`t exit! the game is not broken, it just look weird because it`s randomly generated. wasd or arrow key to move and jump, u can can wall jump, press space to skip level if ur stuck because a level could be impossible, however, if u skip, it won`t count as passing a level.