The Cube (Platformer)

Instructions: Controls:\nUse arrow keys\nUp - jump/swim up\nDown - swim down\nRight - go/swim right\nLeft - go/swim left

@Stage\n\nwhen flag clicked\nset [portallevel v] to [0]\n\nwhen backdrop switches to [backdrop19 v]\nset [portallevel v] to [1]\nwait until <not <(backdrop [number v]) = [21]>>\nset [portallevel v] to [0]\n\nwhen backdrop switches to [backdrop37 v]\nset [portallevel v] to [1]\nwait until <not <(backdrop [number v]) = [34]>>\nset [portallevel v] to [0]\n\n@The Cube\n\nwhen I receive [almost start... v]\nwait (0.1) seconds\nrepeat until <(Control) = [1]>\n    play sound [Clean_Bandit_-_Rather_Be_feat v] until done\nend\nrepeat until <(Control) = [0]>\n    play sound [Star Wars - The Imperial March.mp3 v] until done\nend\nrepeat until <(Control) = [1]>\n    play sound [Clean_Bandit_-_Rather_Be_feat v] until done\nend\nrepeat until <(Control) = [0]>\n    play sound [Star Wars - The Imperial March.mp3 v] until done\nend\nrepeat until <(Control) = [1]>\n    play sound [Intense serious v] until done\nend\nrepeat until <(Control) = [0]>\n    play sound [Fantasy v] until done\nend\nrepeat until <(Control) = [1]>\n    play sound [01 - Battle Belt v] until done\nend\nrepeat until <(Control) = [0]>\n    play sound [Action Hero v] until done\nend\n\nwhen I receive [megacube bossfight v]\nwait (1) seconds\nswitch backdrop to (bossfight megacube background v)\ngo to x: (-230) y: (-30)\nshow\n\nwait (0.5) seconds\n\nwhen flag clicked\nset [control v] to [0]\nhide\nswitch backdrop to (backdrop2 v)\nset [fails v] to [0]\nswitch costume to (costume2 v)\nset [x v] to [0]\nset [y v] to [0]\ngo to x: (-230) y: (-80)\n\nplay sound [Action Hero v] until done\n\nwhen I receive [start v]\nshow\nforever\n    if <key (right arrow v) pressed?> then\n        change [x v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <<touching color (#000000)?> or <<touching color (#00cc44)?> or <touching color (#663b00)?>>> then\n        change y by (1)\n        if <<touching color (#000000)?> or <<touching color (#00cc44)?> or <touching color (#663b00)?>>> then\n            change y by (1)\n            if <<touching color (#000000)?> or <<touching color (#00cc44)?> or <touching color (#663b00)?>>> then\n                change y by (1)\n                if <<touching color (#000000)?> or <<touching color (#00cc44)?> or <touching color (#663b00)?>>> then\n                    change y by (1)\n                    if <<touching color (#000000)?> or <<touching color (#00cc44)?> or <touching color (#663b00)?>>> then\n                        change y by (1)\n                        if <<touching color (#000000)?> or <<touching color (#00cc44)?> or <touching color (#663b00)?>>> then\n                            change x by ((x) * (-1))\n                            change y by (-5)\n                            if <key (up arrow v) pressed?> then\n                                if <(x) > [0]> then\n                                    set [x v] to [-5]\n                                else\n                                    set [x v] to [5]\n                                end\n                                set [y v] to [10]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (y)\n    if <<touching color (#000000)?> or <<touching color (#00cc44)?> or <touching color (#663b00)?>>> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<touching color (#000000)?> or <<touching color (#00cc44)?> or <touching color (#663b00)?>>> then\n        if <key (up arrow v) pressed?> then\n            set [y v] to [15]\n        end\n    end\n    change y by (1)\n    if <touching color (#ff9400)?> then\n        set [y v] to [24]\n    end\n    if <touching color (#003fff)?> then\n        if <key (up arrow v) pressed?> then\n            set [y v] to [10]\n        else\n            set [y v] to [-1]\n        end\n        if <key (down arrow v) pressed?> then\n            set [y v] to [-5]\n        end\n    end\n    if <touching color (#ff0000)?> then\n        change [fails v] by (1)\n        broadcast (reset level v)\n        go to x: (-230) y: (-50)\n    end\n    if <touching (orb8 v)?> then\n        change [fails v] by (1)\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        broadcast (reset level v)\n        go to x: (-230) y: (-50)\n        set [ghost v] effect to (0)\n    end\n    if <(y position) < [-170]> then\n        change [fails v] by (1)\n        broadcast (reset level v)\n        go to x: (-230) y: (-50)\n    end\n    if <<(backdrop [number v]) = [2]> and <(x position) > [69]>> then\n        next backdrop\n        go to x: (-230) y: (-50)\n    end\n    if <<(backdrop [number v]) = [3]> or <(backdrop [number v]) = [14]>> then\n        repeat until <(Control) = [0]>\n            go to x: (-230) y: (-97)\n        end\n    end\n    if <touching color (#003fff)?> then\n        if <key (up arrow v) pressed?> then\n            set [y v] to [10]\n        else\n            set [y v] to [-1]\n        end\n        if <key (down arrow v) pressed?> then\n            set [y v] to [-5]\n        end\n    end\n    if <<<(x position) > [230]> and <(PortalLevel) = [0]>> and <(Bossfight) = [0]>> then\n        go to x: (-230) y: (-90)\n        next backdrop\n    end\n    if <<<touching color (#ff00bf)?> and <(Bossfight) = [0]>> and <(PortalLevel) = [1]>> then\n        go to x: (-230) y: (-90)\n        next backdrop\n    end\n    if <touching (enemy v)?> then\n        if <((y position) - (3)) > ([y position v] of [enemy v])> then\n    end\nend\n\nwhen backdrop switches to [backdrop14 v]\nhide\n\n@Dragon\n\nwhen flag clicked\nhide\ngo to x: (240) y: (21)\nswitch costume to (dragon1-a2 v)\n\nwhen backdrop switches to [backdrop1 v]\nset [control v] to [1]\nstop all sounds\nshow\nglide (1) secs to x: (-33) y: (21)\nsay [Hello!] for (2) seconds\nsay [What a surprise!] for (2) seconds\nsay [My name is Smorg and I am looking for a test subject when you came!] for (4.5) seconds\nsay [You see, I want to be entertained.] for (3) seconds\nsay [Life is boring, but since you're here...] for (3) seconds\nsay [...I can watch you try to complete my levels all day long!] for (4) seconds\nsay [Don't worry, it's safe here! Be ready to respawn a million times!] for (4) seconds\nsay [Muhahahaha!] for (2) seconds\nswitch costume to (dragon1-a v)\nglide (1) secs to x: (240) y: (21)\nset [control v] to [0]\nstop all sounds\nhide\n\nnext backdrop\nnext backdrop\n\nwhen backdrop switches to [backdrop14 v]\nset [control v] to [1]\nstop all sounds\nswitch costume to (dragon1-a2 v)\ngo to x: (240) y: (21)\nshow\nglide (1) secs to x: (60) y: (21)\nthink [Hmm...] for (1) seconds\nsay [Megacube!] for (1) seconds\nwait (3) seconds\nsay [Your minion has failed...] for (1.5) seconds\nwait (2) seconds\nsay [Well, we all know the Cube is unstoppable, but....] for (2) seconds\nwait (1.2) seconds\nsay [What if you, the king of the redcubes, battle the Cube? That'll be intreasting! ] for (4) seconds\nwait (1) seconds\nsay [Of cource the Cube is going to win! But boss battles are entertaining!] for (3) seconds\nwait (2) seconds\nsay [Good....good...good...] for (2) seconds\nsay [NOW START THE TELEPORTERS!!!] for (2) seconds\nwait (1) seconds\nhide\n\nwhen backdrop switches to [backdrop27 v]\nswitch costume to (dragon1-a2 v)\ngo to x: (240) y: (21)\nshow\nstop all sounds\nset [control v] to [0]\nglide (1) secs to x: (60) y: (21)\nsay [Muhaha!] for (1) seconds\nsay [Reverse psychology works!] for (2) seconds\nsay [Or maybe you knew the portal was a trap all along...] for (3) seconds\nsay [...And you just wanted a final epic boss fight.] for (2) seconds\nsay [But you won't get it!] for (1) seconds\nsay [You see, I can't win against you! You'll just keep respawning until you beat me!] for (4) seconds\nbroadcast (Sad music v)\nsay [So instead, I've set up a level that you can't pass. That you can't win.] for (3) seconds\nsay [It's your fault that you wandered into this facility in the first place.] for (3) seconds\nsay [...] for (2) seconds\nsay [But as standard villan practices go I will not stay to verify if my trap worked or not.] for (4) seconds\nsay [Goodbye!] for (1) seconds\nswitch costume to (dragon1-a v)\nglide (1) secs to x: (240) y: (21)\nhide\n\n@MovingPlatform\n\nwhen flag clicked\nhide\ngo to x: (3) y: (-68)\n\nwhen I receive [reset level v]\nif <(backdrop [number v]) = [10]> then\n    go to x: (0) y: (-180)\nend\n\nwhen I start as a clone\nif <<(backdrop [name v]) = [backdrop16]> and <(costume [number v]) = [3]>> then\n    repeat until <not <(backdrop [name v]) = [backdrop16]>>\n        repeat (10)\n            change y by (10)\n        end\n        wait (1) seconds\n        repeat (10)\n            change y by (-10)\n        end\n        wait (1) seconds\n    end\nend\nif <<(backdrop [name v]) = [backdrop16]> and <(costume [number v]) = [4]>> then\n    repeat until <not <(backdrop [name v]) = [backdrop16]>>\n        repeat (10)\n            change y by (-10)\n        end\n        wait (1) seconds\n        repeat (10)\n            change y by (10)\n        end\n        wait (1) seconds\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(backdrop [number v]) = [19]> then\n        delete this clone\n    end\nend\n\nwhen backdrop switches to [backdrop6 v]\nswitch costume to (costume1 v)\nshow\nrepeat until <not <(backdrop [number v]) = [6]>>\n    set size to (80) %\n    glide (1.6) secs to x: (165) y: (-68)\n    glide (1.6) secs to x: (165) y: (130)\n    glide (1.6) secs to x: (165) y: (-68)\n    glide (1.6) secs to x: (3) y: (-68)\nend\nhide\n\nwhen backdrop switches to [backdrop10 v]\nswitch costume to (costume2 v)\nset size to (100) %\ngo to x: (0) y: (-180)\nshow\nrepeat until <not <(backdrop [number v]) = [10]>>\n    wait (2) seconds\n    repeat until <(y position) = [180]>\n        change y by (1)\n    end\n    go to x: (0) y: (-180)\nend\nhide\n\nwhen backdrop switches to [backdrop16 v]\nshow\ngo to x: (-36) y: (-19)\nswitch costume to (costume4 v)\ncreate clone of (_myself_ v)\ngo to x: (103) y: (-83)\nswitch costume to (costume3 v)\ncreate clone of (_myself_ v)\nhide\n\nwhen backdrop switches to [backdrop7 v]\nhide\n\nwhen backdrop switches to [backdrop11 v]\nhide\n\nwhen backdrop switches to [backdrop27 v]\nswitch costume to (costume5 v)\ngo to x: (0) y: (180)\nshow\nwait (21) seconds\nrepeat until <(x position) < [68]>\n    wait (0.1) seconds\n    change y by (-1)\nend\nbroadcast (The End... v)\nhide\n\n@Enemy\n\nwhen backdrop switches to [backdrop12 v]\nshow\nrepeat until <not <<(backdrop [number v]) = [12]> or <(backdrop [number v]) = [13]>>>\n    go to x: (63) y: (27)\n    glide (2) secs to x: (-95) y: (27)\n    glide (2) secs to x: (63) y: (27)\nend\nhide\n\nwhen backdrop switches to [backdrop19 v]\nshow\nrepeat until <not <(backdrop [number v]) = [21]>>\n    go to x: (-76) y: (-24)\n    glide (2) secs to x: (38) y: (-25)\n    glide (2) secs to x: (-76) y: (-24)\nend\nhide\n\nwhen backdrop switches to [backdrop25 v]\nshow\nrepeat until <not <(backdrop [number v]) = [25]>>\n    go to x: (214) y: (-5)\n    glide (2) secs to x: (-78) y: (-5)\n    glide (2) secs to x: (214) y: (-5)\nend\nhide\n\nwhen backdrop switches to [backdrop26 v]\nhide\ngo to x: (120) y: (-131)\ncreate clone of (_myself_ v)\ngo to x: (120) y: (-1)\ncreate clone of (_myself_ v)\ngo to x: (50) y: (-131)\ncreate clone of (_myself_ v)\ngo to x: (50) y: (-1)\ncreate clone of (_myself_ v)\n\nshow\n\nwhen I start as a clone\nforever\n    if <touching (the cube v)?> then\n        if <(([y position v] of [the cube v]) - (3)) > (y position)> then\n            set [y v] to [8]\n            start sound [pop v]\n            delete this clone\n        else\n        end\n    end\nend\n\nwhen flag clicked\nset size to (100) %\nhide\nforever\n    if <touching (the cube v)?> then\n        if <(([y position v] of [the cube v]) - (3)) > (y position)> then\n            set [y v] to [8]\n            hide\n            start sound [pop v]\n        else\n        end\n    end\nend\n\nwhen backdrop switches to [backdrop26 v]\nrepeat until <not <(backdrop [name v]) = [backdrop26]>>\n    if <([y position v] of [the cube v]) < [-1]> then\n        repeat until <not <([y position v] of [the cube v]) < [-1]>>\n            set y to (-131)\n        end\n    end\n    if <([y position v] of [the cube v]) < [129]> then\n        repeat until <not <([y position v] of [the cube v]) < [129]>>\n            set y to (-1)\n        end\n    end\n    if <([y position v] of [the cube v]) > [129]> then\n        repeat until <not <([y position v] of [the cube v]) > [129]>>\n            set y to (129)\n        end\n    end\nend\nstop [this script v]\n\nwhen I start as a clone\nif <(backdrop [name v]) = [backdrop26]> then\n    show\n    repeat until <not <(backdrop [name v]) = [backdrop26]>>\n        repeat (40)\n            change x by (-5)\n            wait (0.01) seconds\n        end\n        repeat (40)\n            change x by (5)\n            wait (0.01) seconds\n        end\n    end\n    delete this clone\nend\n\nwhen I receive [enemy gets stomped on v]\n\nbroadcast (Enemy Gets Stomped On v) and wait\n\n@key-clipart-golden-key\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop21 v]\ngo to x: (83) y: (-143)\nshow\nwait until <touching (the cube v)?>\nnext backdrop\nhide\n\nwhen backdrop switches to [backdrop12 v]\ngo to x: (-14) y: (-101)\nshow\nwait until <touching (the cube v)?>\nnext backdrop\nhide\n\nwhen backdrop switches to [backdrop40 v]\ngo to x: (43) y: (64)\nshow\nwait until <touching (the cube v)?>\nnext backdrop\nhide\n\n@MegaCube\n\nwhen flag clicked\nhide\nset size to (350) %\nset [bossfight v] to [0]\n\nwhen backdrop switches to [bossfight megacube background2 v]\nrepeat until <[-170] > (y position)>\n    turn right (15) degrees\n    change y by (-10)\nend\nhide\npoint in direction (90)\nplay sound [triumph v] until done\nset [bossfight v] to [0]\nset [control v] to [1]\nstop all sounds\n\nwhen backdrop switches to [backdrop14 v]\nwait (4) seconds\nshow\ngo to x: (200) y: (-95)\nglide (1) secs to x: (150) y: (-95)\nsay [Yes?] for (1) seconds\nwait (1.5) seconds\nsay [So...] for (2) seconds\nwait (2) seconds\nsay [I don't get what you're hinting at.] for (1.2) seconds\nwait (4) seconds\nsay [But it wouldn't be fair!] for (1) seconds\nwait (3) seconds\nsay [Yes, master.] for (2) seconds\nwait (5) seconds\nbroadcast (Megacube Bossfight v)\nset [bossfight v] to [1]\nstop all sounds\nset [control v] to [0]\nwait (1) seconds\ngo to x: (0) y: (180)\nglide (1) secs to x: (0) y: (-36)\nrepeat until <(Bossfight) = [0]>\n    repeat (8)\n        change x by (-10)\n    end\n    repeat (8)\n        change x by (10)\n    end\n    repeat (8)\n        change x by (-10)\n    end\n    repeat (8)\n        change x by (10)\n    end\n    repeat (8)\n        change x by (-10)\n    end\n    repeat (8)\n        change x by (10)\n    end\n    set [sine v] to [90]\n    repeat (10)\n        change [sine v] by (-4)\n        change y by ((10) * ([sin v] of (sine) ))\n    end\n    repeat until <touching color (#000008)?>\n        if <(sine) > [-90]> then\n            change [sine v] by (-4)\n        end\n        change y by ((10) * ([sin v] of (sine) ))\n    end\nend\n\n@Start\n\nwhen I receive [almost start... v]\nshow\nswitch costume to (costume1 v)\nset size to (100) %\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat until <not <touching (mouse-pointer v)?>>\n            set size to (130) %\n        end\n        if <not <touching (mouse-pointer v)?>> then\n            set size to (100) %\n        end\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (-19) y: (-136)\n\nwhen this sprite clicked\nbroadcast (Start v)\nhide\nstart sound [pop v]\n\n@Sprite3\n\nwhen flag clicked\nhide\ngo to x: (2) y: (61)\n\nwhen I receive [almost start... v]\nshow\n\nwhen I receive [start v]\nhide\n\n@Sprite4\n\nwhen I start as a clone\nset y to (([y position v] of [megacube v]) - (31))\nset x to ([x position v] of [megacube v])\nshow\nforever\n    change x by (-10)\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\n    if <touching (the cube v)?> then\n        wait (0.3) seconds\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    turn left (15) degrees\nend\n\nwhen I receive [megacube bossfight v]\nrepeat until <(Bossfight) = [0]>\n    wait (pick random (0.5) to (1)) seconds\n    create clone of (_myself_ v)\nend\n\nwait (3) seconds\n\n@Sprite5\n\nwhen flag clicked\nhide\nset size to (25) %\ngo to x: (199) y: (-60)\n\nwhen I receive [megacube bossfight v]\nshow\nrepeat until <(Bossfight) = [0]>\n    if <touching (the cube v)?> then\n        hide\n        stop all sounds\n        start sound [gong v]\n        wait (1) seconds\n        switch backdrop to (bossfight megacube background2 v)\n    end\nend\n\n@Sprite6\n\nwhen flag clicked\nset size to (50) %\nhide\nforever\n    wait until <<(backdrop [number v]) = [22]> or <(backdrop [number v]) = [22]>>\n    repeat until <not <<(backdrop [number v]) = [22]> or <(backdrop [number v]) = [23]>>>\n        create clone of (_myself_ v)\n        wait (0.4) seconds\n    end\nend\n\nwhen I start as a clone\nshow\nset x to (pick random (-240) to (240))\nset y to (230)\nforever\n    change y by (-10)\n    if <touching (the cube v)?> then\n        wait (0.3) seconds\n        delete this clone\n    end\n    if <(y position) < [-180]> then\n        delete this clone\n    end\nend\n\n@cliparti1_ufo-clip-art_04\n\nwhen flag clicked\nswitch costume to (cliparti1_ufo-clip-art_04 v)\nset [ufo boss health v] to [5]\nset size to (50) %\nhide\n\nwhen backdrop switches to [backdrop22 v]\nwait (0.01) seconds\nshow\nclear graphic effects\ngo to x: (0) y: (100)\nswitch costume to (cliparti1_ufo-clip-art_04 v)\nset [bossfight v] to [1]\nset [ufo boss health v] to [5]\npoint in direction (90)\nset [control v] to [0]\nstop all sounds\nsay [Y-O-U] for (1) seconds\nsay [Y-O-U H-A-V-E] for (1) seconds\nsay [Y-O-U H-A-V-E B-E-E-N] for (1) seconds\nsay [Y-O-U H-A-V-E B-E-E-N A-B-D-U-C-T-E-D!] for (1) seconds\nsay [B-Y S-M-O-R-G-S M-O-S-T L-O-Y-A-L S-E-R-V-E-N-T!] for (4) seconds\nrepeat (24)\n    change x by (10)\nend\nrepeat until <(Bossfight) = [0]>\n    repeat (48)\n        change x by (-10)\n        if <touching (orb8 v)?> then\n            set [hit ufo? v] to [1]\n            change [ufo boss health v] by (-1)\n            if <(UFO Boss Health) < [1]> then\n                set [bossfight v] to [0]\n            else\n                repeat (36)\n                    turn right (10) degrees\n                end\n                set [hit ufo? v] to [0]\n            end\n        end\n    end\n    repeat (48)\n        change x by (10)\n        if <touching (orb8 v)?> then\n            set [hit ufo? v] to [1]\n            change [ufo boss health v] by (-1)\n            if <(UFO Boss Health) < [1]> then\n                set [bossfight v] to [0]\n            else\n                repeat (36)\n                    turn right (10) degrees\n                end\n                set [hit ufo? v] to [0]\n            end\n        end\n    end\nend\nstop [this script v]\n\nwhen I receive [reset level v]\nset [ufo boss health v] to [5]\n\nwhen backdrop switches to [backdrop22 v]\nwait (2.5) seconds\nrepeat until <<(Bossfight) = [0]> and <(Hit UFO?) = [0]>>\n    create clone of (orb8 v)\n    wait (1.23) seconds\nend\n\nwhen backdrop switches to [backdrop22 v]\nwait (1) seconds\nwait until <(Bossfight) = [0]>\nset [hit ufo? v] to [0]\nstop all sounds\nsay [N-O-O-O-!] for (2) seconds\nswitch costume to (dc8oyz6bi v)\nrepeat (50)\n    change size by (1)\n    change [ghost v] effect by (2)\nend\nhide\nswitch backdrop to (backdrop24 v)\nstop all sounds\nset [control v] to [1]\n\n@Sprite7\n\nwhen flag clicked\nhide\nset size to (100) %\ngo to x: (0) y: (-80)\n\nwhen backdrop switches to [backdrop34 v]\nshow\ngo to x: (0) y: (-80)\nrepeat until <not <(backdrop [name v]) = [backdrop34]>>\n    wait (0.01) seconds\n    set x to (mouse x)\nend\nhide\n\nwhen backdrop switches to [backdrop22 v]\nshow\ngo to x: (0) y: (-80)\nrepeat until <not <(backdrop [name v]) = [backdrop22]>>\n    wait (0.01) seconds\n    set x to (mouse x)\nend\nhide\n\n@orb8\n\nwhen flag clicked\nset size to (20) %\nhide\n\nwhen I start as a clone\nshow\nset y to (([y position v] of [cliparti1_ufo-clip-art_04 v]) - (70))\nset x to ([x position v] of [cliparti1_ufo-clip-art_04 v])\npoint in direction (180)\nrepeat until <(Bossfight) = [0]>\n    move (10) steps\n    if <touching color (#000000)?> then\n        repeat (10)\n            change size by (2)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    end\n    if <touching (the cube v)?> then\n        repeat (10)\n            change size by (2)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    end\n    if <touching (cliparti1_ufo-clip-art_04 v)?> then\n        repeat (10)\n            change size by (2)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    end\n    if <touching (_edge_ v)?> then\n        repeat (10)\n            change size by (2)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    end\n    if <touching (sprite7 v)?> then\n        turn right (180) degrees\n        change y by (12)\n    end\n    if <(Bossfight) = [0]> then\n        delete this clone\n    end\nend\ndelete this clone\n\n@Logo\n\nwhen flag clicked\nrepeat (25)\n    change y by (((y position) / (4)) * (-1))\n    point in direction ((y position) + (90))\nend\n\nwhen flag clicked\nhide\nchange [ghost v] effect by (100)\nset size to (60) %\nswitch costume to (logo v)\nshow\ngo to x: (0) y: (-180)\ngo to [front v] layer\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (2.5) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nwait (1) seconds\nbroadcast (Almost Start... v)\n\n@Sprite2\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [sad music v]\nstart sound [Sad Violin.mp3 v]\n\nwhen I receive [the end... v]\nswitch costume to (costume2 v)\ngo to [front v] layer\nshow\n\nswitch costume to (costume1 v)\ngo to [front v] layer\nshow\n\n