Among Us Platformer Dungeon

Instructions: right arrow = go right\nleft arrow = go left\nup arrow = jump\n\nclick on followers for immortality and maximum speed

@Stage\n\nwhen flag clicked\nforever\n    if <key (m v) pressed?> then\n        set [place_spritex v] to (mouse x)\n        set [place_spritey v] to (mouse y)\n    end\nend\n\n@Ground\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\n    switch costume to (join [costume] (Level))\nend\n\nif <(Level) < [11]> then\n    switch costume to (Level)\nend\n\n@Trampoline\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    Place Clone At [20] [-90]\nend\nif <(Level) = [2]> then\n    Place Clone At [-117] [-90]\nend\nif <(Level) = [8]> then\n    Place Clone At [-65] [-10]\nend\nif <(Level) = [9]> then\n    Place Clone At [139] [-90]\nend\nif <(Level) = [16]> then\n    Place Clone At [139] [-90]\n    Place Clone At [60] [-90]\n    Place Clone At [-10] [-90]\n    Place Clone At [-70] [-90]\n    Place Clone At [-140] [-90]\nend\nhide\nset [x v] to [-9999]\n\nwhen flag clicked\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Place Clone At (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nswitch costume to (trampoline1 v)\nshow\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo to x: (x) y: (y)\nforever\n    if <touching (main charectar v)?> then\n        broadcast (bounce v)\n        repeat (8)\n            next costume\n        end\n        switch costume to (trampoline1 v)\n    end\nend\n\n@spikes\n\nwhen flag clicked\nhide\n\ndefine Place Clone At (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nshow\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [2]> then\n    Place Clone At [-2] [35]\nend\nif <(Level) = [4]> then\n    Place Clone At [-30] [-33]\n    Place Clone At [141] [104]\nend\nif <(Level) = [11]> then\n    Place Clone At [0] [-66]\nend\nhide\nset [x v] to [-99999]\n\nPlace Clone At [62] [30]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I start as a clone\ngo to x: (x) y: (y)\nforever\n    if <(invisible) = [0]> then\n        if <touching (main charectar v)?> then\n            broadcast (Die v)\n        end\n    end\nend\n\nif <(invisible) = [0]> then\n\n@Sprite1\n\ndefine Place Clone At (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nshow\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nStart Laser Again\n\nwhen I start as a clone\ngo to [back v] layer\ngo [backward v] (333) layers\ngo to x: (x) y: (y)\nset [timer v] to [0]\nforever\n    set pen color to (#e46634)\n    set pen size to (1)\n    erase all\n    pen down\n    repeat (10)\n        change y by (250)\n        change y by (-250)\n        change pen size by (4)\n        wait (0.1) seconds\n        change [timer v] by (1)\n    end\n    if <(timer) > [15]> then\n        broadcast (Stop Laser v)\n        delete this clone\n    end\nend\n\nwhen I receive [reset v]\nerase all\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nhide\n\ndefine Start Laser Again\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [3]> then\n    Place Clone At [0] [103]\nend\nif <(Level) = [5]> then\n    Place Clone At [2] [103]\nend\nif <(Level) = [12]> then\n    Place Clone At [0] [103]\n    Place Clone At [-115] [103]\n    Place Clone At [115] [103]\nend\nif <(Level) = [14]> then\n    Place Clone At [0] [103]\nend\nhide\nset [x v] to [-99999]\n\nwhen I receive [stop laser v]\nstop [other scripts in sprite v]\nerase all\nwait (1.5) seconds\nbroadcast (Start Laser Again v)\n\nwhen I receive [start laser again v]\nStart Laser Again\n\nwhen I start as a clone\nset volume to (50) %\nforever\n    wait (0.5) seconds\n    play sound [zap sound v] until done\n    wait (0.5) seconds\nend\n\nhide\nset [x v] to [-99999]\n\nwhen I start as a clone\n\nsay [Hello!] for (2) seconds\n\nPlace Clone At [-115] [103]\nPlace Clone At [115] [103]\n\nwhen I start as a clone\nforever\n    go to [back v] layer\n    go [backward v] (333) layers\nend\n\n@AnimatedCharectar2\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [3]> then\n    Place Clone At [101] [-90]\nend\nif <(Level) = [6]> then\n    Place Clone At [100] [-93]\nend\nif <(Level) = [8]> then\n    Place Clone At [-74] [-10]\nend\nif <(Level) = [10]> then\n    Place Clone At [-20] [-90]\n    Place Clone At [100] [-90]\nend\nif <(Level) = [15]> then\n    Place Clone At [-122] [-93]\n    Place Clone At [0] [-93]\n    Place Clone At [122] [-93]\nend\nhide\nset [x v] to [-99999]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I start as a clone\ngo to x: (x) y: (y)\nchange [color v] effect by (pick random (25) to (75))\nPatrolling Around\nforever\n    if <(invisible) = [0]> then\n        if <touching (main charectar v)?> then\n            broadcast (Die v)\n        end\n    end\nend\n\ndefine Place Clone At (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nshow\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\ndefine Patrolling Around\nforever\n    repeat (25)\n        point in direction (90)\n        change x by (5)\n        next costume\n    end\n    switch costume to (idle v)\n    wait (1) seconds\n    repeat (25)\n        point in direction (-90)\n        change x by (-5)\n        next costume\n    end\n    switch costume to (idle v)\n    wait (1) seconds\nend\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [6]> then\n        play sound [The among us walking sound effect2 v] until done\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(invisible) = [0]> then\n        if <touching (main charectar v)?> then\n            broadcast (Die v)\n        end\n    end\nend\n\nif <(invisible) = [0]> then\n\n@Smasher\n\nwhen flag clicked\nhide\n\ndefine Place Clone At (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nshow\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [5]> then\n    Place Clone At [206] [50]\nend\nif <(Level) = [6]> then\n    Place Clone At [0] [50]\nend\nif <(Level) = [9]> then\n    Place Clone At [0] [50]\nend\nif <(Level) = [13]> then\n    Place Clone At [0] [50]\n    Place Clone At [-115] [50]\n    Place Clone At [115] [50]\nend\nif <(Level) = [14]> then\n    Place Clone At [-115] [50]\n    Place Clone At [115] [50]\nend\nhide\nset [x v] to [-99999]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I start as a clone\ngo to x: (x) y: (y)\nSmash Down (y)\n\ndefine Smash Down (y)\nforever\n    repeat until <touching (ground v)?>\n        change y by (-2)\n    end\n    broadcast (PlaySmashSound v)\n    wait (1) seconds\n    repeat until <(y position) > (y)>\n        change y by (5)\n    end\nend\n\nwhen I receive [playsmashsound v]\nset volume to (50) %\nplay sound [crash metal v] until done\n\nwhen I start as a clone\nforever\n    if <(invisible) = [0]> then\n        if <touching (maincharacter v)?> then\n            broadcast (Die v)\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(invisible) = [0]> then\n        if <touching (main charectar v)?> then\n            broadcast (Die v)\n        end\n    end\nend\n\nset [level v] to [13]\n\nwait (1) seconds\nPlace Clone At [-200] [100]\nwait (0.1) seconds\nPlace Clone At [-115] [100]\nwait (0.1) seconds\nPlace Clone At [0] [100]\nwait (0.1) seconds\nPlace Clone At [115] [100]\nwait (0.1) seconds\nPlace Clone At [200] [100]\n\n@AnimatedCharectar3\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [7]> then\n    Place Clone At [-97] [-93]\nend\nif <(Level) = [11]> then\n    Place Clone At [100] [-93]\nend\nhide\nset [x v] to [-99999]\n\nPlace Clone At [-143] [-93]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I start as a clone\ngo to x: (x) y: (y)\nchange [color v] effect by (0)\nPatrolling Around\nforever\n    if <(invisible) = [0]> then\n        if <touching (main charectar v)?> then\n            broadcast (Die v)\n        end\n    end\nend\n\ndefine Place Clone At (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nshow\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\ndefine Patrolling Around\nforever\n    repeat (12)\n        point in direction (90)\n        change x by (10)\n        next costume\n    end\n    switch costume to (idle v)\n    wait (1) seconds\n    repeat (12)\n        point in direction (-90)\n        change x by (-10)\n        next costume\n    end\n    switch costume to (idle v)\n    wait (1) seconds\nend\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [6]> then\n        play sound [The among us walking sound effect2 v] until done\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(invisible) = [0]> then\n        if <touching (main charectar v)?> then\n            broadcast (Die v)\n        end\n    end\nend\n\nif <(invisible) = [0]> then\n\n@Sprite3\n\ngo to x: (-185) y: (160)\n\n@Sprite4\n\nwhen flag clicked\nshow\ngo to x: (138) y: (160)\n\n@Sprite5\n\nwhen flag clicked\ngo to x: (-118) y: (157)\nhide\nset [digits v] to [0]\nrepeat (2)\n    change [digits v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to x: ((-126) + ((digits) * (12))) y: (159)\nforever\n    if <(digits) > (length of (Level))> then\n        hide\n    else\n        show\n        switch costume to (letter (digits) of (Level))\n    end\nend\n\n@Sprite6\n\nwhen flag clicked\nhide\nset [digits v] to [0]\nrepeat (2)\n    change [digits v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to x: ((205) + ((digits) * (12))) y: (158)\nforever\n    if <(digits) > (length of (Death))> then\n        hide\n    else\n        show\n        switch costume to (letter (digits) of (Death))\n    end\nend\n\n@Sprite7\n\nshow\ngo to x: (-170) y: (122)\nforever\n    if <(Level) < [16]> then\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (10)\n            if <mouse down?> then\n                broadcast (StartNewLevel v)\n                change [level v] by (1)\n                wait (1) seconds\n            end\n        else\n            set [brightness v] effect to (0)\n        end\n    else\n        set [brightness v] effect to (-30)\n    end\nend\n\nwhen flag clicked\n\n@Sprite8\n\nwhen flag clicked\nset [canuseskipbutton v] to [0]\nwait (1) seconds\nshow\ngo to x: (-170) y: (122)\nforever\n    if <(Level) < [16]> then\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (10)\n            if <<mouse down?> and <(CanUseSkipButton) = [1]>> then\n                broadcast (StartNewLevel v)\n                change [level v] by (1)\n                wait (1) seconds\n            end\n            if <<mouse down?> and <(CanUseSkipButton) = [0]>> then\n                broadcast (FavedandLikedforskip v)\n                wait (1) seconds\n            end\n        else\n            set [brightness v] effect to (0)\n        end\n    else\n        set [brightness v] effect to (-30)\n    end\nend\n\n@detector2\n\nwhen I receive [favedandlikedforskip v]\nshow\nswitch costume to (2 v)\nreset timer\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nswitch costume to (1 v)\n\nwhen flag clicked\nhide\n\n@Sprite9\n\nwhen flag clicked\nset volume to (50) %\nset size to (70) %\ngo to x: (-193) y: (54)\nswitch costume to (sound v)\nwait (3) seconds\nforever\n    play sound [Alan Walker - Force \[NCS Release\] v] until done\nend\n\nwhen this sprite clicked\nset volume to (50) %\nset size to (70) %\nshow\nif <(costume [number v]) = [1]> then\n    switch costume to (not sound v)\n    set volume to (0) %\nelse\n    switch costume to (sound v)\n    set volume to (50) %\nend\n\nstop all sounds\n\nrepeat (1000)\n    play sound [Alan Walker - Force \[NCS Release\] v] until done\nend\n\nrepeat until <(costume [number v]) = [2]>\nend\n\n@detector3\n\nwhen flag clicked\nhide\nwait (2.2) seconds\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED) = [1]> and <(FAVED) = [1]>>\nset [canuseskipbutton v] to [1]\nbroadcast (powers v)\nset [faved v] to [0]\nwait (0.5) seconds\nshow\ngo to x: (0) y: (-100)\nreset timer\nswitch costume to (1 v)\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                set [loved v] to [1]\n            end\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                set [faved v] to [1]\n            end\n        end\n    end\nend\ndelete this clone\n\nswitch costume to (1 v)\n\nbroadcast (show power v)\n\n@AnimatedCharectar4\n\nwait (2) seconds\n\nwait (1) seconds\n\nwhen flag clicked\nset [ghost v] effect to (0)\nset [invisible v] to [0]\nset [clone # v] to [0]\n\nset [death v] to ((Death) + (1))\n\nwhen I receive [invisible v]\nset [invisible v] to [1]\nrepeat (3)\n    change [ghost v] effect by (15)\nend\nwait (1.8) seconds\nset [invisible v] to [0]\nset [ghost v] effect to (0)\n\nwhen I start as a clone\nrepeat (10)\n    change size by (-2)\nend\ndelete this clone\n\nwhen I receive [powers v]\nforever\n    if  then\nend\n\nwhen flag clicked\nhide\nset size to (50) %\nset rotation style [left-right v]\ngo to [front v] layer\nwait (3) seconds\nshow\nforever\n    go to (main charectar v)\n    if <<not <key (any v) pressed?>> and <(G_onGround) = [1]>> then\n        switch costume to (idle v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        point in direction (90)\n        if <(costume [name v]) = [idle]> then\n            switch costume to (walkcolor0001 v)\n        else\n            next costume\n            wait (0.02) seconds\n        end\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        point in direction (-90)\n        if <(costume [name v]) = [idle]> then\n            switch costume to (walkcolor0001 v)\n        else\n            next costume\n            wait (0.02) seconds\n        end\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        switch costume to (walkcolor0001 v)\n    end\nend\n\nwhen flag clicked\nset [death v] to [0]\nforever\n    if <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (a v) pressed?>>> then\n        if <(costume [number v]) = [6]> then\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        play sound [jump v] until done\n    end\nend\n\nwhen I receive [die v]\nwait (0.2) seconds\nplay sound [Alien Creak1 v] until done\nwait (0.3) seconds\nchange [death v] by (1)\n\nplay sound [The among us walking sound effect2 v] until done\n\nwhen I receive [fast speed v]\nrepeat (90)\n    create clone of (_myself_ v)\nend\n\nrepeat until \nend\n\n@Sprite10\n\nwhen flag clicked\n\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\n    go [forward v] (100) layers\nend\n\n@Sprite11\n\nwhen flag clicked\nset [all powers activate v] to [0]\nset size to (100) %\nset [ghost v] effect to (50)\nhide\n\nwhen I start as a clone\nswitch costume to (costume2 v)\ngo to x: (182) y: (-149)\nset [ghost v] effect to (0)\nforever\n    if <<key (x v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        switch costume to (costume3 v)\n        set [timer power speed v] to [3]\n        broadcast (Fast speed v)\n        repeat until <(timer power speed) < [0]>\n            wait (0.1) seconds\n            change [timer power speed v] by (-0.1)\n        end\n        switch costume to (costume2 v)\n    end\nend\n\nwhen I receive [powers v]\nforever\n    if <<key (z v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        switch costume to (costume3 v)\n        broadcast (Invisible v)\n        set [timer power invisible v] to [3]\n        repeat until <(timer power invisible) < [0]>\n            wait (0.1) seconds\n            change [timer power invisible v] by (-0.1)\n        end\n        switch costume to (costume1 v)\n    end\nend\n\nwait (3) seconds\n\n\n\nbroadcast (Fast speed v)\nbroadcast (powers v)\n\nwhen I receive [show power v]\n\nswitch costume to (costume1 v)\nshow\nset size to (50) %\nset [ghost v] effect to (20)\ngo to [front v] layer\ngo to x: (102) y: (-149)\ncreate clone of (_myself_ v)\n\nwhen I receive [powers v]\nswitch costume to (costume1 v)\nshow\nset size to (50) %\nset [ghost v] effect to (20)\ngo to [front v] layer\ngo to x: (102) y: (-149)\ncreate clone of (_myself_ v)\n\nrepeat (10)\n    set [faved v] to [0]\n    set [loved v] to [0]\nend\n\n@main charectar\n\nwhen flag clicked\nhide\nset [fast? v] to [0]\nset [fast speed v] to [5]\nset size to (50) %\nset [level v] to [1]\nwait (2.2) seconds\nReset\nbroadcast (Start Game v)\nbroadcast (StartNewLevel v)\n\ndefine Reset\ngo to x: (-200) y: (0)\nset [g_isplayerdead v] to [false]\nset [g_velocity v] to [0]\nset [g_onground v] to [0]\nset [g_gravity v] to [-1]\nset [jumping v] to [0]\n\nwhen I receive [start game v]\nchange [ghost v] effect by (100)\nshow\nrepeat until <(G_isPlayerDead) = [true]>\n    broadcast (StartAllControl v)\n    broadcast (CheckPlatformDetection v)\n    broadcast (CheckPlayerPosition v)\nend\n\nwhen I receive [startallcontrol v]\nMovementControl\nJumpControl\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    change [g_velocity v] by (G_gravity)\nelse\n    change [g_velocity v] by ((G_gravity) * (2))\nend\nchange y by (G_velocity)\n\ndefine MoveHitBox (speedx)\nchange x by (speedx)\nset [deviation v] to [0]\nrepeat until <<(deviation) = [5]> or <not <touching (ground v)?>>>\n    change y by (1)\n    change [deviation v] by (1)\nend\nif <(deviation) = [5]> then\n    change x by ((0) - (speedx))\n    change y by ((0) - (deviation))\nend\n\nwhen I receive [checkplatformdetection v]\nCheckHitGround <(G_velocity) > [0]>\nMoveHitBox (G_speedX)\n\ndefine JumpControl\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    if <<(G_onGround) > [0]> and <(jumping) = [0]>> then\n        set [g_onground v] to [0]\n        set [jumping v] to [1]\n        set [g_velocity v] to [15]\n    end\nend\nif <<mouse down?> and <(mouse y) > (y position)>> then\n    if <<(G_onGround) > [0]> and <(jumping) = [0]>> then\n        set [g_onground v] to [0]\n        set [jumping v] to [1]\n        set [g_velocity v] to [20]\n    end\nend\n\ndefine CheckHitGround <isjumping>\nrepeat until <not <touching (ground v)?>>\n    if <isjumping> then\n        change y by (-1)\n        set [g_velocity v] to [0]\n    else\n        change y by (1)\n        set [g_velocity v] to [0]\n        set [g_onground v] to [1]\n        if <(jumping) = [1]> then\n            set [jumping v] to [0]\n        end\n    end\nend\n\nwhen I receive [startnewlevel v]\nbroadcast (Reset v) and wait\nbroadcast (Setup v) and wait\n\nwhen I receive [bounce v]\nset [jumping v] to [1]\nset [g_velocity v] to [25]\n\nwhen I receive [checkplayerposition v]\nforever\n    if <(y position) < [-150]> then\n        broadcast (Die v)\n    end\n    if <<touching color (#e46634)?> and <(invisible) = [0]>> then\n        broadcast (Die v)\n    end\n    if <(x position) > [218]> then\n        change [level v] by (1)\n        broadcast (StartNewLevel v)\n    end\n    if <(G_isPlayerDead) = [true]> then\n        wait (0.1) seconds\n        Reset\n        broadcast (Start Game v)\n    end\nend\n\nwhen I receive [startnewlevel v]\nReset\nbroadcast (Start Game v)\n\nwhen I receive [die v]\nset [g_isplayerdead v] to [true]\n\ndefine MovementControl\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    set [g_speedx v] to (fast speed)\nelse\n    if <<mouse down?> and <(mouse x) > (x position)>> then\n        set [g_speedx v] to [8]\n    else\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            set [g_speedx v] to ((fast speed) * (-1))\n        else\n            if <<mouse down?> and <(mouse x) < (x position)>> then\n                set [g_speedx v] to [-8]\n            else\n                set [g_speedx v] to [0]\n            end\n        end\n    end\nend\n\nif <(invisible) = [0]> then\n\nwhen I receive [fast speed v]\nset [fast? v] to [1]\nset [fast speed v] to [10]\nwait (3) seconds\nset [fast speed v] to [5]\nset [fast? v] to [0]\n\nrepeat (10)\n    set [faved v] to [0]\n    set [loved v] to [0]\nend\n\n@Sprite12\n\nwhen flag clicked\nshow\nswitch costume to (costume2 v)\ngo to [front v] layer\ngo [forward v] (100) layers\ngo to x: (36) y: (28)\nwait (3) seconds\nglide (0.2) secs to x: (36) y: (-300)\nset [ghost v] effect to (100)\nforever\n    switch costume to (costume1 v)\n    go to x: (36) y: (28)\n    go to [front v] layer\n    go [forward v] (100) layers\nend\n\nwhen flag clicked\n\nwait (1) seconds\n\nshow\n\n