Moonlight ✦ A Mobile Friendly Platformer ✦ #games #art #all #moblie #topremixed
@Stage\n\n@Player\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (4 v)\npoint in direction (pick random (-45) to (45))\nchange y by (10)\nrepeat (14)\n    move (3) steps\nend\nchange [animation v] by (1)\ndelete this clone\n\nwhen I receive [next v]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nset [animation v] to [0]\ngo to x: (-200) y: (0)\n\nwhen I receive [green flag v]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nset [animation v] to [0]\ngo to x: (-200) y: (0)\nshow\nforever\n    set [ghost v] effect to (0)\n    switch costume to (1 v)\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x velocity v] by (-0.8)\n        switch costume to (2 v)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x velocity v] by (0.8)\n        switch costume to (3 v)\n    end\n    set [x velocity v] to ((x velocity) * (0.9))\n    change x by (round (x velocity))\n    if <touching (ground v)?> then\n        change y by (1)\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            if <touching (ground v)?> then\n                change y by (1)\n            end\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (-6)\n                        change x by (round ((x velocity) * (-1)))\n                    end\n                end\n            end\n            set [x velocity v] to [0]\n        end\n    end\n    if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        change y by (-1)\n        if <touching (ground v)?> then\n            set [y velocity v] to [12]\n        end\n        change y by (1)\n    end\n    change [y velocity v] by (-1)\n    change y by (y velocity)\n    if <touching (ground v)?> then\n        change y by ((y velocity) * (-1))\n        set [y velocity v] to [0]\n    end\n    if <<touching (danger v)?> or <touching (lava3 v)?>> then\n        start sound [recording3 v]\n        set [animation v] to [0]\n        repeat (4)\n            create clone of (_myself_ v)\n            change [ghost v] effect by (10)\n        end\n        repeat (6)\n            change [ghost v] effect by (10)\n        end\n        wait until <(Animation) = [4]>\n        set [x velocity v] to [0]\n        set [y velocity v] to [0]\n        set [animation v] to [0]\n        go to x: (-200) y: (0)\n    end\n    if <(x position) > [240]> then\n        broadcast (Next v) and wait\n    end\nend\n\n@Ground\n\nwhen I receive [next v]\nnext costume\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nswitch costume to (1 v)\nshow\n\n@Glow\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nset [ghost v] effect to (75)\nset size to (100) %\ngo to [back v] layer\nshow\nforever\n    go to (player v)\nend\n\nwhen I receive [green flag v]\nforever\n    set size to (((-5) * ([sin v] of ((timer) * (100)) )) + (100)) %\nend\n\n@Glow2\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nset [ghost v] effect to (50)\nset size to (75) %\ngo to [back v] layer\nshow\nforever\n    go to (player v)\nend\n\nwhen I receive [green flag v]\nforever\n    set size to (((-5) * ([sin v] of ((timer) * (75)) )) + (75)) %\nend\n\n@Glow3\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nforever\n    set size to (((-5) * ([sin v] of ((timer) * (50)) )) + (50)) %\nend\n\nwhen I receive [green flag v]\nset [ghost v] effect to (25)\nset size to (50) %\ngo to [back v] layer\nshow\nforever\n    go to (player v)\nend\n\n@Grass\n\ndefine Grass from (xpos1) to (xpos2)\nshow\ngo to x: (xpos1) y: (0)\npoint in direction (90)\nrepeat until <(x position) = (xpos2)>\n    change x by (1)\n    set size to (pick random (150) to (200)) %\n    if <(pick random (1) to (3)) = [2]> then\n        create clone of (_myself_ v)\n    end\nend\nhide\n\nwhen I start as a clone\nGrass\nforever\n    if <touching (player v)?> then\n        Sway\n    end\nend\n\ndefine Grass\nswitch costume to (4 v)\nset [color v] effect to (0)\nset [ghost v] effect to (0)\nif <touching (ground v)?> then\n    repeat until <<not <touching (ground v)?>> or <touching (_edge_ v)?>>\n        change y by (1)\n    end\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\n    change x by (-4)\nelse\n    repeat until <touching (ground v)?>\n        change y by (-2)\n        if <touching (_edge_ v)?> then\n            delete this clone\n        end\n    end\nend\ngo to [front v] layer\nswitch costume to (pick random (1) to (3))\n\ndefine Sway\nset [magnitude v] to ((([x velocity v] of [player v]) + (pick random (-2.0) to (2.0))) * (4))\nset [sway v] to [0]\nrepeat until <<[0] = (round ((Magnitude) * (2)))> or <<touching (player v)?> and <([abs v] of (Magnitude) ) < ([abs v] of (() * (2)) )>>>\n    point in direction ((90) - (([sin v] of (sway) ) * (Magnitude)))\n    change [sway v] by (-10)\n    set [magnitude v] to ((0.95) * (Magnitude))\nend\n\nwhen I receive [next v]\nbroadcast (Delete Clones v) and wait\nif <([costume name v] of [ground v]) = [3]> then\n    Grass from [-240] to [-170]\n    Grass from [-143] to [-50]\n    Grass from [-20] to [60]\n    Grass from [85] to [180]\n    Grass from [215] to [240]\nelse\n    if <([costume name v] of [ground v]) = [4]> then\n        Grass from [-240] to [-30]\n        Grass from [150] to [240]\n    else\n        if <([costume name v] of [ground v]) = [5]> then\n            Grass from [-240] to [-130]\n            Grass from [-5] to [45]\n            Grass from [155] to [240]\n        else\n            if <([costume name v] of [ground v]) = [7]> then\n                Grass from [-240] to [-140]\n                Grass from [140] to [240]\n            else\n                if <([costume name v] of [ground v]) = [8]> then\n                    Grass from [-240] to [20]\n                else\n                    if <([costume name v] of [ground v]) = [9]> then\n                        Grass from [-240] to [145]\n                    else\n                        Grass from [-240] to [240]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [delete clones v]\ndelete this clone\n\nGrass from [-150] to [-40]\nGrass from [-26] to [60]\nGrass from [77] to [190]\n\nGrass from [0] to [0]\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nbroadcast (Delete Clones v) and wait\nGrass from [-240] to [240]\n\n@Overlay\n\nwhen I receive [next v]\nnext costume\ngo to [front v] layer\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nswitch costume to (1 v)\ngo to [front v] layer\nshow\n\n@Danger\n\nwhen I receive [next v]\nnext costume\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nswitch costume to (1 v)\nshow\n\n@Particles\n\nwhen I start as a clone\nset [ghost v] effect to (50)\nset size to (pick random (50) to (100)) %\nswitch costume to (pick random (1) to (3))\ngo to (player v)\npoint in direction (pick random (0) to (359))\ngo to [back v] layer\nshow\nrepeat until <<touching (_edge_ v)?> or <touching (ground v)?>>\n    move (1) steps\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nhide\nforever\n    set [# v] to (pick random (1) to (20))\n    if <(#) = [1]> then\n        create clone of (_myself_ v)\n    end\nend\n\n@Underlay\n\nwhen I receive [next v]\nnext costume\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nswitch costume to (1 v)\nshow\nforever\n    go to [back v] layer\nend\n\n@Music\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nforever\n    play sound [Prelude No. 1 in C, BWV 846 v] until done\nend\n\n@Lava\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nhide\nset [ghost v] effect to (25)\ngo to [back v] layer\nforever\n    if <<<([costume name v] of [ground v]) = [4]> or <([costume name v] of [ground v]) = [5]>> or <<([costume name v] of [ground v]) = [7]> or <([costume name v] of [ground v]) = [8]>>> then\n        show\n    else\n        hide\n    end\n    set y to (((-5) * ([sin v] of ((timer) * (125)) )) + (-25))\nend\n\n@Lava2\n\nwhen I receive [green flag v]\nhide\nset [ghost v] effect to (25)\ngo to [back v] layer\nforever\n    if <<<([costume name v] of [ground v]) = [4]> or <([costume name v] of [ground v]) = [5]>> or <<([costume name v] of [ground v]) = [7]> or <([costume name v] of [ground v]) = [8]>>> then\n        show\n    else\n        hide\n    end\n    set y to (((-5) * ([sin v] of ((timer) * (200)) )) + (-50))\nend\n\nwhen flag clicked\nhide\n\n@Lava3\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nhide\nset [ghost v] effect to (50)\ngo to [back v] layer\nforever\n    if <<<([costume name v] of [ground v]) = [4]> or <([costume name v] of [ground v]) = [5]>> or <<([costume name v] of [ground v]) = [7]> or <([costume name v] of [ground v]) = [8]>>> then\n        show\n    else\n        hide\n    end\n    set y to (((-5) * ([sin v] of ((timer) * (150)) )) + (0))\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\nswitch costume to (7 v)\ngo to [front v] layer\nforever\n    set [timer v] to (timer)\nend\n\nwhen [timer v] > (timer)\nhide\nswitch costume to (7 v)\ngo to [front v] layer\nset [brightness v] effect to (-100)\nshow\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\n@Intro (New)\n\nwhen I receive [green flag v]\nhide\ndelete this clone\n\nwhen I start as a clone\nshow\nif <(#) = [1]> then\n    go to x: (0) y: (0)\n    set size to (0) %\n    switch costume to (logo v)\n    show\n    repeat (7)\n        change size by (10)\n    end\n    repeat (4)\n        change size by (-5)\n    end\n    set [saturn-rings v] to [true]\n    repeat (5)\n        change y by (10)\n    end\nend\nif <(#) = [2]> then\n    hide\n    switch costume to (s v)\n    set rotation style [don't rotate v]\n    wait (0.00000011) seconds\n    repeat (120)\n        set [# v] to [5]\n        go to x: (pick random (-230) to (-200)) y: (pick random (-120) to (120))\n        create clone of (_myself_ v)\n        go to x: (pick random (230) to (200)) y: (pick random (-120) to (120))\n        create clone of (_myself_ v)\n    end\n    stop all sounds\n    broadcast (green flag v)\n    broadcast (Music v)\n    hide\nend\nif <(#) = [3]> then\n    hide\n    set [ghost v] effect to (100)\n    switch costume to (words v)\n    wait until <(Saturn-Rings) = [true]>\n    go to x: (0) y: (-100)\n    show\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\nend\nif <(#) = [4]> then\n    go to x: (0) y: (0)\n    set size to (100) %\n    go to [back v] layer\n    show\n    switch costume to (backdrop v)\nend\nif <(#) = [5]> then\n    go to [back v] layer\n    go [forward v] (1) layers\n    set size to (pick random (10) to (30)) %\n    if <not <touching color (#000000)?>> then\n        show\n    end\n    if <(x position) > [0]> then\n        repeat until <(x position) < [0]>\n            point in direction (-90)\n            move (10) steps\n        end\n    else\n        repeat until <(x position) > [0]>\n            point in direction (90)\n            move (10) steps\n        end\n    end\n    delete this clone\nend\n\ndefine Clone (#)\nrepeat (#)\n    change [# v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nstart sound [Triumph v]\n\nwhen flag clicked\nset [saturn-rings v] to [false]\nset [# v] to [0]\nClone [4]\n\n
✦ Controls ✦\n➥ PC, arrow keys.\n➥ Mobile, touch.\n\n✦ Dangers ✦\n➥ Spikes.\n➥ Lava.\n\n✦ Tips ✦\n➥ Pay attention to spikes, as they blend in with the surroundings.\n➥ Love, Fav, and Follow.\n➥ Have fun.