Geometry Dash Platformer (Scrolling) v0.1.11

Instructions: Press [W] or up arrow to jump, [A] or left arrow to go left, [D] or right arrow to go right.\nPress the star and the heart to reduce lag (totally works, very real)\nAvoid spikes.\nIn ship mode, you can fly by holding w or up arrow.\nGeometry Dash: a platformer!\n\nChangelog:\nVersion 0.1.11 (8/19/2023)\n-Added a "return to menu" button when you complete the level.\n-The cube now jumps at a consistent height instead of varying based on how long the button is held.\n-The cube no longer spins when jumping without moving left or right.\n\nVersion 0.1.10 (6/4/2023)\n-Improved FPS and fixed lag!\n-New level complete screen!\n-Updated many menu sprites.\n-Adjusted icon sprites to have rounded edges.\n-Level 1 name changed to "Stereo Adventure" from "Stereo Madness 2".\n-Nerfed first level to be more fair and less annoying.\n-Fixed a bug that caused the player to sometimes stick to walls.\n\nVersion 0.1.9\n-Adjusted the physics to be less floaty and slow and more like the real Geometry Dash game.\n-Level adjusted to account for physics change.\n\nVersion 0.1.8 (4/3/2021)\n-Added Michigun's icon.\n\nVersion 0.1.7\n-Added new very cool and epic thumbnail.\n\nVersion 0.1.6\n-Added a new icon for @KingCuddles314.\n\nVersion 0.1.5\n-Added unique ship sprites for 3 of the icons.\n\nVersion 0.1.4\n-Added a level select menu (even though there's only one level).\n\nVersion 0.1.3\n-The cube spinning is smoother and lands on the correct side always.\n\nVersion 0.1.2\n-The cube now lands on the correct side when it lands (for the most part).\n\nVersion 0.1.1\n-The cube now spins.

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [menu v]\nswitch backdrop to (backdrop2 v)\n\n@Title\n\nwhen I receive [game start v]\nhide\n\nwhen I receive [menu v]\ngo to x: (0) y: (115)\nshow\n\nwhen flag clicked\nhide\nset size to (90) %\n\n@Title2\n\nwhen flag clicked\nhide\n\nwhen I receive [game start v]\nhide\n\nwhen I receive [menu v]\ngo to x: (0) y: (65)\nshow\n\n@Play Button\n\nwhen flag clicked\nhide\n\nwhen I receive [menu v]\nshow\nwait until <<touching (mouse-pointer v)?> and <mouse down?>>\nbroadcast (Level Menu v)\nhide\n\nwhen I receive [level menu v]\nhide\n\n@Hitbox\n\nwhen flag clicked\nhide\n\nwhen I receive [game start v]\nif <(Music) = [1]> then\n    if <(Play) = [1]> then\n        start sound [explode v]\n    else\n        start sound [Start v]\n    end\nend\nshow\nset [game mode v] to [1]\nset [scroll x v] to [0]\nset [player x v] to [0]\nset [player y v] to [-43]\nset [velocity x v] to [0]\nset [velocity y v] to [0]\nset [debug v] to [0]\nset [can jump? v] to [0]\nset [play v] to [1]\nbroadcast (Load Level v) and wait\nPosition Player\nforever\n    broadcast (tick v) and wait\nend\n\ndefine Position Player\ngo to x: ((Player X) - (Scroll X)) y: (Player Y)\n\ndefine Do Player Tick\nif <<(username) = [MrPotatoHead321]> and <<key (z v) pressed?> and <key (m v) pressed?>>> then\n    set [debug v] to [1]\nend\nif <(Game Mode) = [1]> then\n    switch costume to (le epic cube v)\n    set [velocity x v] to [0]\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <(Button Left) = [1]>> then\n        set [velocity x v] to [-5]\n        set [direction v] to [0]\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <(Button Right) = [1]>> then\n        set [velocity x v] to [5]\n        set [direction v] to [1]\n    end\n    if <<(Velocity X) = [0]> and <(Can Jump?) = [1]>> then\n        set [direction v] to [2]\n    end\n    if <<<touching (spikes v)?> or <<(y position) < [-100]> and <touching (_edge_ v)?>>> and <(Debug) = [0]>> then\n        broadcast (game start v)\n    end\n    if <(Can Jump?) > [0]> then\n        change [can jump? v] by (-1)\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(Button Jump) = [1]>> then\n            set [velocity y v] to [12]\n        end\n    end\n    if <touching (end v)?> then\n        broadcast (game end v)\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\n    Move Player (Velocity X) (0)\n    change [velocity y v] by (-1)\n    Move Player (0) (Velocity Y)\n    set [scroll x v] to (round ((((Scroll X) * (7)) + (Player X)) / (8)))\n    if <(Scroll X) < [0]> then\n        set [scroll x v] to [0]\n    end\n    Position Player\n    if <touching (ship portals v)?> then\n        set [game mode v] to [2]\n    end\nend\nif <(Game Mode) = [2]> then\n    switch costume to (le epic ship v)\n    set [velocity x v] to [0]\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <(Button Left) = [1]>> then\n        set [velocity x v] to [-5]\n        set [direction v] to [0]\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <(Button Right) = [1]>> then\n        set [velocity x v] to [5]\n        set [direction v] to [1]\n    end\n    if <<<touching (spikes v)?> or <<(y position) < [-100]> and <touching (_edge_ v)?>>> and <(Debug) = [0]>> then\n        broadcast (game start v)\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(Button Jump) = [1]>> then\n        if <(Velocity Y) < [6.5]> then\n            change [velocity y v] by (1.5)\n        end\n    end\n    Move Player (Velocity X) (0)\n    if <(Velocity Y) > [-6.5]> then\n        change [velocity y v] by (-0.75)\n    end\n    Move Player (0) (Velocity Y)\n    set [scroll x v] to (round ((((Scroll X) * (7)) + (Player X)) / (8)))\n    if <(Scroll X) < [0]> then\n        set [scroll x v] to [0]\n    end\n    Position Player\n    if <touching (cube portals v)?> then\n        set [game mode v] to [1]\n    end\nend\nif <(Game Mode) = [3]> then\n    switch costume to (le epic cube v)\n    set [velocity x v] to [0]\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <(Button Left) = [1]>> then\n        set [velocity x v] to [-5]\n        set [direction v] to [0]\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <(Button Right) = [1]>> then\n        set [velocity x v] to [5]\n        set [direction v] to [1]\n    end\n    if <<<touching (spikes v)?> or <<(y position) < [-100]> and <touching (_edge_ v)?>>> and <(Debug) = [0]>> then\n        broadcast (game start v)\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(Button Jump) = [1]>> then\n        set [velocity y v] to [7.5]\n    end\n    if <touching (end v)?> then\n        broadcast (game end v)\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\n    Move Player (Velocity X) (0)\n    change [velocity y v] by (-1)\n    Move Player (0) (Velocity Y)\n    set [scroll x v] to (round ((((Scroll X) * (7)) + (Player X)) / (8)))\n    if <(Scroll X) < [0]> then\n        set [scroll x v] to [0]\n    end\n    Position Player\n    if <touching (ship portals v)?> then\n        set [game mode v] to [2]\n    end\nend\n\ndefine Move Player (sx) (sy)\nchange [player x v] by (sx)\nchange [player y v] by (sy)\nPosition Player\nif <not <touching (level v)?>> then\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [velocity y v] to [0]\nend\nrepeat (8)\n    change [player y v] by (1)\n    Position Player\n    if <not <touching (level v)?>> then\n        set [can jump? v] to [1]\n        stop [this script v]\n    end\nend\nchange [player x v] by ((0) - (sx))\nchange [player y v] by ((-8) - (sy))\n\nwhen I receive [menu v]\nset [play v] to [0]\nstop [other scripts in sprite v]\nset size to (50) %\nset [ghost v] effect to (100)\nhide\n\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(Button Jump) = [1]>> then\n    set [velocity y v] to [15]\nend\n\nwait until <not <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <(Button Jump) = [1]>>>\n\nwhen I receive [tick v]\nDo Player Tick\n\nset [button jump v] to [0]\n\nchange [player x v] by (300)\n\n@Cube\n\nwhen flag clicked\nhide\n\nwhen I receive [game start v]\nshow\nset size to (50) %\npoint in direction (90)\nforever\n    if <touching (level v)?> then\n        set [touching level v] to [1]\n        wait until <not <touching (level v)?>>\n        wait (0.1) seconds\n    else\n        set [touching level v] to [0]\n    end\nend\n\nwhen I receive [tick v]\nCube Tick\n\nwhen I receive [menu v]\nshow\npoint in direction (90)\ngo to [front v] layer\ngo to x: (120) y: (-40)\nset size to (100) %\nforever\n    switch costume to (Player Costume)\nend\n\nwhen I receive [level menu v]\nstop [other scripts in sprite v]\nhide\n\ndefine Cube Tick\ngo to (hitbox v)\nset rotation style [all around v]\nif <(Touching Level) = [1]> then\n    if <<[45] < (direction)> and <[135] > (direction)>> then\n        point in direction (90)\n    else\n        if <<[-135] < (direction)> and <[-45] > (direction)>> then\n            point in direction (-90)\n        else\n            if <<[-45] < (direction)> and <[45] > (direction)>> then\n                point in direction (0)\n            else\n                point in direction (180)\n            end\n        end\n    end\nelse\n    if <not <(Direction) = [2]>> then\n        if <not <touching (level v)?>> then\n            if <(Touching Level) = [0]> then\n                if <(Direction) = [0]> then\n                    turn right (-10) degrees\n                else\n                    turn right (10) degrees\n                end\n            end\n        end\n    end\nend\nif <<(Game Mode) = [1]> or <(Game Mode) = [3]>> then\n    show\nelse\n    hide\nend\n\n@Ship\n\nwhen flag clicked\nhide\n\nwhen I receive [menu v]\nhide\npoint in direction (90)\nset rotation style [left-right v]\ngo to [front v] layer\ngo to x: (120) y: (-40)\nset size to (100) %\nswitch costume to (Player Costume)\n\nwhen I receive [game start v]\nswitch costume to (Player Costume)\nset size to (50) %\n\nwhen I receive [tick v]\nShip Tick\n\ndefine Ship Tick\ngo to (hitbox v)\nif <(Direction) = [0]> then\n    point in direction (-90)\nelse\n    point in direction (90)\nend\nif <(Game Mode) = [2]> then\n    show\nelse\n    hide\nend\n\n@Change Character2\n\nwhen flag clicked\nhide\n\nwhen I receive [game start v]\nhide\n\nwhen I receive [menu v]\nshow\ngo to x: (115) y: (-40)\n\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <not <(Player Costume) = [1]>> then\n            set [player costume v] to (([costume # v] of [cube v]) + (-1))\n        else\n            set [player costume v] to [14]\n        end\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\nend\n\nset [player costume v] to [1]\n\n@Change Character\n\nwhen flag clicked\nhide\n\nwhen I receive [game start v]\nhide\n\nwhen I receive [menu v]\nshow\ngo to x: (125) y: (-40)\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <not <(Player Costume) = [14]>> then\n            set [player costume v] to (([costume # v] of [cube v]) + (1))\n        else\n            set [player costume v] to [1]\n        end\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\nend\n\n@Frame\n\nwhen flag clicked\nhide\n\nwhen I receive [menu v]\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\n\n@Level\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\nset x to ([floor v] of ((Offset X) - (Scroll X)) )\nif <(x position) = ([floor v] of ((Offset X) - (Scroll X)) )> then\n    show\nelse\n    hide\nend\n\nwhen I receive [load level v]\ngo to x: (0) y: (0)\nhide\nswitch costume to (background1 v)\nset [offset x v] to [0]\nif <[0] = [0]> then\n    delete this clone\nend\nrepeat (19)\n    create clone of (_myself_ v)\n    change [offset x v] by (478)\n    next costume\nend\n\nwhen I receive [menu v]\nhide\n\nshow\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\nset x to ([floor v] of ((Offset X) - (Scroll X)) )\nif <(x position) = ([floor v] of ((Offset X) - (Scroll X)) )> then\n    show\nelse\n    hide\nend\n\nwhen I receive [load level v]\ngo to x: (0) y: (0)\nhide\nswitch costume to (background1 v)\nset [offset x v] to [0]\nif <[0] = [0]> then\n    delete this clone\nend\nrepeat (19)\n    create clone of (_myself_ v)\n    change [offset x v] by (478)\n    next costume\nend\n\nwhen I receive [menu v]\nhide\n\n@Cube Portals\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\nset x to ([floor v] of ((Offset X) - (Scroll X)) )\nif <(x position) = ([floor v] of ((Offset X) - (Scroll X)) )> then\n    show\nelse\n    hide\nend\n\nwhen I receive [menu v]\nhide\n\nwhen I receive [load level v]\ngo to x: (0) y: (0)\nhide\nswitch costume to (background1 v)\nset [offset x v] to [0]\nif <[0] = [0]> then\n    delete this clone\nend\nrepeat (19)\n    create clone of (_myself_ v)\n    change [offset x v] by (478)\n    next costume\nend\n\n@Ship Portals\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\nset x to ([floor v] of ((Offset X) - (Scroll X)) )\nif <(x position) = ([floor v] of ((Offset X) - (Scroll X)) )> then\n    show\nelse\n    hide\nend\n\nwhen I receive [menu v]\nhide\n\nwhen I receive [load level v]\ngo to x: (0) y: (0)\nhide\nswitch costume to (background1 v)\nset [offset x v] to [0]\nif <[0] = [0]> then\n    delete this clone\nend\nrepeat (19)\n    create clone of (_myself_ v)\n    change [offset x v] by (478)\n    next costume\nend\n\n@End\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\nset x to ([floor v] of ((Offset X) - (Scroll X)) )\nif <(x position) = ([floor v] of ((Offset X) - (Scroll X)) )> then\n    show\nelse\n    hide\nend\n\nwhen I receive [menu v]\nhide\n\nwhen I receive [load level v]\ngo to x: (0) y: (0)\nhide\nswitch costume to (background1 v)\nset [offset x v] to [0]\nif <[0] = [0]> then\n    delete this clone\nend\nrepeat (19)\n    create clone of (_myself_ v)\n    change [offset x v] by (478)\n    next costume\nend\n\n@Line\n\nwhen flag clicked\nhide\n\nwhen I receive [game start v]\nshow\n\nwhen I receive [menu v]\ngo to x: (0) y: (0)\ngo to [front v] layer\nhide\n\n@Level Parts\n\nwhen I receive [menu v]\nhide\n\n@Mobile Mode\n\nwhen flag clicked\nhide\n\nwhen I receive [menu v]\ngo to x: (-200) y: (-140)\nswitch costume to (costume1 v)\nshow\nset [mobile mode v] to [0]\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        next costume\n        if <(Mobile Mode) = [0]> then\n            set [mobile mode v] to [1]\n        else\n            set [mobile mode v] to [0]\n        end\n    end\n    wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\nend\n\nwhen I receive [game start v]\nhide\n\nwhen I receive [level menu v]\nhide\n\n@Mobile Button\n\nwhen I receive [game start v]\nset [button left v] to [0]\nset [button right v] to [0]\nif <(Mobile Mode) = [1]> then\n    show\n    forever\n        if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(mouse x) > (x position)>> then\n            set [button right v] to [1]\n        else\n            if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(x position) > (mouse x)>> then\n                set [button left v] to [1]\n            else\n                set [button left v] to [0]\n                set [button right v] to [0]\n            end\n        end\n    end\nelse\n    hide\nend\n\nwhen I receive [menu v]\ngo to x: (-120) y: (-120)\nset size to (200) %\nhide\n\nwhen flag clicked\nhide\n\n@Jump Button\n\nwhen I receive [game start v]\nset [button jump v] to [0]\nif <(Mobile Mode) = [1]> then\n    show\n    forever\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            set [button jump v] to [1]\n        else\n            set [button jump v] to [0]\n        end\n    end\nelse\n    hide\nend\n\nwhen I receive [menu v]\ngo to x: (170) y: (-120)\nset size to (200) %\nhide\n\nwhen flag clicked\nhide\n\n@Music\n\nwhen flag clicked\nset [music v] to [1]\nhide\n\nwhen I receive [game start v]\nhide\nstop all sounds\n\nwhen I receive [menu v]\nstop all sounds\ngo to x: (-183) y: (-100)\nshow\nswitch costume to (costume1 v)\nwait until <(Play) = [0]>\nrepeat until <not <(Play) = [0]>>\n    if <(Music) = [1]> then\n        play sound [geometrydashmusicthingofdoom v] until done\n    end\nend\n\nwhen I receive [menu v]\nwait until <(Play) = [0]>\nrepeat until <not <(Play) = [0]>>\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <(Music) = [1]> then\n            set [music v] to [0]\n            stop all sounds\n            switch costume to (costume2 v)\n        else\n            set [music v] to [1]\n            switch costume to (costume1 v)\n        end\n    end\n    wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\nend\n\n@Banner\n\nwhen flag clicked\nhide\n\nwhen I receive [menu v]\nhide\n\nwhen I receive [game end v]\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen I receive [game start v]\nhide\n\n@Back Button\n\nwhen I receive [menu v]\nhide\n\nwhen I receive [game end v]\nset size to (150) %\ngo to x: (0) y: (-130)\nswitch costume to (costume2 v)\ngo to [front v] layer\ngo [forward v] (1) layers\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (menu v)\n    end\n    wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\nend\n\nwhen I receive [game start v]\nhide\n\nwhen flag clicked\nhide\n\n@Intro Text\n\nwhen flag clicked\nhide\ngo to x: (0) y: (-120)\n\nwhen I receive [do the thing 4 v]\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (2) seconds\nset [play v] to [0]\nset [game mode v] to [1]\nbroadcast (menu v)\nhide\n\n@Intro\n\nwhen I receive [do the thing 2 v]\nswitch costume to (thingy2 v)\nset [ship speed v] to [12]\nrepeat (4)\n    set [ship speed v] to ((ship speed) * (.8))\n    wait (0.01) seconds\n    change y by ((ship speed) * (-1))\n    move (ship speed) steps\n    turn left ((ship speed) / ((ship speed) * (0.9))) degrees\nend\nrepeat until <touching (_edge_ v)?>\n    set [ship speed v] to ((ship speed) * (1.1))\n    move (ship speed) steps\n    turn left ((ship speed) / ((ship speed) * (0.9))) degrees\nend\nrepeat (4)\n    set [ship speed v] to ((ship speed) * (1.1))\n    move (ship speed) steps\n    turn left ((ship speed) / ((ship speed) * (0.9))) degrees\nend\nrepeat until <touching (_edge_ v)?>\n    set [ship speed v] to ((ship speed) * (1.1))\n    move (ship speed) steps\n    turn left ((ship speed) / ((ship speed) * (0.9))) degrees\nend\nrepeat (8)\n    set [ship speed v] to ((ship speed) * (1.1))\n    move (ship speed) steps\n    turn left ((ship speed) / ((ship speed) * (0.9))) degrees\nend\nhide\nbroadcast (do the thing 3 v)\n\nwhen flag clicked\nswitch costume to (thingy v)\nhide\ngo to x: (-280) y: (-70)\n\nwhen I receive [do the thing v]\nset [ship speed v] to [3]\npoint in direction (115)\nshow\nrepeat (26)\n    move (ship speed) steps\n    set [ship speed v] to ((ship speed) * (1.09))\n    turn left ((ship speed) / ((ship speed) * (.9))) degrees\nend\nrepeat (8)\n    move (ship speed) steps\n    set [ship speed v] to ((ship speed) * (.4))\nend\nset [ship speed v] to [2]\nrepeat (12)\n    move ((ship speed) * (-1)) steps\n    set [ship speed v] to ((ship speed) * (1.1))\nend\ngo to x: (0) y: (-100)\n\nwhen I receive [menu v]\nhide\n\n@Intro Icon\n\nwhen flag clicked\ngo to x: (0) y: (0)\npoint in direction (0)\nhide\nset size to (0) %\nswitch costume to (cube v)\nshow\nset [intro v] to [30]\nrepeat (13)\n    turn right (intro) degrees\n    change size by (10)\n    change [intro v] by (-1)\nend\npoint in direction (0)\nrepeat (3)\n    change y by (5)\n    turn right (intro) degrees\n    change size by (10)\n    change [intro v] by (-1)\nend\nset [intro v] to [-10]\nrepeat (3)\n    change y by (5)\n    turn right (intro) degrees\n    change [intro v] by (-1)\nend\nrepeat (3)\n    change y by (5)\n    turn right (intro) degrees\n    change [intro v] by (-1)\nend\nrepeat (11)\n    change y by (2)\n    turn right (intro) degrees\n    change size by (-10)\n    change [intro v] by (-1)\nend\nbroadcast (do the thing v)\nchange size by (-2.5)\nturn right (-4) degrees\nwait (0.01) seconds\nchange size by (-2.5)\nturn right (-4) degrees\nwait (0.01) seconds\nchange size by (-2.5)\nturn right (-4) degrees\nwait (0.01) seconds\nchange size by (-2.5)\nturn right (-4) degrees\nwait (0.1) seconds\nchange size by (2.5)\nturn right (2) degrees\nwait (0.01) seconds\nchange size by (2.5)\nturn right (2) degrees\nwait (0.01) seconds\nchange size by (2.5)\nwait (0.01) seconds\nchange size by (2.5)\nwait (1.3) seconds\nglide (.2) secs to x: (0) y: (80)\nwait (0.1) seconds\nglide (.1) secs to x: (0) y: (-30)\nbroadcast (do the thing 2 v)\nhide\n\nwhen I receive [do the thing 3 v]\nset size to (0) %\nswitch costume to (gdicon3 v)\ngo to x: (0) y: (0)\npoint in direction (-150)\nset [intro v] to [30]\nshow\nrepeat (16)\n    turn right (intro) degrees\n    change size by (12)\n    change [intro v] by (-2)\n    wait (0.01) seconds\nend\nbroadcast (do the thing 4 v)\n\nwhen I receive [menu v]\nhide\n\n@Levels\n\nwhen flag clicked\nhide\n\nwhen I receive [level menu v]\nshow\nwait until <not <mouse down?>>\nwait until <mouse down?>\nbroadcast (game start v)\nhide\nstop all sounds\nwait until <(Play) = [1]>\nrepeat until <(Play) = [0]>\n    if <(Music) = [1]> then\n        play sound [Stereo Madness 2 v] until done\n    end\nend\n\nwhen I receive [menu v]\nstop all sounds\nhide\n\nwhen I receive [game end v]\nstop all sounds\nhide\n\nbroadcast (Load Level v)\n\nbroadcast (do the thing v) and wait\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@Debug Indicator\n\nwhen flag clicked\ngo to x: (-220) y: (160)\nhide\n\nwhen I receive [menu v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [game start v]\nhide\n\nwhen I receive [tick v]\ngo to [front v] layer\nif <(Debug) = [1]> then\n    show\nend\n\n