Moon Platformer (Mobile friendly) 


@Stage\n\nwhen flag clicked\nhide variable [☁ highscore v]\nhide variable [time v]\nset volume to (13) %\nswitch backdrop to (moon v)\nforever\n    play sound [Chill v] until done\nend\n\nwhen I receive [next level v]\nnext backdrop\n\nwhen I receive [change off/on volume  v]\nif <(volume) = [13]> then\n    set volume to (0) %\nelse\n    if <(volume) = [0]> then\n        set volume to (13) %\n    end\nend\n\nwhen flag clicked\nset [time stop/play v] to [True]\nset [time v] to [0]\nforever\n    if <(Cheats?Y/N:) = [No]> then\n        if <(Time Stop/Play) = [True]> then\n            change [time v] by (1)\n            wait (1) seconds\n        else\n            stop [this script v]\n        end\n    else\n        set [time v] to [-]\n        stop [this script v]\n    end\nend\n\nwhen I receive [and... time! v]\nif <<(Time) < (☁ Highscore)> and <(Cheats?Y/N:) = [No]>> then\n    set [☁ highscore v] to (Time)\nend\nshow variable [time v]\nshow variable [☁ highscore v]\n\n@Player\n\ndefine Move - in steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((Speed X) / (steps))\n    if <<touching (level v)?> or <<touching (door v)?> or <touching (laser beam v)?>>> then\n        set x to (Last Value)\n        set [speed x v] to [0]\n    end\n    set [last value v] to (y position)\n    change y by ((Speed Y) / (steps))\n    if <<touching (level v)?> or <<touching (door v)?> or <touching (laser beam v)?>>> then\n        set y to (Last Value)\n        if <(Speed Y) < [0]> then\n            set [falling v] to [0]\n        end\n        set [speed y v] to [0]\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nset rotation style [left-right v]\nswitch costume to (costume1 v)\nset [scene # v] to [1]\nset [gravity v] to [-0.4]\nset [jump force v] to [12]\nset [acceleration v] to [2]\nset [resistance v] to [0.8]\nset [speed y v] to [0]\ngo to x: (-150) y: (30)\nforever\n    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <(stick y) > [0.5]>>> then\n        create clone of (_myself_ v)\n        if <(Falling) < [3]> then\n            set [speed y v] to [10]\n        end\n    end\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <(Stick x) < [-0.5]>>> then\n        create clone of (_myself_ v)\n        point in direction (-90)\n        change [speed x v] by ((0) - (ACCELERATION))\n    end\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <(Stick x) > [0.5]>>> then\n        create clone of (_myself_ v)\n        point in direction (90)\n        change [speed x v] by (ACCELERATION)\n    end\n    set [speed x v] to ((Speed X) * (RESISTANCE))\n    change [speed y v] by (GRAVITY)\n    Move - in steps (([abs v] of (Speed X) ) + ([abs v] of (Speed Y) ))\nend\n\nwhen I receive [next level v]\nwait (0) seconds\nif <(Normal) = [True]> then\n    go to x: (-223) y: (-90)\n    clear graphic effects\nelse\n    if <(Normal) = [False]> then\n        go to x: (-218) y: (-56)\n        clear graphic effects\n    end\nend\n\nwhen I receive [respawn v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nwait (0) seconds\ngo to x: (-187) y: (-76)\nclear graphic effects\n\nwhen I start as a clone\nrepeat (8)\n    change [ghost v] effect by (15)\nend\ndelete this clone\n\nwhen flag clicked\nwait until <(Actions \(love/fave\)) = [2]>\nwait (1.9) seconds\nwait until <(Another Setup Variable) = [True]>\nswitch costume to (different player skin v)\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\n    wait (0) seconds\nend\n\nwhen flag clicked\nset [normal v] to [True]\nforever\n    if <touching (next scene messanger v)?> then\n        set volume to (20) %\n        play sound [Low Whoosh v] until done\n    end\nend\n\nwhen flag clicked\nset [actions \(love/fave\) v] to [0]\nwait until <touching (level v)?>\nset [advertise setup v] to [True]\n\nwhen flag clicked\nset [distance v] to [0]\nforever\n    if <touching (lava v)?> then\n        set volume to (20) %\n        play sound [High Whoosh v] until done\n    end\nend\n\nwhen flag clicked\nwait until <(Distance) = [100]>\nwait until <<<(x position) > [104]> and <(y position) < [-35]>> and <[inventory v] contains [Key]?>>\nset [distance v] to [104]\n\nwhen flag clicked\nforever\n    if <<key (down arrow v) pressed?> or <<key (s v) pressed?> or <(stick y) < [-0.5]>>> then\n        if <not <(Actions \(love/fave\)) = [2]>> then\n            switch costume to (player crouch v)\n        else\n            if <(Actions \(love/fave\)) = [2]> then\n                switch costume to (different player skin crouch v)\n            end\n        end\n    else\n        if <not <(Actions \(love/fave\)) = [2]>> then\n            switch costume to (player v)\n        else\n            if <(Actions \(love/fave\)) = [2]> then\n                if <(Another Setup Variable) = [True]> then\n                    switch costume to (different player skin v)\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [another setup variable v] to [False]\nwait until <(Actions \(love/fave\)) = [2]>\nwait (1) seconds\nset [another setup variable v] to [True]\nstop [this script v]\n\nwhen flag clicked\nforever\n    wait until <touching (jump-launcher v)?>\n    wait (0.12) seconds\n    repeat (15)\n        change y by (20)\n    end\n    wait until <not <touching (jump-launcher v)?>>\nend\n\nwhen flag clicked\nforever\n    wait until <touching (spike v)?>\n    broadcast (Lose to Spike v)\n    start sound [Crunch v]\n    wait until <not <touching (spike v)?>>\nend\n\nwhen I receive [lose to spike v]\nwait (.01) seconds\ngo to x: (-187) y: (-76)\nclear graphic effects\n\nwhen flag clicked\nforever\n    wait until <touching (ginormous spikes to kill the player!  v)?>\n    broadcast (Lose to Spike v)\n    start sound [Crunch v]\n    wait until <not <touching (ginormous spikes to kill the player!  v)?>>\nend\n\nwhen flag clicked\nforever\n    wait until <touching (laser v)?>\n    broadcast (Respawn v)\n    start sound [High Whoosh v]\n    wait until <not <touching (laser v)?>>\nend\n\n@Level\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (scene 1 v)\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [2]> then\n        set [void setup v] to [2000]\n    else\n        set [void setup v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [3]> then\n        broadcast (Show Lava v)\n        set [skip location v] to [Lava]\n    else\n        broadcast (Hide Lava v)\n        set [skip location v] to [Normal]\n    end\nend\n\nwhen flag clicked\ngo to x: (36) y: (28)\nwait until <(costume [number v]) = [4]>\nif <(costume [number v]) = [4]> then\n    broadcast (Show Door v)\n    broadcast (Show Key v)\n    set [distance v] to [100]\nelse\n    broadcast (Hide Door v)\n    broadcast (Hide Key v)\n    set [distance v] to [0]\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [5]> then\n        set [normal v] to [False]\n    else\n        set [normal v] to [True]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [6]> then\n        broadcast (Show Jump Boost v)\n        broadcast (Show Spike v)\n    else\n        broadcast (Hide Jump boost v)\n        broadcast (Hide Spike v)\n    end\nend\n\nwhen flag clicked\nwait until <(costume [number v]) = [7]>\nbroadcast (Dismiss AD v)\n\nwhen flag clicked\nset [laser setup v] to [No]\nforever\n    if <(costume [number v]) = [7]> then\n        broadcast (Show Enourmous v)\n    else\n        broadcast (Hide Enormous Spikes v)\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\n\nwhen flag clicked\nforever\n    if <not <(costume [number v]) = [4]>> then\n        broadcast (Hide Key v)\n        broadcast (Hidden Doorway v)\n    end\nend\n\nwhen flag clicked\nwait until <(costume [number v]) = [8]>\nif <(costume [number v]) = [8]> then\n    broadcast (Show Deadly Laser v)\nend\n\nwhen flag clicked\nwait until <(costume [number v]) = [8]>\nif <(costume [number v]) = [8]> then\n    wait until <not <(costume [number v]) = [8]>>\n    set [laser setup v] to [Yes]\nend\n\nwhen flag clicked\nwait until <(costume [number v]) = [9]>\nbroadcast (Hide Skip Button v)\nbroadcast (And... Time! v)\nset [time stop/play v] to [False]\n\n@Next Scene Messanger\n\nwhen flag clicked\nset [normal v] to [True]\nset [ghost v] effect to (100)\nforever\n    wait until <touching (player v)?>\n    broadcast (Next Level v)\n    wait until <not <touching (player v)?>>\n    wait (0) seconds\nend\n\n@Void\n\nwhen flag clicked\nset [void setup v] to [0]\ngo to [front v] layer\nset [ghost v] effect to (100)\nforever\n    if <(Void Setup) = [2000]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (void v)\nforever\n    if <touching (player v)?> then\n        broadcast (Respawn v)\n        wait until <not <touching (player v)?>>\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nshow\nforever\n    show\n    go to x: (0) y: (0)\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@Lava\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (36) y: (28)\nhide\n\nwhen I receive [hide lava v]\ngo to x: (36) y: (28)\nhide\n\nwhen I receive [show lava v]\nbroadcast (Void 3.0 v)\nshow\n\n@Void 3.0\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        broadcast (Respawn v)\n        wait until <not <touching (player v)?>>\n    end\nend\n\nwhen flag clicked\nset [void setup v] to [0]\ngo to [front v] layer\nset [ghost v] effect to (100)\nforever\n    if <(Void Setup) = [1000]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [void 3.0 v]\nset [void setup v] to [1000]\n\n@Love and Favorite Reward!\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nset [actions \(love/fave\) v] to [0]\nforever\n    set [touching v] to [none]\n    Detect [love] at [-201] [-220]\n    Detect [fave] at [-201] [-220]\nend\n\ndefine Detect (thing) at (x) (y)\nswitch costume to (empty v)\nset size to (27000) %\ngo to x: (x) y: (y)\nset size to (100) %\nswitch costume to (thing)\nif <touching (mouse-pointer v)?> then\n    set [touching v] to (costume [name v])\nend\n\nwhen flag clicked\nforever\n    wait until <(touching) = [love]>\n    wait (0.2) seconds\n    if <(touching) = [love]> then\n        change [actions \(love/fave\) v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    wait until <(touching) = [fave]>\n    wait (0.2) seconds\n    if <(touching) = [fave]> then\n        change [actions \(love/fave\) v] by (1)\n        stop [this script v]\n    end\nend\n\n@Thank you, message.\n\nwhen flag clicked\nhide\nwait (1) seconds\nwait until <(Actions \(love/fave\)) = [2]>\nwait (1) seconds\ngo to x: (-1) y: (13)\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (1.3) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Control Stick\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset [max stick v] to ((size) / (4))\nset size to (100) %\nset [myself v] to [Control Stick]\nswitch costume to (base v)\nset [ghost v] effect to (60)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (stick v)\ngo [forward v] (1) layers\nset [ghost v] effect to (25)\nforever\n    set [stick power v] to []\n    set [stick x v] to [0]\n    set [stick y v] to [0]\n    repeat until <mouse down?>\n        go to (Myself)\n    end\n    if <(distance to [mouse-pointer v]) < ((size) * (0.6))> then\n        Stick Drag\n    else\n        wait until <not <mouse down?>>\n    end\nend\n\ndefine Stick Drag\nrepeat until <not <mouse down?>>\n    go to (mouse-pointer v)\n    point towards (Myself)\n    turn right (180) degrees\n    set [stick direction v] to (direction)\n    set [stick power v] to (distance to [(Myself) v])\n    if <(Stick Power) > (Max stick)> then\n        move ((Max stick) - (Stick Power)) steps\n        set [stick power v] to (Max stick)\n    end\n    set [stick power v] to ((Stick Power) / (Max stick))\n    set [stick x v] to ((Stick Power) * ([sin v] of (Stick Direction) ))\n    set [stick y v] to ((Stick Power) * ([cos v] of (Stick Direction) ))\nend\n\n@AD\n\nwhen flag clicked\nhide\nwait (1) seconds\ngo to x: (-175) y: (180)\nshow\nrepeat (13)\n    change y by (-10.8)\nend\nwait (0) seconds\nrepeat (2)\n    change y by (10)\nend\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        start sound [Low Whoosh v]\n        repeat (20)\n            change y by (10.8)\n        end\n        hide\n        stop [this script v]\n    end\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (18)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Actions \(love/fave\)) = [2]> then\n        wait (1) seconds\n        repeat (14)\n            change y by (10)\n        end\n        hide\n    end\nend\n\nwhen I receive [dismiss ad v]\nwait (.5) seconds\nrepeat (14)\n    change y by (10)\nend\nhide\n\n@Door\n\nwhen I receive [show door v]\nshow\nwait until <<<<touching (mouse-pointer v)?> and <mouse down?>> and <[inventory v] contains [Key]?>> or <<(Distance) = [104]> and <[inventory v] contains [Key]?>>>\nbroadcast (Hide Door v)\nbroadcast (Hide Key v)\ndelete (1) of [inventory v]\n\nwhen I receive [hide door v]\nswitch costume to (costume2 v)\nwait (0) seconds\nclear graphic effects\nstart sound [Door Closing v]\nrepeat (4)\n    change [ghost v] effect by (25)\nend\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\ndelete all of [inventory v]\nhide\n\nwhen I receive [open door v]\nplay sound [Door Closing v] until done\nhide\n\nwhen I receive [hidden doorway v]\nhide\n\n@Key\n\nwhen flag clicked\nswitch costume to (key v)\npoint in direction (90)\nhide\ngo to x: (-91) y: (142)\ngo to [front v] layer\nset size to (70) %\nforever\n    if <touching (player v)?> then\n        start sound [Collect v]\n        add [Key] to [inventory v]\n        forever\n            go to (player v)\n            change x by (36)\n        end\n    end\nend\n\nwhen I receive [show key v]\nshow\n\nwhen I receive [hide key v]\nhide\n\n@Jump-Launcher\n\nwhen I receive [hide jump boost v]\nhide\n\nwhen I receive [show jump boost v]\nshow\n\nwhen flag clicked\nswitch costume to (middle v)\ngo to x: (36) y: (28)\n\n@Spike\n\nwhen flag clicked\nhide\ngo to x: (124) y: (-95)\n\nwhen I receive [show spike v]\nshow\n\nwhen I receive [hide spike v]\nhide\n\n@Ginormous Spikes to Kill the player! \n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (ginormous spikes to kill the player!  v)\n\nwhen I receive [hide enormous spikes v]\ngo to [back v] layer\nhide\n\nwhen I receive [show enourmous v]\ngo to [front v] layer\nshow\n\n@Skip \n\nwhen flag clicked\nset [warnings passed y/n: v] to [No]\nset [cheats time warning: v] to [Yes]\nset [cheats?y/n: v] to [No]\nset [actions \(love/fave\) v] to [0]\ngo to x: (179) y: (-147)\nhide\ngo to [front v] layer\nwait until <(Actions \(love/fave\)) = [2]>\nwait (1) seconds\nset [ghost v] effect to (53)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (80) %\n    else\n        set size to (75) %\n    end\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <(Cheats Time Warning:) = [Yes]> then\n            broadcast (Show Cheats Time Warning: v) and wait\n        end\n        wait until <<(Cheats?Y/N:) = [Yes]> and <(Warnings Passed Y/N:) = [Yes]>>\n        if <<(Cheats?Y/N:) = [Yes]> and <(Warnings Passed Y/N:) = [Yes]>> then\n            set size to (75) %\n            wait (.1) seconds\n            set size to (85) %\n            broadcast (Next Level v)\n            wait until <not <mouse down?>>\n        end\n    end\nend\n\nwhen flag clicked\nset [skip location v] to [Normal]\nforever\n    if <(Skip location) = [Normal]> then\n        go to x: (179) y: (-148.5)\n    else\n        if <(Skip location) = [Lava]> then\n            go to x: (15) y: (-148.5)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <touching (mouse-pointer v)?>> then\n        set size to (75) %\n    end\nend\n\nwhen I receive [cheats off/h w v]\nhide\n\nwhen I receive [cheats off/h w v]\nhide\n\nwhen I receive [hide skip button v]\ngo to x: (-240) y: (180)\nhide\n\n@Music/volume\n\nwhen flag clicked\nset size to (100) %\nset [ghost v] effect to (30)\nswitch costume to (music/volume on v)\ngo to x: (205) y: (138)\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (Change off/on volume  v)\n        next costume\n        wait until <not <mouse down?>>\n    end\n    if <touching (mouse-pointer v)?> then\n        set size to (110) %\n    else\n        set size to (100) %\n    end\nend\n\n@Laser\n\nwhen flag clicked\ngo to x: (36) y: (28)\nhide\n\nwhen I receive [show deadly laser v]\nrepeat until <(Laser Setup) = [Yes]>\n    show\n    wait (.8) seconds\n    hide\n    wait (1) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Laser Setup) = [Yes]> then\n        hide\n    end\nend\n\n@Laser Beam\n\nwhen I receive [show deadly laser v]\nshow\n\nwhen flag clicked\nhide\nforever\n    if <(Laser Setup) = [Yes]> then\n        hide\n    end\nend\n\n@Warning\n\nwhen flag clicked\ngo to x: (26) y: (32)\nhide\n\nwhen I receive [show cheats time warning: v]\nbroadcast (Choices choose v)\ngo to x: (26) y: (32)\nshow\ngo to [front v] layer\n\nwhen I receive [hide all warnings v]\nset [cheats time warning: v] to [No]\nhide\n\n@Yes, allow cheats\n\nwhen I receive [choices choose v]\nshow\ngo to [front v] layer\ngo to x: (36) y: (28)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (25)\n    else\n        set [brightness v] effect to (0)\n    end\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [warnings passed y/n: v] to [Yes]\n        set [cheats?y/n: v] to [Yes]\n        broadcast (Hide all Warnings v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [hide all warnings v]\nhide\n\n@No, do not allow cheats\n\nwhen I receive [choices choose v]\nshow\ngo to [front v] layer\ngo to x: (36) y: (28)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (25)\n    else\n        set [brightness v] effect to (0)\n    end\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [warnings passed y/n: v] to [Yes]\n        set [cheats?y/n: v] to [No]\n        broadcast (Hide all Warnings v)\n        broadcast (Cheats off/H W v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [hide all warnings v]\nhide\n\n@Thank you, message.2\n\nwhen flag clicked\nhide\n\n