Daylight || A Platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [Unlimited v] until done\nend\n\n@less lag\n\n@Player\n\nforever\n    if <<[240] < (x position)> and <(Dead) = [0]>> then\n        broadcast (NAXT LEVEL v)\n        change [level v] by (1)\n        reset\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (enemy v)?> then\n        Dead\n    end\n    if <(y position) = [-180]> then\n        Dead\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#fff700)?> then\n        set [yv v] to [14]\n        broadcast (spring v)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <<[240] < (x position)> and <(Dead) = [0]>> then\n        broadcast (NAXT LEVEL v)\n        change [level v] by (1)\n        reset\n    end\nend\n\nwhen flag clicked\nhide variable [xv v]\nhide variable [dead v]\nhide variable [level v]\nhide variable [yv v]\nhide\n\ndefine reset\nclear graphic effects\npoint in direction (90)\ngo to x: (-220) y: (-16)\nswitch costume to (1 v)\nset [dead v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nset size to (10) %\nshow\n\ndefine Dead\nset [dead v] to [1]\nrepeat (5)\n    change [ghost v] effect by (4)\nend\nreset\n\ndefine Tick\nshow\nset [dead v] to [0]\nset [level v] to [1]\nset size to (100) %\nreset\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        switch costume to (right v)\n        change [xv v] by (1)\n    end\n    if <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> and <(Dead) = [0]>> then\n        switch costume to (left v)\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (.9))\n    change x by (Xv)\n    if <touching (platform v)?> then\n        change y by (2)\n        if <touching (platform v)?> then\n            change y by (2)\n            if <touching (platform v)?> then\n                change y by (2)\n                if <touching (platform v)?> then\n                    change y by (2)\n                    if <touching (platform v)?> then\n                        change y by (2)\n                        if <touching (platform v)?> then\n                            change x by ((Xv) * (-2))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>> then\n                                if <(Xv) > [0]> then\n                                    switch costume to (left v)\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [13]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-0.8)\n    change y by (Yv)\n    if <touching (platform v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (platform v)?> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n            set [yv v] to [12]\n            switch costume to (up v)\n        end\n    end\n    change y by (1)\n    if <<<touching (spike v)?> or <touching (lava v)?>> and <touching (spike v)?>> then\n        Dead\n    end\n    if <(y position) < [-180]> then\n        Dead\n    end\nend\n\nwhen I receive [start v]\nshow\nTick\n\nwhen I receive [1 v]\nreset\n\nwhen flag clicked\nforever\n    if <touching (flag v)?> then\n        change [level v] by (1)\n        broadcast (1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (enemy v)?> then\n        Dead\n    end\n    if <(y position) < [-180]> then\n        Dead\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (saw v)?> then\n        Dead\n    end\n    if <(y position) < [-180]> then\n        Dead\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (lava v)?> then\n        Dead\n    end\n    if <(y position) < [-180]> then\n        Dead\n    end\nend\n\nwhen I receive [high v]\nclear graphic effects\n\nwhen I receive [medium v]\nset [pixelate v] effect to (75)\n\nwhen I receive [low v]\nset [pixelate v] effect to (125)\n\nwhen flag clicked\nbroadcast (Start v)\n\nwhen flag clicked\nforever\n    if <not <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> or <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>>>> then\n        switch costume to (normal v)\n    end\nend\n\nchange [xv v] by (1)\n\nwhen flag clicked\nforever\n    if <not <<key (up arrow v) pressed?> or <<key (down arrow v) pressed?> or <<key (right arrow v) pressed?> or <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<key (d v) pressed?> or <<key (s v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <<(mouse x) > (x position)> or <<mouse down?> and <(mouse x) < (x position)>>>>>>>>>>>>> then\n        switch costume to (normal v)\n    end\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\n    wait (0.004) seconds\n    set [color v] effect to (0)\nend\n\nwhen I start as a clone\nset size to (70) %\nswitch costume to (clone v)\nrepeat (20)\n    change size by (-5)\n    change [ghost v] effect by (5)\n    change [color v] effect by (0)\n    turn right (0) degrees\nend\ndelete this clone\n\n@platform\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [start v]\n\nwhen flag clicked\nif <touching (player v)?> then\n    switch costume to (3 v)\nend\nbroadcast (oo v)\n\nset size to (100) %\n\nwhen flag clicked\n\nhide\n\nwhen I receive [start v]\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [mobile v]\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [mobile v]\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [medium v]\nset [pixelate v] effect to (75)\n\nwhen I receive [high v]\nclear graphic effects\n\nwhen I receive [low v]\nset [pixelate v] effect to (125)\n\n@spike\n\nwhen I receive [start v]\ngo to [front v] layer\nshow\nswitch costume to (1 v)\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\ngo to x: (34) y: (11)\nhide\n\nwhen flag clicked\nshow\nforever\n    if <(costume [number v]) = [13]> then\n        go to [back v] layer\n    end\nend\n\nwhen flag clicked\nhide\nset size to (100) %\n\nwhen I receive [mobile v]\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [mobile v]\ngo to [front v] layer\nshow\nswitch costume to (1 v)\n\nwhen I receive [high v]\nclear graphic effects\n\nwhen I receive [medium v]\nset [pixelate v] effect to (75)\n\nwhen I receive [low v]\nset [pixelate v] effect to (125)\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\n@Saw\n\nwhen flag clicked\nforever\n    hide\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        go to x: (-3) y: (-97)\n        go to [back v] layer\n        show\n        turn right (13) degrees\n    end\n    if <(Level) = [6]> then\n        go to x: (-116) y: (-105)\n        go to [back v] layer\n        show\n        turn right (13) degrees\n    end\nend\n\n@grass\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    switch costume to (Level)\nend\n\n@trampoline\n\nwhen I receive [spring v]\nswitch costume to (costume1 v)\nrepeat (4)\n    next costume\n    wait (0.01) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        hide\n    end\n    if <(Level) = [2]> then\n        hide\n    end\n    if <(Level) = [3]> then\n        hide\n    end\n    if <(Level) = [4]> then\n        show\n        go to x: (-67) y: (-75)\n    end\n    if <(Level) = [5]> then\n        hide\n    end\nend\n\n@lava\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    repeat (30)\n        change y by (-0.4)\n    end\n    repeat (30)\n        change y by (0.4)\n    end\nend\n\nwhen flag clicked\nshow\nswitch costume to (1 v)\nforever\n    switch costume to (Level)\nend\n\n@Clouds\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset size to (pick random (50) to (80)) %\nshow\ngo to [back v] layer\nset [ghost v] effect to (20)\nswitch costume to (pick random (1) to (5))\nif <(side) = [1]> then\n    go to x: (300) y: (pick random (150) to (100))\n    repeat until <(x position) < [-250]>\n        change x by (-1)\n    end\n    delete this clone\nend\nif <(side) = [2]> then\n    go to x: (-300) y: (pick random (150) to (100))\n    repeat until <(x position) > [250]>\n        change x by (1)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    go [backward v] (1) layers\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    if  then\n        hide\n        delete this clone\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    set [side v] to (pick random (1) to (2))\n    create clone of (_myself_ v)\n    wait (pick random (1) to (2)) seconds\nend\n\n@Sprite1\n\nwhen flag clicked\nforever\n    repeat (10)\n        change [ghost v] effect by (25)\n    end\nend\n\n
moved to @BlazingJuice follow me there!