Alone - Platformer


@Stage\n\nwhen I receive [message1 v]\nnext backdrop\nbroadcast (nextbackdr v)\n\nwhen flag clicked\nswitch backdrop to (backdrop15 v)\n\nwhen flag clicked\nwait (7) seconds\nset volume to (100) %\nforever\n    play sound [TA-Game Over v] until done\nend\n\n@Character\n\nwhen flag clicked\nhide\nwait (7) seconds\nset [deaths v] to [0]\nhide variable [time v]\ngo to x: (-176) y: (-67)\nshow\nswitch costume to (costume2 v)\nset size to (25) %\nset [yv v] to [0]\nset [xv v] to [0]\nforever\n    if <key (left arrow v) pressed?> then\n        switch costume to (costume3 v)\n        change [xv v] by (-0.5)\n    end\n    if <key (right arrow v) pressed?> then\n        switch costume to (costume2 v)\n        change [xv v] by (0.5)\n    end\n    change x by (Xv)\n    set [xv v] to ((Xv) * (0.9))\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change y by (1)\n                            if <touching color (#000000)?> then\n                                change y by (1)\n                                if <touching color (#000000)?> then\n                                    change y by (1)\n                                    if <touching color (#000000)?> then\n                                        if <key (up arrow v) pressed?> then\n                                            if <(Xv) > [0]> then\n                                                set [xv v] to [-7]\n                                            else\n                                                set [xv v] to [7]\n                                            end\n                                            set [yv v] to [10]\n                                        else\n                                            set [xv v] to ((Xv) * (-1.3))\n                                            change x by (Xv)\n                                            set [xv v] to [0]\n                                            change x by ((Xv) / (5))\n                                        end\n                                        change y by (-4)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-0.5)\n    change y by (Yv)\n    if <touching color (#000000)?> then\n        set [yv v] to ((Yv) * (-0.25))\n        change y by (Yv)\n        if <touching color (#000000)?> then\n            change y by (Yv)\n            if <touching color (#000000)?> then\n                change y by (Yv)\n                if <touching color (#000000)?> then\n                    change y by (Yv)\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <<touching color (#000000)?> and <key (up arrow v) pressed?>> then\n        set [yv v] to [10]\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nset [timer v] to [0]\nwait (7) seconds\nrepeat until <(Level) = [15]>\n    change [timer v] by (0.1)\nend\n\nwhen I receive [new v]\ngo to x: (-176) y: (-67)\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        change [deaths v] by (1)\n        go to x: (-176) y: (-67)\n        play sound [Death Noise v] until done\n    end\nend\n\nwhen flag clicked\nif <key (c v) pressed?> then\n    switch costume to (costume4 v)\nend\n\nwhen I receive [done v]\nhide variable [deaths v]\nhide variable [time v]\n\nwhen flag clicked\nforever\n    if <touching color (#ffe9cc)?> then\n        change [deaths v] by (1)\n        go to x: (-176) y: (-67)\n        play sound [Death Noise v] until done\n    end\nend\n\nwhen I receive [challenge v]\ngo to x: (-176) y: (-67)\nset [time v] to [10]\nrepeat (10)\n    wait (1) seconds\n    change [time v] by (-1)\nend\nif <(Time) = [0]> then\n    broadcast (nope v)\nend\nif <(Time) > [0]> then\n    broadcast (yay v)\nend\n\nwhen I receive [challenge v]\nshow variable [time v]\n\nwhen I receive [nextbackdr v]\ngo to x: (-176) y: (-67)\n\nwhen flag clicked\nif <key (space v) pressed?> then\n    next costume\nend\n\nset [color v] effect to (0)\n\n@Thumbnail\n\nwhen flag clicked\nset [level v] to [0]\nhide\nwait (2) seconds\ngo to x: (0) y: (0)\nshow\nbroadcast (dpe v)\nwait (5) seconds\nhide\n\n@Portal\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset size to (70) %\ngo to x: (179) y: (6)\n\nwhen flag clicked\nforever\n    if <touching (character v)?> then\n        broadcast (message1 v)\n        change [level v] by (1)\n    end\n    if <(Level) = [4]> then\n        broadcast (NoQuantumText v)\n    end\n    if <(Level) = [5]> then\n        broadcast (NoQuantamText2 v)\n    end\n    if <(Level) = [6]> then\n        broadcast (QuantumBrain v)\n    end\n    if <(Level) = [11]> then\n        broadcast (QuantumBrain2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    show\nend\n\n@Intro\n\nwhen flag clicked\nerase all\nclear graphic effects\nset [0 intro xv v] to [50]\nset [0 intro yv v] to [15]\ncreate clone of (_myself_ v)\nshow\nswitch costume to (3051823_60x60 v)\ngo to x: (pick random (-200) to (200)) y: (-180)\nset size to (100) %\nrepeat (75)\n    go to [front v] layer\n    change x by (0 intro Xv)\n    change y by (0 intro Yv)\n    change [0 intro yv v] by (((50) - (y position)) / (10))\n    set [0 intro yv v] to ((0 intro Yv) * (0.8))\n    change [0 intro xv v] by (((0) - (x position)) / (10))\n    set [0 intro xv v] to ((0 intro Xv) * (0.8))\n    change size by ((([abs v] of (0 intro Yv) ) + ([abs v] of (0 intro Xv) )) / (5))\nend\nbroadcast (start v)\ngo to [front v] layer\n\nwhen I receive [start v]\nwait (0) seconds\nset x to (AMMMHSD)\nwait (0.5) seconds\nhide\nswitch costume to (costume2 v)\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nset size to (105) %\nforever\n    go to x: (0) y: (0)\n    show\nend\n\nwhen I receive [start v]\nrepeat (5)\n    change [brightness v] effect by (20)\nend\nrepeat (5)\n    change [ghost v] effect by (20)\nend\ndelete this clone\n\n@Text\n\nwhen flag clicked\nswitch costume to (text1 v)\nhide\nwait (7) seconds\ngo to x: (114) y: (19)\nshow\nforever\n    set [ghost v] effect to (ghost)\n    point in direction ((([cos v] of ((timer) * (250)) ) * (4)) + (90))\nend\n\nwhen I receive [message1 v]\nnext costume\n\nwhen I receive [noquantumtext v]\nhide\n\nwhen I receive [noquantamtext2 v]\nswitch costume to (text5 v)\nshow\n\nwhen I receive [quantumbrain v]\nhide\n\ndefine Mechanics <sin> (cos) Tan\nerase all\nstamp\n\nwhen I receive [quantumbrain2 v]\nswitch costume to (text6 v)\nshow\n\n@Clouds\n\nwhen flag clicked\nset [ghost v] effect to (0)\nforever\n    hide\n    create clone of (_myself_ v)\n    wait (pick random (1.5) to (3)) seconds\nend\n\nwhen I start as a clone\nshow\nswitch costume to (pick random (1) to (5))\nif <(pick random (1) to (2)) = [2]> then\n    set [d v] to [-250]\nelse\n    set [d v] to [250]\nend\ngo to x: (d) y: (pick random (90) to (170))\nset [ghost v] effect to (pick random (40) to (70))\nif <(d) = [250]> then\n    repeat until <(x position) < [-267]>\n        change x by (pick random (-1) to (-3))\n        go to [back v] layer\n        go to [back v] layer\n        go [backward v] (999) layers\n    end\nelse\n    repeat until <(x position) > [267]>\n        change x by (pick random (1) to (3))\n        go to [back v] layer\n        go to [back v] layer\n        go [backward v] (999) layers\n    end\nend\ndelete this clone\n\nwhen I receive [setup v]\ndelete this clone\n\n@TimerHitbox\n\nwhen flag clicked\nwait (7) seconds\nset [timer v] to [0]\nshow variable [timer v]\nshow variable [☁ highscore v]\nchange [timer v] by (0.1)\nwait (0.1) seconds\nif <(Level) = [15]> then\n    if <(☁ Highscore) < (Timer)> then\n        set [☁ highscore v] to (Timer)\n    end\n    stop [this script v]\nend\n\n