2 Player Platformer

Instructions: Original Date: Nov 28, 2022\n\n(Dec 01, 2022)\n#1 on trending - games in 1 day??????\n15k views in 3 days????!!!!!!!!\n\n(Dec 05, 2022)\n#10 on trending - games!\n34k views in a week????\n\n(Dec 08, 2022)\n45k views!!!\n\n(Dec 11, 2022)\n#19 on Trending - All!!!\n#2 on Trending - Games!!!\n57k views!\n\nLost In Space - A Platformer\nWASD or arrow keys to move\nAvoid spikes, saws and lava\nThe blue thing gives you speed\nUse the trampolines\nFind your friend!\n\nA love, a favorite and a follow would be very appreciated!

@Stage\n\n@Player\n\ndefine Platformer Physics (speed) (friction) (jump height)\nchange [y vel v] by (-1)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x vel v] by (speed)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x vel v] by ((speed) * (-1))\nend\nset [x vel v] to ((X vel) * (friction))\nchange x by (X vel)\nset [slope v] to [0]\nif <<touching (level v)?> or <touching (fake ground v)?>> then\n    repeat until <<<not <touching (level v)?>> or <(slope) = [-8]>> or <<not <touching (fake ground v)?>> or <(slope) = [-8]>>>\n        change [slope v] by (-1)\n        change y by (1)\n    end\nend\nif <<touching (level v)?> or <touching (fake ground v)?>> then\n    change y by (slope)\n    repeat until <<not <touching (level v)?>> or <not <touching (fake ground v)?>>>\n        change x by ((([abs v] of (X vel) ) / (X vel)) * (-1))\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <(X vel) > [0]> then\n            set [x vel v] to [-12]\n        else\n            set [x vel v] to [12]\n        end\n        set [y vel v] to [12]\n    else\n        set [x vel v] to [0]\n    end\nend\nchange y by (Y vel)\nif <<touching (level v)?> or <touching (fake ground v)?>> then\n    repeat until <<not <touching (level v)?>> and <not <touching (fake ground v)?>>>\n        change y by ((([abs v] of (Y vel) ) / (Y vel)) * (-1))\n    end\n    set [y vel v] to [0]\nend\nchange y by (-1)\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (level v)?>> or <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (fake ground v)?>>> then\n    set [y vel v] to (jump height)\nend\nchange y by (1)\n\nwhen flag clicked\ngo to x: (-220) y: (-62)\nset [timer v] to [0]\nset [key? v] to [0]\nset [level v] to [1]\nset [key 2? v] to [0]\nset [x vel v] to [0]\nset [y vel v] to [0]\nforever\n    Platformer Physics [1] [0.9] [13]\n    if <<touching color (#ff0000)?> or <touching (tnt v)?>> then\n        go to x: (-220) y: (-62)\n    end\n    if <touching (key v)?> then\n        set [key? v] to [1]\n    end\n    if <touching (key 2 v)?> then\n        set [key 2? v] to [1]\n    end\n    if <touching (trampoline v)?> then\n        set [y vel v] to [21]\n    end\n    if <(Key?) = [0]> then\n        if <touching (key door v)?> then\n            go to x: (PreviousX) y: (PreviousY)\n        end\n        if <not <touching (key door v)?>> then\n            set [previousx v] to (x position)\n            set [previousy v] to (y position)\n        end\n    end\n    if <<touching (key door v)?> and <(Key?) = [1]>> then\n        broadcast (unlock door v)\n    end\n    if <(Key 2?) = [0]> then\n        if <touching (key door2 v)?> then\n            go to x: (PreviousX) y: (PreviousY)\n        end\n        if <not <touching (key door2 v)?>> then\n            set [previousx v] to (x position)\n            set [previousy v] to (y position)\n        end\n    end\n    if <<touching (key door2 v)?> and <(Key?) = [1]>> then\n        broadcast (unlock door 2 v)\n    end\nend\n\nwhen I receive [next level v]\ngo to x: (-220) y: (-62)\n\nwhen flag clicked\nforever\n    play sound [Julius Dreisig & Zeus X Crona - Invisible \[NCS Release\] v] until done\nend\n\nwhen flag clicked\nforever\n    if <key (r v) pressed?> then\n        go to x: (-220) y: (-62)\n    end\nend\n\nwhen flag clicked\nset [timer v] to [0]\nrepeat until <(level) = [23]>\n    set [timer v] to ((timer) + (0.1))\nend\n\nif <key (r v) pressed?> then\n    go to x: (-220) y: (-62)\nend\n\n@level\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\ngo to [front v] layer\nshow\n\nwhen I receive [next level v]\nnext costume\n\n@Dangerous rocks\n\nwhen flag clicked\ngo to x: (0) y: (1)\nhide\ngo to [front v] layer\nforever\n    if <<<<(level) = [2]> or <(level) = [6]>> or <(level) = [7]>> or <(level) = [15]>> then\n        show\n        go to [front v] layer\n        if <touching (player v)?> then\n            repeat until <(costume [number v]) = [11]>\n                wait (0.05) seconds\n                next costume\n            end\n        else\n            wait (0.50) seconds\n            repeat until <(costume [number v]) = [1]>\n                wait (0.02) seconds\n                switch costume to ((costume [number v]) - (1))\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<(level) = [1]> or <<(level) = [3]> or <(level) = [8]>>> or <(level) = [16]>> then\n        hide\n    end\nend\n\n@end\n\nwhen flag clicked\ngo to [back v] layer\n\nwhen flag clicked\nset [open? v] to [0]\ngo to x: (240) y: (-7)\nshow\nforever\n    if <(level) = [22]> then\n        if <(open?) = [0]> then\n            hide\n        end\n    end\nend\n\nwhen flag clicked\ngo to x: (240) y: (-7)\nshow\nforever\n    if <touching (player v)?> then\n        change [level v] by (1)\n        broadcast (Next Level v)\n    end\nend\n\nwhen I receive [open! :\) v]\nset [open? v] to [1]\nshow\n\nwhen flag clicked\ngo to x: (240) y: (-7)\nshow\nforever\n    if <(level) = [23]> then\n        hide\n    end\nend\n\n@fake ground\n\nwhen flag clicked\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\nhide\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <(level) = [4]> then\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [front v] layer\nforever\n    if <(level) = [3]> then\n        set [ghost v] effect to (0)\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        set [ghost v] effect to (100)\n        hide\n        wait (1.2) seconds\n        set [ghost v] effect to (100)\n        show\n        repeat (20)\n            change [ghost v] effect by (-5)\n        end\n        set [ghost v] effect to (0)\n        wait (0.50) seconds\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [front v] layer\nforever\n    if <(level) = [5]> then\n        switch costume to (costume2 v)\n        set [ghost v] effect to (0)\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        set [ghost v] effect to (100)\n        hide\n        wait (2) seconds\n        set [ghost v] effect to (100)\n        show\n        repeat (20)\n            change [ghost v] effect by (-5)\n        end\n        set [ghost v] effect to (0)\n        wait (3) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [7]> then\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [front v] layer\nforever\n    if <(level) = [6]> then\n        switch costume to (costume3 v)\n        set [ghost v] effect to (0)\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        set [ghost v] effect to (100)\n        hide\n        wait (2) seconds\n        set [ghost v] effect to (100)\n        show\n        repeat (20)\n            change [ghost v] effect by (-5)\n        end\n        set [ghost v] effect to (0)\n        wait (3) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [8]> then\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [front v] layer\nforever\n    if <(level) = [19]> then\n        switch costume to (costume4 v)\n        set [ghost v] effect to (0)\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        set [ghost v] effect to (100)\n        hide\n        wait (2) seconds\n        set [ghost v] effect to (100)\n        show\n        repeat (20)\n            change [ghost v] effect by (-5)\n        end\n        set [ghost v] effect to (0)\n        wait (3) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [20]> then\n        hide\n    end\nend\n\n@lava\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [3]> then\n        switch costume to (costume1 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        switch costume to (costume2 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [4]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        switch costume to (costume3 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        switch costume to (costume5 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        switch costume to (costume6 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        switch costume to (costume7 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [17]> then\n        switch costume to (costume8 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [18]> then\n        hide\n    end\nend\n\n@Turret\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\npoint in direction (180)\ngo to x: (-12) y: (186)\nglide (1) secs to x: (0) y: (0)\nforever\n    if <(level) = [4]> then\n        show\n        broadcast (shoot v)\n        forever\n            point towards (player v)\n        end\n    end\nend\n\nwhen I receive [shoot v]\nrepeat until <<<<(level) = [5]> or <(level) = [8]>> or <(level) = [10]>> or <(level) = [22]>>\n    switch costume to (costume1 v)\n    wait (0.2) seconds\n    switch costume to (costume2 v)\n    wait (0.2) seconds\n    switch costume to (costume3 v)\n    start sound [Laser2 v]\n    create clone of (turret bullet v)\nend\n\nwhen flag clicked\nforever\n    if <<<<(level) = [5]> or <(level) = [8]>> or <(level) = [10]>> or <(level) = [22]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\npoint in direction (180)\ngo to x: (-12) y: (186)\nglide (1) secs to x: (0) y: (0)\nforever\n    if <(level) = [7]> then\n        show\n        broadcast (shoot v)\n        forever\n            point towards (player v)\n        end\n    end\nend\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\npoint in direction (180)\ngo to x: (-12) y: (186)\nglide (1) secs to x: (0) y: (0)\nforever\n    if <(level) = [9]> then\n        show\n        broadcast (shoot v)\n        forever\n            point towards (player v)\n        end\n    end\nend\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\npoint in direction (180)\ngo to x: (-12) y: (186)\nglide (1) secs to x: (0) y: (0)\nforever\n    if <(level) = [21]> then\n        show\n        broadcast (shoot v)\n        forever\n            point towards (player v)\n        end\n    end\nend\n\n@Turret bullet\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo [backward v] (99) layers\nshow\ngo to (turret v)\npoint in direction ([direction v] of [turret v])\nmove (5) steps\nrepeat until <touching (_edge_ v)?>\n    move (15) steps\nend\ndelete this clone\n\nwhen I receive [no shoot v]\nhide\n\n@Key\n\nwhen flag clicked\nhide\nforever\n    if <(level) = [7]> then\n        hide\n    end\nend\n\nwhen flag clicked\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\nhide\nforever\n    if <(level) = [6]> then\n        if <(Key?) = [0]> then\n            set size to (100) %\n            show\n            go to x: (-121) y: (145)\n            glide (0.08) secs to x: (-121) y: (150)\n            glide (0.08) secs to x: (-121) y: (145)\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(level) = [1]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        if <(Key?) = [1]> then\n            if <touching (player v)?> then\n                set [color v] effect to (0)\n                start sound [Coin v]\n                repeat (5)\n                    change size by (10)\n                    change [ghost v] effect by (20)\n                end\n                forever\n                    hide\n                end\n            end\n        end\n    end\nend\n\n@Trampoline\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    if <(level) = [6]> then\n        go to x: (175) y: (-102)\n        show\n    end\n    if <(level) = [7]> then\n        hide\n    end\n    if <(level) = [22]> then\n        hide\n    end\n    if <(level) = [1]> then\n        hide\n    end\n    if <(level) = [15]> then\n        go to x: (95) y: (-102)\n        show\n    end\n    if <(level) = [16]> then\n        hide\n    end\n    if <(level) = [17]> then\n        go to x: (-145) y: (-102)\n        show\n    end\n    if <(level) = [18]> then\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        repeat (4)\n            wait (0.01) seconds\n            next costume\n        end\n        start sound [Mario Jump - Gaming Sound Effect \(HD\) v]\n        switch costume to (costume4 v)\n        wait (0.01) seconds\n        switch costume to (costume3 v)\n        wait (0.01) seconds\n        switch costume to (costume2 v)\n        wait (0.01) seconds\n        switch costume to (costume1 v)\n    end\nend\n\n@thumbnail\n\nwhen flag clicked\nforever\n    go to x: (300) y: (130)\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\nwhen [timer v] > (timer)\nrepeat until <<(round (y position)) = [0]> and <(round (x position)) = [0]>>\n    show\n    change y by (((0) - (y position)) / (5))\n    change x by (((0) - (x position)) / (5))\nend\nwait (0.1) seconds\n\n@tnt\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\ngo to [front v] layer\ngo to x: (0) y: (-92)\nforever\n    if <(level) = [8]> then\n        go to [front v] layer\n        show\n        switch costume to (costume1 v)\n        repeat (3)\n            wait (0.1) seconds\n            switch costume to (costume2 v)\n            wait (0.1) seconds\n            switch costume to (costume1 v)\n        end\n        switch costume to (costume1 v)\n        start sound [bomb sound effect v]\n        repeat (8)\n            wait (0.01) seconds\n            next costume\n        end\n        repeat (20)\n            change [ghost v] effect by (4)\n        end\n        forever\n            hide\n        end\n    else\n        hide\n    end\nend\n\n@love % fav\n\nwhen flag clicked\ngo to x: (190) y: (180)\nhide\nforever\n    wait (pick random (2) to (9)) seconds\n    show\n    glide (0.50) secs to x: (190) y: (150)\n    wait (2) seconds\n    glide (0.20) secs to x: (190) y: (180)\n    hide\nend\n\n@turret laser\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\npoint in direction (180)\ngo to x: (-12) y: (186)\nglide (1) secs to x: (0) y: (0)\nforever\n    if <<(level) = [11]> or <(level) = [18]>> then\n        show\n        switch costume to (costume2 v)\n        repeat (25)\n            turn left (5) degrees\n        end\n        wait (0.3) seconds\n        repeat (25)\n            turn right (5) degrees\n        end\n        wait (0.05) seconds\n        switch costume to (costume1 v)\n        wait (1) seconds\n    end\nend\n\nturn right (5) degrees\n\nwhen flag clicked\nforever\n    if <(level) = [12]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [19]> then\n        hide\n    end\nend\n\n@turret laser2\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\npoint in direction (180)\ngo to x: (0) y: (160)\nforever\n    if <<(level) = [12]> or <(level) = [18]>> then\n        show\n        switch costume to (costume2 v)\n        wait (1.7) seconds\n        switch costume to (costume1 v)\n        wait (1.7) seconds\n    end\nend\n\nturn right (5) degrees\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [19]> then\n        hide\n    end\nend\n\n@turret laser3\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\npoint in direction (180)\ngo to x: (-120) y: (160)\nforever\n    if <(level) = [12]> then\n        show\n        switch costume to (costume2 v)\n        wait (1.9) seconds\n        switch costume to (costume1 v)\n        wait (1.9) seconds\n    end\nend\n\nturn right (5) degrees\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        hide\n    end\nend\n\n@turret laser4\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\npoint in direction (180)\ngo to x: (120) y: (160)\nforever\n    if <(level) = [12]> then\n        show\n        switch costume to (costume2 v)\n        wait (1.4) seconds\n        switch costume to (costume1 v)\n        wait (1.3) seconds\n    end\nend\n\nturn right (5) degrees\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        hide\n    end\nend\n\n@amazingQ logo\n\nwhen flag clicked\nforever\n    set size to (90) %\n    show\n    go to [front v] layer\n    go to x: (200) y: (-147)\n    set [ghost v] effect to (15)\nend\n\n@key door\n\nwhen flag clicked\nset size to (100) %\nhide\ngo to [back v] layer\ngo to x: (130) y: (0)\nforever\n    if <(level) = [14]> then\n        show\n    end\nend\n\nwhen I receive [unlock door v]\nstart sound [Coin v]\nforever\n    hide\nend\n\n@text\n\nwhen I receive [next level v]\ngo to [front v] layer\nnext costume\nshow\ngo to x: (25) y: (179)\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\n\nwhen I receive [next level v]\nglide (1) secs to x: (25) y: (155)\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\ngo to x: (25) y: (179)\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\n\nwhen flag clicked\nglide (1) secs to x: (25) y: (155)\n\n@rotating lava\n\nwhen flag clicked\npoint in direction (90)\nhide\ngo to x: (36) y: (0)\ngo to [front v] layer\nforever\n    if <<<(level) = [16]> or <(level) = [18]>> or <(level) = [21]>> then\n        show\n        turn left (2) degrees\n        wait (0.01) seconds\n    else\n        hide\n        point in direction (90)\n    end\nend\n\n@Key 2\n\nwhen flag clicked\nhide\nforever\n    if <(level) = [20]> then\n        hide\n    end\nend\n\nwhen flag clicked\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\nhide\nforever\n    if <(level) = [19]> then\n        if <(Key 2?) = [0]> then\n            set size to (100) %\n            show\n            go to x: (-121) y: (145)\n            glide (0.09) secs to x: (-121) y: (156)\n            glide (0.09) secs to x: (-121) y: (158)\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(level) = [1]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [19]> then\n        if <(Key 2?) = [1]> then\n            if <touching (player v)?> then\n                set [color v] effect to (0)\n                start sound [Coin v]\n                repeat (5)\n                    change size by (10)\n                    change [ghost v] effect by (20)\n                end\n                forever\n                    hide\n                end\n            end\n        end\n    end\nend\n\n@key door2\n\nwhen flag clicked\nset size to (100) %\nhide\ngo to [back v] layer\ngo to x: (130) y: (0)\nforever\n    if <(level) = [20]> then\n        show\n    end\nend\n\nwhen I receive [unlock door 2 v]\nstart sound [Coin v]\nforever\n    hide\nend\n\n@boss\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [front v] layer\npoint in direction (90)\nhide\nforever\n    if <(level) = [22]> then\n        go to x: (256) y: (28)\n        show\n        glide (1) secs to x: (30) y: (28)\n        repeat (7)\n            point towards (player v)\n            start sound [Laser2 v]\n            create clone of (turret bullet v)\n            wait (0.5) seconds\n        end\n        repeat (30)\n            turn right (4) degrees\n        end\n        repeat until <(costume [number v]) = [6]>\n            start sound [Laser2 v]\n            wait (0.01) seconds\n            next costume\n        end\n        wait (1) seconds\n        repeat (20)\n            start sound [Laser2 v]\n            turn right (3) degrees\n            wait (0.1) seconds\n            turn left (4) degrees\n        end\n        repeat until <(costume [number v]) = [1]>\n            start sound [Laser2 v]\n            wait (0.01) seconds\n            next costume\n        end\n        wait (1) seconds\n        repeat (50)\n            turn right (15) degrees\n            start sound [Laser2 v]\n            create clone of (turret bullet v)\n            wait (0.3) seconds\n        end\n        wait (1) seconds\n        repeat until <(costume [number v]) = [5]>\n            start sound [Laser2 v]\n            wait (0.01) seconds\n            next costume\n        end\n        repeat (100)\n            start sound [Laser2 v]\n            turn right (1) degrees\n        end\n        repeat (100)\n            start sound [Laser2 v]\n            turn left (1) degrees\n        end\n        repeat until <(costume [number v]) = [1]>\n            start sound [Laser2 v]\n            wait (0.01) seconds\n            next costume\n        end\n        point in direction (90)\n        say [G]\n        wait (0.05) seconds\n        say [Gr]\n        wait (0.05) seconds\n        say [Gre]\n        wait (0.05) seconds\n        say [Grea]\n        wait (0.05) seconds\n        say [Great]\n        wait (0.05) seconds\n        say [Great ]\n        wait (0.05) seconds\n        say [Great J]\n        wait (0.05) seconds\n        say [Great Jo]\n        wait (0.05) seconds\n        say [Great Job]\n        wait (0.05) seconds\n        say [Great Job!]\n        wait (0.05) seconds\n        say [Great Job! :]\n        wait (0.05) seconds\n        say [Great Job! :D]\n        wait (0.05) seconds\n        say [Great Job! :D] for (2) seconds\n        repeat (50)\n            change [ghost v] effect by (2)\n        end\n        hide\n        broadcast (open! :\) v)\n        forever\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [front v] layer\nhide\nforever\n    if <(level) = [1]> then\n        hide\n    end\nend\n\n