Moonlight Platformer - UPDATED!!!
@Stage\n\nwhen flag clicked\nforever\n    play sound [Pans_Labyrinth_-_Lullaby_Music_Box\[SaveInMP3.com\].mp3 v] until done\nend\n\n@Lose\n\ndefine None\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\n    change [ghost v] effect by (-1.3)\nend\ngo to x: (x) y: (y)\n\nwhen I receive [looose v]\ngo to [front v] layer\ngo [backward v] (90) layers\ngo to [front v] layer\nSmooth Glide x: (0) y: (0) speed: (8)\nset [oof v] to [1]\n\nwhen flag clicked\nset [oof v] to [0]\ngo to x: (0) y: (-345)\nhide\nshow\nset [ghost v] effect to (100)\n\nwhen this sprite clicked\nstop [other scripts in sprite v]\nset [oof v] to [0]\ngo to x: (0) y: (-345)\nhide\nshow\nset [ghost v] effect to (100)\nset [dead v] to [no]\nbroadcast (Reset v)\n\n@Ground2\n\ndefine Instant\nset [blocks v] to [0]\nhide\nerase all\nset [height v] to (pick random (0) to (2))\ngo to x: (-227) y: ((Height) * (27))\nrepeat (20)\n    set y to ((Height) * (27))\n    switch costume to (grass v)\n    stamp\n    if <(Blocks) > [0]> then\n        if <(pick random (1) to (3)) = [1]> then\n            change y by (27)\n            if <(pick random (1) to (3)) = [1]> then\n                switch costume to (wheat v)\n            else\n                switch costume to (lava v)\n            end\n            stamp\n            change y by (-27)\n        end\n    end\n    repeat (pick random (1) to (pick random (1) to (2)))\n        if <not <(y position) < [-140]>> then\n            change y by (-27)\n            switch costume to (dirt v)\n            stamp\n        end\n    end\n    repeat until <(y position) < [-179]>\n        change y by (-27)\n        switch costume to (pick random (3) to (pick random (3) to (pick random (3) to (pick random (3) to (5)))))\n        stamp\n    end\n    change x by (25)\n    if <not <(Height) > [4]>> then\n        change [height v] by (pick random (pick random (-1) to (1)) to (pick random (-1) to (pick random (-1) to (pick random (-1) to (1)))))\n    else\n        change [height v] by (pick random (-1) to (0))\n    end\n    change [blocks v] by (1)\nend\n\nwhen flag clicked\nset [levels v] to [0]\nset size to (200) %\nInstant\n\nwhen I receive [nl v]\nchange [levels v] by (1)\nInstant\n\nset y to ((Height) * (27))\n\nwhen I start as a clone\nforever\n    go to [front v] layer\n    if <touching (sprite2 v)?> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    if <touching (sprite2 v)?> then\n        hide\n    end\nend\n\nwhen I receive [reset v]\nInstant\n\n@Player2\n\nwhen flag clicked\nset size to (25) %\nhide\nclear graphic effects\nset [gravity v] to [0]\ngo to x: (-230) y: (180)\nswitch costume to (still v)\nhide\nshow\nclear graphic effects\nset [wait time v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (right v)\n        point in direction (90)\n        change [xv v] by (1.4)\n        next costume\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (right v)\n        point in direction (-90)\n        change [xv v] by (-1.4)\n        next costume\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <(Gravity) = [0]> then\n        if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n            change y by (1)\n            if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n                change y by (1)\n                if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n                    change y by (1)\n                    if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n                        change y by (1)\n                        if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n                            change y by (1)\n                            if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n                                change x by ((Xv) * (-1))\n                                change y by (-5)\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    else\n    end\n    if <(Gravity) = [0]> then\n        switch costume to (costume1 v)\n        change [yv v] by (-1)\n        change y by (Yv)\n    else\n    end\n    if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <(x position) > [230]> then\n        broadcast (NL v)\n        go to x: (-230) y: (180)\n        switch costume to (costume1 v)\n        show\n        set [xv v] to [0]\n        set [yv v] to [0]\n    end\n    if <touching color (#a83a21)?> then\n        hide\n        broadcast (Looose v)\n        hide\n        forever\n            stop [other scripts in sprite v]\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nset [score v] to [0]\n\nwhen I receive [nl v]\nset [score v] to ((Score) + (1))\n\nwhen flag clicked\nforever\n    if <(Score) > (☁ Highscore)> then\n        set [☁ highscore v] to (Score)\n        set [☁ highscoreuser v] to (username)\n    end\nend\n\nwhen I receive [reset v]\nset size to (25) %\nhide\nclear graphic effects\nset [gravity v] to [0]\ngo to x: (-230) y: (180)\nswitch costume to (still v)\nhide\nshow\nclear graphic effects\nset [wait time v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (right v)\n        point in direction (90)\n        change [xv v] by (1.4)\n        next costume\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (right v)\n        point in direction (-90)\n        change [xv v] by (-1.4)\n        next costume\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <(Gravity) = [0]> then\n        if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n            change y by (1)\n            if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n                change y by (1)\n                if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n                    change y by (1)\n                    if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n                        change y by (1)\n                        if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n                            change y by (1)\n                            if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n                                change x by ((Xv) * (-1))\n                                change y by (-5)\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    else\n    end\n    if <(Gravity) = [0]> then\n        switch costume to (costume1 v)\n        change [yv v] by (-1)\n        change y by (Yv)\n    else\n    end\n    if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching color (#177339)?> or <touching color (#4c280c)?>> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <(x position) > [230]> then\n        broadcast (NL v)\n        go to x: (-230) y: (180)\n        switch costume to (costume1 v)\n        show\n        set [xv v] to [0]\n        set [yv v] to [0]\n    end\n    if <touching color (#a83a21)?> then\n        hide\n        broadcast (Looose v)\n        hide\n        forever\n            stop [other scripts in sprite v]\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [reset1 v]\ngo to x: (-230) y: (180)\n\n@Sprite1\n\nwhen flag clicked\nset size to (50) %\nshow\n\nwhen this sprite clicked\nbroadcast (Reset1 v)\n\nwhen I receive [looose v]\nhide\n\nwhen I receive [reset v]\nshow\nset [score v] to [0]\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (0) y: (149)\nset [ghost v] effect to (100)\n\n@Capture\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nhide\n\n
Arrow keys or WASD to move.\nDon't go onto the red (lava)!