Space | A Platformer ･ﾟ✧

Instructions: Welcome, young space traveler.\nAre you ready to begin the Quest?\n\nYou must make it to the end of each part of the Quest to prove your agility, skill, and wits. Pass all, and you will be revered as a legend forever!\n\nAre you up for the challenge?\n\n---\n\n☆ Controls: Arrow keys, WASD, or tap\n☆ Avoid spikes and saws\n☆ Jump on extremely high-tech trampolines\n☆ You can wall-jump!\n \nThis is a challenging platformer, but all 15 levels are possible! If you get stuck on a level, click the skip button on the bottom left or press S to skip it.\n\nTo restart a level, click the restart button on the bottom left or press R.\n\nThe numbers on the bottom right will tell you which level you are currently on.\n\nGood luck!\n\n---\n\nIf you made it all the way to the end with only two skips or less, congrats! You have passed part 1 of the Quest, and are eligible to begin part 2 after its release.\n\n---\n\nHave fun, and don't forget to love, fave, and follow ;)\n\n150 loves for part 2!!\n\n---\n\n☆ Engine by @thefunkypanda\n☆ Music by @-xaf-\n☆ Mf icon by @alphabetica\n☆ Level number display by @mjm3 (highly edited by me)\n☆ Saw graphic by @Ziyu3\n☆ Trampoline code & player motion trail by @flayflyanimations\n☆ Shake by @-canCode-\n☆ Fireworks by @77tigers\n☆ Bg from GIFER\n\n---\n\n#games #all #platformer #space #galaxy #moon #black #purple #green #stars #mobile #friendly #mobile-friendly #mf #fun #music #hard #challenging #quest #part #one #1 #15 #levels #win #travel #traveler #player #game #play #wall-jump #wall-jumping #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer #games #all #platformer\n\nSorry about all the tags ;w; If this gets on trending, I'll remove every single extra one!

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop4 v)\nset volume to (20) %\nforever\n    play sound [Nebula v] until done\nend\n\n@Blank\n\n@Player\n\nwhen I receive [restart v]\ngo to x: (-200) y: (0)\nswitch costume to (right v)\nwait (0.01) seconds\nset [clone v] to []\n\ndefine shake (direction)\npoint in direction (direction)\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\npoint in direction ((direction) + (180))\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\n\ndefine Platform Physics (speed) (friction) (jump height)\nset rotation style [left-right v]\nchange [player3: y vel v] by (-1)\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [player3: x vel v] by (speed)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [player3: x vel v] by ((speed) * (-1))\nend\nset [player3: x vel v] to ((Player3: X Vel) * (friction))\nchange x by (Player3: X Vel)\nset [slope v] to [0]\nif <touching (ground v)?> then\n    repeat until <<not <touching (ground v)?>> or <(slope) = [-8]>>\n        change [slope v] by (-1)\n        change y by (1)\n    end\nend\nif <touching (ground v)?> then\n    change y by (slope)\n    repeat until <not <touching (ground v)?>>\n        change x by ((([abs v] of (Player3: X Vel) ) / (Player3: X Vel)) * (-1))\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        set [player3: y vel v] to [13]\n        if <(Player3: X Vel) > [0]> then\n            set [player3: x vel v] to [-6]\n        else\n            set [player3: x vel v] to [6]\n        end\n    else\n        set [player3: x vel v] to [0]\n    end\nend\nchange y by (Player3: Y Vel)\nif <touching (ground v)?> then\n    repeat until <not <touching (ground v)?>>\n        change y by ((([abs v] of (Player3: Y Vel) ) / (Player3: Y Vel)) * (-1))\n    end\n    set [player3: y vel v] to [0]\nend\nchange y by (-1)\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (ground v)?>> then\n    set [player3: y vel v] to [14]\nend\nchange y by (1)\n\nwhen I start as a clone\nif <[] < (Clone)> then\n    switch costume to (trail v)\n    repeat (10)\n        change y by (5)\n        turn right (5) degrees\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nelse\n    switch costume to (trail v)\n    repeat (10)\n        change size by (-5)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset [clone v] to []\nforever\n    create clone of (_myself_ v)\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        switch costume to (right v)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n            switch costume to (left v)\n        end\n    end\nend\n\nwhen flag clicked\nswitch costume to (right v)\n\nwhen flag clicked\nset [level v] to [0]\n\ndefine Check Touching\nif <<touching (trampoline v)?> or <touching (trampoline2 v)?>> then\n    set [player3: y vel v] to [20]\n    set [pitch v] effect to (0)\n    start sound [Bounce v]\nend\nif <<touching (saws v)?> or <<touching (spikes v)?> or <(y position) < [-180]>>> then\n    go to x: (-200) y: (0)\n    set [clone v] to [Die]\n    set [pitch v] effect to (0)\n    start sound [Die v]\n    broadcast (shake v)\n    switch costume to (right v)\n    wait (0.01) seconds\n    set [clone v] to []\nend\nif <(x position) > [220]> then\n    if <not <((Number of levels) - (1)) < (Level)>> then\n        set [pitch v] effect to (0)\n        start sound [Next v]\n        change [level v] by (1)\n        go to x: (-200) y: (-65)\n        switch costume to (right v)\n    end\nend\n\nwhen flag clicked\nforever\n    Check Touching\nend\n\nwhen flag clicked\nwait until <(Level) = (Number of levels)>\nbroadcast (confetti v)\n\nwhen flag clicked\nset volume to (20) %\n\nwhen flag clicked\nshow\nset [level v] to [1]\npoint in direction (90)\nswitch costume to (player v)\nset [player3: x vel v] to [0]\nset [player3: y vel v] to [0]\ngo to x: (-200) y: (0)\nforever\n    Platform Physics [1] [0.9] [20]\nend\n\nwhen flag clicked\nwait until <(Level) = (Number of levels)>\nbroadcast (confetti v)\n\n@Ground\n\ndefine shake (direction)\npoint in direction (direction)\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\npoint in direction ((direction) + (180))\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nCheck number of levels\n\ndefine Check number of levels\nswitch costume to (costume1 v)\nswitch costume to ((costume [number v]) - (1))\nset [number of levels v] to (costume [number v])\n\nset [level v] to [14]\n\nwhen I receive [shake v]\nshake [45]\nshake [-45]\nshake [135]\nshake [-150]\ngo to x: (0) y: (0)\n\nset [level v] to [16]\n\n@Spikes\n\nwhen I receive [shake v]\nshake [45]\nshake [-45]\nshake [135]\nshake [-150]\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\ngo [forward v] (1) layers\nforever\n    switch costume to (Level)\nend\n\ndefine shake (direction)\npoint in direction (direction)\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\npoint in direction ((direction) + (180))\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\n\nset [level v] to [9]\n\n@Saws\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (no v)\nforever\n    turn right (7) degrees\nend\n\ndefine level number (level num) go to x: (x) y: (y)\nif <(Level) = (level num)> then\n    go to x: (x) y: (y)\n    switch costume to (yes v)\n    wait until <not <(Level) = (level num)>>\nelse\n    switch costume to (no v)\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    level number [6] go to x: [63] y: [-109]\n    level number [9] go to x: [110] y: [-109]\n    level number [14] go to x: [90] y: [-109]\nend\n\nwhen I receive [shake v]\nshake [45]\nshake [-45]\nshake [135]\nshake [-150]\n\ndefine shake (direction)\npoint in direction (direction)\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\npoint in direction ((direction) + (180))\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\n\n@Trampoline\n\ndefine level number (level num) go to x: (x) y: (y)\nif <(level num) = (Level)> then\n    show\n    go to x: (x) y: (y)\nend\n\nwhen flag clicked\ngo to [back v] layer\nset [level v] to [1]\nswitch costume to (costume1 v)\nhide\ngo to x: (0) y: (0)\nforever\n    hide\n    level number [5] go to x: [10] y: [-100]\n    level number [6] go to x: [-63] y: [-100]\n    level number [10] go to x: [-100] y: [-100]\nend\n\nlevel number [14] go to x: [-100] y: [-100]\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        repeat (4)\n            next costume\n            wait () seconds\n        end\n        wait until <not <touching (player v)?>>\n        repeat (4)\n            switch costume to ((costume [number v]) - (1))\n            wait () seconds\n        end\n    end\nend\n\nwhen I receive [shake v]\nshake [45]\nshake [-45]\nshake [135]\nshake [-150]\n\ndefine shake (direction)\npoint in direction (direction)\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\npoint in direction ((direction) + (180))\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\n\n@Text\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@Moon\n\nwhen flag clicked\ngo to [back v] layer\nshow\ngo to x: (-217) y: (160)\nset size to (100) %\nreset timer\nforever\n    repeat (50)\n        change size by (((140) - (size)) / (18))\n    end\n    repeat (50)\n        change size by (((size) - (100)) / (-18))\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nswitch costume to (mf-icon \(2\) \(1\) \(1\)8 v)\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\n    change [ghost v] effect by (25)\nend\n\n@Score2\n\nwhen flag clicked\nrepeat (10)\n    hide\n    delete this clone\nend\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (1) layers\nforever\n    set [brightness v] effect to (-5)\n    show\n    go to x: ((242) - ((id) * (14))) y: (-166)\n    switch costume to (letter ((length of (Level)) - ((id) - (1))) of (Level))\n    set size to (75) %\nend\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\ngo to [front v] layer\nshow\ngo to x: (-166) y: (157)\nset [id v] to [1]\ncreate clone of (_myself_ v)\nchange [id v] by (1)\ncreate clone of (_myself_ v)\nset [id v] to [0]\n\nwhen I receive [shake v]\nshake [45]\nshake [-45]\nshake [135]\nshake [-150]\n\nwhen I start as a clone\nset [level v] to [1]\nforever\n    if <(Number of levels) = (Level)> then\n        hide\n        delete this clone\n    end\nend\n\nset [level v] to [1]\n\n@Trampoline2\n\ndefine level number (level num) go to x: (x) y: (y)\nif <(level num) = (Level)> then\n    show\n    go to x: (x) y: (y)\nend\n\nwhen flag clicked\ngo to [back v] layer\nset [level v] to [1]\nswitch costume to (costume1 v)\nhide\ngo to x: (0) y: (0)\nforever\n    hide\n    level number [10] go to x: [48] y: [-100]\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        repeat (4)\n            next costume\n            wait () seconds\n        end\n        wait until <not <touching (player v)?>>\n        repeat (4)\n            switch costume to ((costume [number v]) - (1))\n            wait () seconds\n        end\n    end\nend\n\nwhen I receive [shake v]\nshake [45]\nshake [-45]\nshake [135]\nshake [-150]\n\ndefine shake (direction)\npoint in direction (direction)\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\npoint in direction ((direction) + (180))\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\n\nlevel number [5] go to x: [-63] y: [-100]\n\n@notif2\n\nwhen flag clicked\nhide\n\nswitch costume to (costume7 v)\ngo to x: (-189) y: (-180)\nhide\nwait (pick random (8) to (15)) seconds\nshow\nrepeat until <[-165] = (y position)>\n    change y by (((((y position) + (160)) * (-1)) - (5)) / (6))\nend\nwait (3.5) seconds\nrepeat until <[-180] = (y position)>\n    change y by ((((((y position) + (164)) * (-1)) - (0)) / (5)) * (-1))\nend\nhide\nforever\n    wait (pick random (14) to (26)) seconds\n    show\n    repeat until <[-165] = (y position)>\n        change y by (((((y position) + (160)) * (-1)) - (5)) / (6))\n    end\n    wait (3.5) seconds\n    repeat until <[-180] = (y position)>\n        change y by ((((((y position) + (164)) * (-1)) - (0)) / (5)) * (-1))\n    end\n    hide\nend\n\n@Sprite6\n\nwhen this sprite clicked\nif <(Number of levels) > (Level)> then\n    set [level v] to ((Level) + (1))\n    broadcast (restart v)\nend\n\nwhen flag clicked\n\nwhen flag clicked\nset [level v] to [1]\nshow\ngo to x: (0) y: (-36)\nforever\n    if <(Number of levels) = (Level)> then\n        hide\n    end\nend\n\ngo to x: (375) y: (-36)\n\nset [level v] to [0]\n\ngo to x: (50) y: (-36)\n\nwhen this sprite clicked\n\nwhen [s v] key pressed\nif <(Number of levels) > (Level)> then\n    set [level v] to ((Level) + (1))\n    broadcast (restart v)\nend\n\n@Sprite1\n\nwhen flag clicked\nset rotation style [don't rotate v]\nhide\ndelete (all) of [particles v]\ndelete (all) of [px v]\ndelete (all) of [py v]\ndelete (all) of [pxv v]\ndelete (all) of [pyv v]\ndelete (all) of [type v]\ndelete (all) of [colour v]\n\ndefine Edit\nif <not <<[type v] contains [1]?> or <[10] < (length of [pyv v])>>> then\n    if <mouse down?> then\n        add (pick random (3) to (4)) to [particles v]\n        add (mouse x) to [px v]\n        add [-190] to [py v]\n        add (pick random (-2) to (2)) to [pxv v]\n        add [7] to [pyv v]\n        add [1] to [type v]\n        Random colour\n    else\n        add (pick random (3) to (4)) to [particles v]\n        add (pick random (-200) to (200)) to [px v]\n        add [-190] to [py v]\n        add (pick random (-2) to (2)) to [pxv v]\n        add [11] to [pyv v]\n        add [1] to [type v]\n        Random colour\n    end\nend\nset [iterate v] to [0]\nrepeat (length of [particles v])\n    change [iterate v] by (1)\n    replace item (iterate) of [px v] with ((item (iterate) of [px v]) + (item (iterate) of [pxv v]))\n    replace item (iterate) of [py v] with ((item (iterate) of [py v]) + (item (iterate) of [pyv v]))\n    replace item (iterate) of [pxv v] with ((0) + ((item (iterate) of [pxv v]) * (0.99)))\n    replace item (iterate) of [pyv v] with ((-0.05) + ((item (iterate) of [pyv v]) * (0.99)))\n    replace item (iterate) of [particles v] with ((item (iterate) of [particles v]) + (0.2))\n    if <[10] < (item (iterate) of [particles v])> then\n        delete (iterate) of [particles v]\n        delete (iterate) of [px v]\n        delete (iterate) of [py v]\n        delete (iterate) of [pxv v]\n        delete (iterate) of [pyv v]\n        delete (iterate) of [type v]\n        delete (iterate) of [colour v]\n    else\n        if <[7] < (item (iterate) of [particles v])> then\n            if <[1] = (item (iterate) of [type v])> then\n                replace item (iterate) of [type v] with [0]\n                repeat (50)\n                    add (pick random (2) to (-2)) to [particles v]\n                    add (item (iterate) of [px v]) to [px v]\n                    add (item (iterate) of [py v]) to [py v]\n                    add (([sin v] of (pick random (1) to (360)) ) * (pick random (-5) to (5))) to [pxv v]\n                    add ((3) + (([cos v] of (pick random (1) to (360)) ) * (pick random (-5) to (5)))) to [pyv v]\n                    add [0] to [type v]\n                    add (item (iterate) of [colour v]) to [colour v]\n                end\n            end\n        end\n    end\n    if <(item (iterate) of [py v]) < [-200]> then\n        delete (iterate) of [particles v]\n        delete (iterate) of [px v]\n        delete (iterate) of [py v]\n        delete (iterate) of [pxv v]\n        delete (iterate) of [pyv v]\n        delete (iterate) of [type v]\n        delete (iterate) of [colour v]\n    end\nend\n\ndefine Render\ngo to x: (0) y: (0)\nset [ghost v] effect to (88)\nstamp\nset [iterate v] to [0]\nrepeat (length of [particles v])\n    change [iterate v] by (1)\n    set pen color to (join [0x] (item (iterate) of [colour v]))\n    if <(item (iterate) of [particles v]) < [9]> then\n        if <[5] < (item (iterate) of [particles v])> then\n            if <(item (iterate) of [type v]) = [1]> then\n                set pen color to (join [0x] (item (iterate) of [colour v]))\n            else\n                set pen color to (join (join [0x] (join (round ((14) - ((item (iterate) of [particles v]) * (1.6)))) [1])) (item (iterate) of [colour v]))\n            end\n        end\n        set pen size to (1)\n        go to x: (item (iterate) of [px v]) y: (item (iterate) of [py v])\n        pen down\n        if <(item (iterate) of [type v]) = [1]> then\n            set pen size to (((12) + (item (iterate) of [particles v])) / (4))\n        else\n            set pen size to (item (iterate) of [particles v])\n        end\n        go to x: ((item (iterate) of [pxv v]) + (item (iterate) of [px v])) y: ((item (iterate) of [pyv v]) + (item (iterate) of [py v]))\n        pen up\n    end\n    go to x: (item (iterate) of [px v]) y: (item (iterate) of [py v])\n    if <<[7] < (item (iterate) of [particles v])> or <<(item (iterate) of [particles v]) < [3]> or <[1] = (item (iterate) of [type v])>>> then\n        repeat (pick random (1) to (pick random (1) to (2)))\n            set pen size to (pick random (pick random (1) to (20)) to (pick random (120) to (90)))\n            set pen color to (join [0x] (join [03] (item (iterate) of [colour v])))\n            if <(item (iterate) of [particles v]) < [3]> then\n                set pen color to (join [0x] (join [02] (item (iterate) of [colour v])))\n            end\n            pen down\n            pen up\n        end\n        if <[1] = (item (iterate) of [type v])> then\n            repeat (3)\n                set pen size to (pick random (item (iterate) of [particles v]) to (((item (iterate) of [particles v]) - (3)) * (30)))\n                set pen color to (join (join [0x0] (letter (round ((5) + (item (iterate) of [particles v]))) of [0123456789ABCDEF])) (item (iterate) of [colour v]))\n                pen down\n                pen up\n            end\n        end\n    end\nend\n\ndefine Random colour\nif <(pick random (1) to (3)) = [1]> then\n    add (join [FF] (join (join (letter (pick random (10) to (16)) of [0123456789ABCDEF]) (letter (pick random (1) to (16)) of [0123456789ABCDEF])) (join (letter (pick random (1) to (5)) of [0123456789ABCDEF]) (letter (pick random (1) to (16)) of [0123456789ABCDEF])))) to [colour v]\nelse\n    if <(pick random (1) to (2)) = [1]> then\n        add (join (join (letter (pick random (1) to (5)) of [0123456789ABCDEF]) (letter (pick random (1) to (16)) of [0123456789ABCDEF])) (join [FF] (join (letter (pick random (10) to (16)) of [0123456789ABCDEF]) (letter (pick random (1) to (16)) of [0123456789ABCDEF])))) to [colour v]\n    else\n        add (join (join (letter (pick random (10) to (16)) of [0123456789ABCDEF]) (letter (pick random (1) to (16)) of [0123456789ABCDEF])) (join (join (letter (pick random (1) to (5)) of [0123456789ABCDEF]) (letter (pick random (1) to (16)) of [0123456789ABCDEF])) [FF])) to [colour v]\n    end\nend\n\nwhen I receive [confetti v]\nforever\n    Render\n    Edit\nend\n\nwhen flag clicked\nerase all\n\nwhen flag clicked\nswitch costume to (backdrop4 v)\n\ngo to x: (0) y: (0)\n\nset [gif v] to [1]\n\nforever\n\nset [gif v] to [1]\nrepeat (15)\nwait (pick random (0) to (2.9)) seconds\nset [gif v] to [17]\nrepeat (42)\n    switch costume to (join [5EDx \(1\)] (gif))\n    change [gif v] by (1)\nend\nwait (pick random (0) to (2.9)) seconds\n\nswitch costume to (join [5EDx \(1\)] (gif))\n\nchange [gif v] by (1)\n\nwhen I receive [confetti v]\nswitch costume to (backdrop4 v)\n\nset size to (100) %\n\nwhen I receive [confetti v]\n\n@Saws2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (no v)\nforever\n    turn right (7) degrees\nend\n\ndefine level number (level num) go to x: (x) y: (y)\nif <(Level) = (level num)> then\n    go to x: (x) y: (y)\n    switch costume to (yes v)\n    wait until <not <(Level) = (level num)>>\nelse\n    switch costume to (no v)\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    level number [14] go to x: [192] y: [130]\nend\n\nwhen I receive [shake v]\nshake [45]\nshake [-45]\nshake [135]\nshake [-150]\n\ndefine shake (direction)\npoint in direction (direction)\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\npoint in direction ((direction) + (180))\nmove (5) steps\npoint in direction (90)\nwait (0.0001) seconds\n\n@Sprite2\n\nwhen this sprite clicked\nif <(Number of levels) > (Level)> then\n    broadcast (restart v)\nend\n\nwhen flag clicked\n\nwhen flag clicked\nset [level v] to [1]\nshow\ngo to x: (0) y: (0)\nforever\n    if <(Number of levels) = (Level)> then\n        hide\n    end\nend\n\ngo to x: (375) y: (-36)\n\nset [level v] to [0]\n\nwhen [s v] key pressed\nif <(Number of levels) > (Level)> then\n    broadcast (restart v)\nend\n\n@Sprite3\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nswitch costume to (5edx v)\nset size to (160) %\nset [gif v] to [1]\nwait (pick random (0) to (2.9)) seconds\nforever\n    set [gif v] to [1]\n    repeat (15)\n        switch costume to (join [5EDx \(1\)] (gif))\n        change [gif v] by (1)\n    end\n    wait (pick random (0) to (2.9)) seconds\n    set [gif v] to [17]\n    repeat (42)\n        switch costume to (join [5EDx \(1\)] (gif))\n        change [gif v] by (1)\n    end\n    wait (pick random (0) to (2.9)) seconds\nend\n\nnext costume\n\nforever\n\nforever\n\nset [gif v] to [1]\n\nwhen I receive [confetti v]\nhide\n\n