Purple || Puzzle Platformer


@Stage\n\nwhen I receive [intro done v]\nswitch backdrop to (1 v)\n\nwhen flag clicked\nswitch backdrop to (2 v)\n\n@Blank\n\n@Intro\n\nwhen flag clicked\nIntro\n\ndefine Intro\nhide\ngo to x: (0) y: (0)\nset size to (100) %\npoint in direction (90)\nclear graphic effects\nset [sequence2 v] to [1]\nset [intro: i v] to [0]\nset [i2 v] to [0]\nstart sound [Template v]\nswitch costume to (pink v)\ncreate clone of (_myself_ v)\nwait (.2) seconds\nswitch costume to (circle 1 v)\ncreate clone of (_myself_ v)\nwait until <(Sequence2) = [2]>\nwait (.2) seconds\nswitch costume to (circle 2 v)\ncreate clone of (_myself_ v)\nwait (.01) seconds\nswitch costume to (white bg v)\ncreate clone of (_myself_ v)\nwait until <(Sequence2) = [3]>\nwait (.1) seconds\nswitch costume to (filler 1 v)\ncreate clone of (_myself_ v)\nwait until <(Sequence2) = [4]>\nswitch costume to (logo v)\ncreate clone of (_myself_ v)\nwait until <(Sequence2) = [5]>\nswitch costume to (name v)\ncreate clone of (_myself_ v)\nwait until <(Sequence2) = [6]>\nswitch costume to (filler 2 v)\ncreate clone of (_myself_ v)\nwait until <(Sequence2) = [7]>\nbroadcast (Delete Clones v) and wait\nset [sequence2 v] to [8]\nwait until <(Sequence2) = [9]>\nwait (.2) seconds\nstop [this script v]\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    show\n    wait until <(Sequence2) = [2]>\n    wait (.2) seconds\n    delete this clone\nelse\n    if <<(costume [number v]) > [1]> and <[4] > (costume [number v])>> then\n        show\n        set size to (0) %\n        repeat (13)\n            switch costume to (blank v)\n            change size by (((1600) - (size)) / (4))\n            switch costume to (circle 1 v)\n        end\n        wait (.1) seconds\n        repeat (15)\n            change [ghost v] effect by (7)\n            switch costume to (circle 1 v)\n            change size by (((0) - (size)) / (4))\n        end\n        set [sequence2 v] to [2]\n        delete this clone\n    else\n        if <<(costume [number v]) > [3]> and <[6] > (costume [number v])>> then\n            show\n            switch costume to (blank2 v)\n            set size to (1600) %\n            go to [front v] layer\n            clear graphic effects\n            repeat (15)\n                change [ghost v] effect by (6)\n                switch costume to (circle 2 v)\n                change size by (((0) - (size)) / (4))\n            end\n            set [sequence2 v] to [3]\n            delete this clone\n        else\n            if <(costume [number v]) = [6]> then\n                show\n                go to [back v] layer\n                wait until <(Sequence2) = [7]>\n                delete this clone\n            else\n                if <(costume [number v]) = [7]> then\n                    show\n                    go to x: (0) y: (360)\n                    repeat (17)\n                        change y by (((0) - (y position)) / (4.5))\n                    end\n                    go to x: (0) y: (0)\n                    set [sequence2 v] to [4]\n                    wait until <(Sequence2) = [7]>\n                    delete this clone\n                else\n                    if <(costume [number v]) = [8]> then\n                        show\n                        point in direction (-45)\n                        set [ghost v] effect to (100)\n                        set size to (0) %\n                        repeat (20)\n                            change size by (((120) - (size)) / (5))\n                            change [ghost v] effect by (-10)\n                            turn right (((90) - (direction)) / (5)) degrees\n                        end\n                        set [sequence2 v] to [5]\n                        repeat (23)\n                            change size by (((85) - (size)) / (5))\n                            change y by (((40) - (y position)) / (5))\n                        end\n                        wait until <(Sequence2) = [7]>\n                        delete this clone\n                    else\n                        if <(costume [number v]) = [9]> then\n                            show\n                            go to x: (-240) y: (-60)\n                            set [ghost v] effect to (100)\n                            repeat (23)\n                                change [ghost v] effect by (-10)\n                                change x by (((0) - (x position)) / (5))\n                            end\n                            wait (.2) seconds\n                            set [sequence2 v] to [6]\n                            wait until <(Sequence2) = [7]>\n                            delete this clone\n                        else\n                            if <(costume [number v]) = [10]> then\n                                show\n                                go to x: (0) y: (360)\n                                repeat (17)\n                                    change y by (((0) - (y position)) / (4.5))\n                                end\n                                go to x: (0) y: (0)\n                                set [sequence2 v] to [7]\n                                wait until <(Sequence2) = [8]>\n                                wait (.01) seconds\n                                set [sequence2 v] to [9]\n                                repeat (10)\n                                    change [ghost v] effect by (10)\n                                end\n                                broadcast (Play Scene v)\n                                broadcast (Play Scene v)\n                                delete this clone\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [delete clones v]\nif <not <(costume [number v]) = [10]>> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\n@Player\n\nwhen I receive [move player v]\nif <not <touching (danger v)?>> then\n    change x by (Move X)\n    change y by (Move Y)\nend\n\nwhen flag clicked\nset [level v] to [0]\nset volume to (100) %\nset [deaths v] to [0]\nhide\n\ndefine Platformer Physics (speed) (friction) (jump height)\nif <(Can Move?) = [1]> then\n    if <not <<touching (water v)?> or <touching (water2 v)?>>> then\n        if <touching (ladders v)?> then\n            Ladders\n        else\n            if <(Gravity) = [1]> then\n                change [y velocity v] by (-1)\n            end\n            if <(Gravity) = [2]> then\n                change [y velocity v] by (1)\n            end\n        end\n    end\n    if  then\n        change [x velocity v] by (speed)\n    end\n    if  then\n        change [x velocity v] by ((0) - (speed))\n    end\n    set [x velocity v] to ((X Velocity) * (friction))\n    change x by (X Velocity)\n    set [slope v] to [0]\n    if <<<touching (level v)?> or <touching (locked v)?>> or <<touching (motherboard v)?> or <<touching (coinlock v)?> or >>> then\n        repeat until <<not <<<touching (level v)?> or <touching (locked v)?>> or <<touching (motherboard v)?> or <<touching (coinlock v)?> or <touching (wall v)?>>>>> or <(Slope) = [-8]>>\n            change [slope v] by (-1)\n            change y by (1)\n        end\n    end\n    if <<<touching (level v)?> or <touching (locked v)?>> or <<touching (motherboard v)?> or <<touching (coinlock v)?> or <touching (wall v)?>>>> then\n        change y by (Slope)\n        repeat until <not <<<touching (level v)?> or <touching (locked v)?>> or <<touching (motherboard v)?> or <<touching (coinlock v)?> or <<touching (moving v)?> or <touching (wall v)?>>>>>>\n            change x by ((0) - (([abs v] of (X Velocity) ) / (X Velocity)))\n        end\n        set [x velocity v] to [0]\n    end\n    change y by (Y Velocity)\n    if <<<touching (level v)?> or <touching (locked v)?>> or <<touching (motherboard v)?> or <<touching (locked v)?> or <<touching (coinlock v)?> or <touching (wall v)?>>>>> then\n        repeat until <not <<<touching (level v)?> or <touching (locked v)?>> or <<touching (motherboard v)?> or <<touching (coinlock v)?> or <touching (wall v)?>>>>>\n            change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n        end\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if < and <<<<touching (level v)?> or <touching (wall v)?>> or <touching (moving v)?>> or <<touching (coinlock v)?> or <<touching (jumpables v)?> or <touching (motherboard v)?>>>>> then\n        if <not <touching (water v)?>> then\n            if <(Gravity) = [1]> then\n                set [y velocity v] to (jump height)\n            end\n            if <(Gravity) = [2]> then\n                set [y velocity v] to [-12.8]\n            end\n        end\n    end\n    change y by (1)\n    if <<touching (water v)?> or <touching (water2 v)?>> then\n        if  then\n            if <(Y Velocity) < [11]> then\n                if <(Gravity) = [1]> then\n                    change [y velocity v] by (0.7)\n                end\n                if <(Gravity) = [2]> then\n                    change [y velocity v] by (-0.7)\n                end\n            end\n        end\n        if  then\n            if <(Gravity) = [1]> then\n                change [y velocity v] by (-0.7)\n            end\n            if <(Gravity) = [2]> then\n                change [y velocity v] by (0.7)\n            end\n        end\n        if <touching (water v)?> then\n            if <not > then\n                change [y velocity v] by (-0.1)\n            end\n        end\n    end\n    if < and <touching (jump rings v)?>> then\n        set [y velocity v] to [13]\n    end\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (small jump rings v)?>> then\n        set [y velocity v] to [8]\n    end\nend\n\ndefine Detection\nif <<(x position) > [230]> and <not <(Level) = [16]>>> then\n    broadcast (Next v)\n    broadcast (Lock v)\n    broadcast (Reset orb v)\n    broadcast (Next Level v)\n    set size to (100) %\n    start sound [Ding Sound Effect v]\n    set [level v] to ((Level) + (1))\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\n    Respawn Position\nend\nif <<<touching (danger v)?> or <<touching (saws v)?> or <<touching (bullet v)?> or <<touching (turret v)?> or <<(y position) < [-170]> or <<<(y position) > [179]> and <(Gravity) = [2]>> or <<touching (one v)?> or <<touching (spark v)?> or <<<touching (water v)?> and <(Yellow?) = [1]>> or >>>>>>>>> and <not <(CHEAT) = [1]>>> then\n    Restart\nend\nif <touching (bouncy v)?> then\n    start sound [Big Boing v]\n    set [y velocity v] to [18]\nend\nif <touching (trampolines v)?> then\n    set [y velocity v] to [18]\nend\nif  then\n    point in direction (-90)\nend\nif  then\n    point in direction (90)\nend\nset rotation style [left-right v]\nPortals\nif <touching (reverse v)?> then\n    set [gravity v] to [2]\nend\nif <touching (normal v)?> then\n    set [gravity v] to [1]\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (yellow rings v)?>> then\n    if <(Gravity) = [1]> then\n        set [y velocity v] to [12.8]\n    else\n        set [y velocity v] to [-12.8]\n    end\nend\n\nwhen I receive [intro done v]\npoint in direction (90)\nset size to (100) %\nset [cheat v] to [0]\nset [totalcollected v] to [0]\nwait (0.1) seconds\nshow\nswitch costume to (player v)\ngo to x: (-215) y: (-36)\nset rotation style [left-right v]\nset [gravity v] to [1]\nset [level v] to [1]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    if <(size) = [75]> then\n        Platformer Physics [2] [0.78] [10.5]\n        Detection\n    else\n        Platformer Physics [2] [0.8] [12.8]\n        Detection\n    end\nend\n\nwhen flag clicked\nforever\n    Cheats Menu\nend\n\ndefine Cheats Menu\nif <<<key (1 v) pressed?> and <<(username) = [250119code2]> or <(username) = [250119test2]>>> and <not <(CHEAT) = [1]>>> then\n    set [cheat v] to [1]\n    wait (0.3) seconds\nelse\n    if <<key (1 v) pressed?> and <(CHEAT) = [1]>> then\n        set [cheat v] to [0]\n        wait (0.3) seconds\n    end\nend\nif <<key (up arrow v) pressed?> and <(CHEAT) = [1]>> then\n    set [y velocity v] to [8]\nend\nif <<key (down arrow v) pressed?> and <(CHEAT) = [1]>> then\n    set [y velocity v] to [-6]\nend\n\nwhen flag clicked\nforever\n    set [x v] to (round (x position))\n    set [y v] to (round (y position))\nend\n\nwhen I receive [restart v]\nbroadcast (Create Clone v)\nif <<(Level) = []> or > then\n    broadcast (Reset v)\nend\nstart sound [Crunch v]\nset [deaths v] to ((DEATHS) + (1))\ncreate clone of (_myself_ v)\npoint in direction (90)\ngo to x: (-215) y: (-60)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\n\nwhen I receive [transition v]\npoint in direction (90)\ngo to x: (-215) y: (-70)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\n\nwhen I start as a clone\nclear graphic effects\npoint in direction (90)\nset rotation style [all around v]\nrepeat (10)\n    change y by (6)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(username) = [250119code2]> then\nend\n\nwhen flag clicked\nforever\n    if <(username) = [250119code2]> then\nend\n\nwhen I receive [intro done v]\ngo to [front v] layer\n\nwhen flag clicked\ngo [forward v] (1) layers\nforever\n    wait until <<touching (water v)?> or <touching (water2 v)?>>\n    set [y velocity v] to ((Y Velocity) / (2))\n    wait until <not <<touching (water v)?> or <touching (water2 v)?>>>\nend\n\nwhen I receive [jump v]\nset [y velocity v] to [10]\n\nwhen I receive [intro done v]\nset [level v] to [1]\n\ndefine Respawn Position\nif <(Level) = [1]> then\n    go to x: (-215) y: (-36)\n    point in direction (90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [2]> then\n    go to x: (-215) y: (-68)\n    point in direction (90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [3]> then\n    go to x: (-215) y: (-59)\n    point in direction (90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [4]> then\n    go to x: (-215) y: (-58)\n    point in direction (90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [5]> then\n    go to x: (-215) y: (-58)\n    point in direction (90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [6]> then\n    go to x: (170) y: (-37)\n    point in direction (-90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [7]> then\n    go to x: (189) y: (108)\n    point in direction (-90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [8]> then\n    go to x: (-215) y: (-55)\n    point in direction (90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [9]> then\n    go to x: (-215) y: (-58)\n    point in direction (90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [10]> then\n    go to x: (-215) y: (-58)\n    point in direction (90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [11]> then\n    go to x: (-215) y: (-36)\n    point in direction (90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [12]> then\n    go to x: (-215) y: (-63)\n    point in direction (90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [13]> then\n    go to x: (-215) y: (-63)\n    point in direction (90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [14]> then\n    go to x: (-215) y: (-58)\n    point in direction (90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [15]> then\n    go to x: (-215) y: (-58)\n    point in direction (90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <(Level) = [16]> then\n    go to x: (-215) y: (-63)\n    point in direction (90)\n    set size to (100) %\n    set [gravity v] to [1]\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\n\ndefine Portals\nif <(Level) = [2]> then\n    if <<(x position) > [160]> and <touching (portals v)?>> then\n        go to x: (50) y: (-68)\n        broadcast (Effect v)\n    end\n    if <<(x position) < [45]> and <touching (portals v)?>> then\n        go to x: (158) y: (109)\n        broadcast (Effect v)\n    end\nend\nif <(Level) = [3]> then\n    if <<(y position) < [-150]> and <touching (portals v)?>> then\n        go to x: (138) y: (85)\n        broadcast (Effect v)\n    end\n    if <<(y position) > [150]> and <touching (portals v)?>> then\n        go to x: (138) y: (-140)\n        set [y velocity v] to [18]\n        broadcast (Effect v)\n    end\nend\nif <(Level) = [4]> then\n    if <<(y position) > [150]> and <touching (portals v)?>> then\n        go to x: (120) y: (-140)\n        broadcast (Effect v)\n    end\n    if <<(y position) < [-150]> and <touching (portals v)?>> then\n        go to x: (-151) y: (140)\n        set [y velocity v] to [-16]\n        broadcast (Effect v)\n    end\nend\nif <(Level) = [5]> then\n    if <<(y position) < [-150]> and <touching (portals v)?>> then\n        go to x: (-184) y: (130)\n        broadcast (Effect v)\n    end\n    if <<(y position) > [150]> and <touching (portals v)?>> then\n        go to x: (-75) y: (-140)\n        set [y velocity v] to [-3]\n        broadcast (Effect v)\n    end\nend\nif <(Level) = [6]> then\n    if <<(x position) < [-170]> and <touching (portals v)?>> then\n        go to x: (110) y: (104)\n        broadcast (Effect v)\n    end\n    if <<(x position) > [120]> and <touching (portals v)?>> then\n        go to x: (-190) y: (80)\n        broadcast (Effect v)\n    end\nend\nif <(Level) = [7]> then\n    if <<(X) = [30]> and <touching (portals v)?>> then\n        if <(TotalCollected) = [3]> then\n            go to x: (100) y: (-6)\n            broadcast (Effect v)\n        else\n            Restart\n        end\n    end\n    if <<(X) = [78]> and <touching (portals v)?>> then\n        go to x: (10) y: (-102)\n        broadcast (Effect v)\n    end\nend\nif <(Level) = [8]> then\n    if <<(y position) < [-150]> and <touching (portals v)?>> then\n        go to x: (-183) y: (130)\n        broadcast (Effect v)\n    end\n    if <<(y position) > [150]> and <touching (portals v)?>> then\n        go to x: (-62) y: (-140)\n        set [y velocity v] to [15]\n        broadcast (Effect v)\n    end\nend\nif <(Level) = [9]> then\n    if <<(Y) = [62]> and <touching (portals v)?>> then\n        go to x: (-200) y: (100)\n        set [y velocity v] to [13]\n        broadcast (Effect v)\n    end\n    if <<(Y) = [98]> and <touching (portals v)?>> then\n        go to x: (127) y: (100)\n        set [y velocity v] to [13]\n        broadcast (Effect v)\n    end\nend\nif <(Level) = [11]> then\n    if <<(Y) = [38]> and <touching (portals v)?>> then\n        go to x: (52) y: (-50)\n        broadcast (Effect v)\n    end\n    if <<(Y) = [-22]> and <touching (portals v)?>> then\n        go to x: (185) y: (50)\n        set [y velocity v] to [10]\n        broadcast (Effect v)\n    end\nend\nif <(Level) = [15]> then\n    if <<(x position) > [35]> and <touching (portals v)?>> then\n        if <(TotalCollected) = [4]> then\n            go to x: (-51) y: (150)\n            broadcast (Effect v)\n        else\n            Restart\n        end\n    end\n    if <<(x position) < [-70]> and <touching (portals v)?>> then\n        go to x: (10) y: (0)\n        broadcast (Effect v)\n    end\nend\n\ndefine Restart\nset [totalcollected v] to [0]\nbroadcast (Lock v)\nbroadcast (Start Keys v)\nbroadcast (died v)\nbroadcast (Reset orb v)\nif <<(Level) = []> or > then\n    broadcast (Reset v)\n    broadcast (Reset v)\nend\nRespawn Position\nstart sound [Crunch v]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nbroadcast (Next v)\n\ndefine Ladders\nif <touching (ladders v)?> then\n    if <touching (ladders v)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <not <touching (level v)?>> then\n                set [y velocity v] to [7]\n            end\n        end\n    end\n    if <touching (ladders v)?> then\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            if <not <touching (level v)?>> then\n                set [y velocity v] to [-7]\n            end\n        end\n    end\nend\nif <not <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <[] = [1]>> or <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <[] = [1]>>>> then\n    set [y velocity v] to [0]\nend\n\nbroadcast (Create Clone v)\nbroadcast (Next v)\nbroadcast (Start Keys v)\nbroadcast (Lock v)\nbroadcast (Reset orb v)\nbroadcast (Next Level v)\nset size to (100) %\nstart sound [Ding Sound Effect v]\nset [level v] to ((Level) + (1))\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nRespawn Position\n\nwhen I receive [animation start v]\nhide\n\n@Level\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\ngo to x: (0) y: (0)\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nset [ghost v] effect to (100)\n\nwhen I receive [animation start v]\nhide\n\n@Decoration\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\ngo to [back v] layer\nforever\n    switch costume to (Level)\n    go [backward v] (4) layers\nend\n\ngo to [back v] layer\n\nwhen I receive [animation start v]\nhide\n\n@Motherboard\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\ngo to x: (0) y: (0)\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nset [ghost v] effect to (100)\n\nwhen I receive [animation start v]\nhide\n\ngo to [front v] layer\n\n@Spark\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [animation start v]\nhide\n\nwhen I receive [intro done v]\ngo to x: (0) y: (0)\nforever\n    repeat (24)\n        change x by (4)\n    end\n    repeat (24)\n        change y by (-4)\n    end\n    repeat (24)\n        change x by (-4)\n    end\n    repeat (24)\n        change y by (4)\n    end\nend\n\nwhen I receive [next v]\nshow\nclear graphic effects\nwait until <(Level) = [13]>\nwait (1) seconds\nwait until <(BoltsCollected) = [3]>\nstart sound [Power Down v]\nhide\n\nwhen I receive [next v]\nshow\nclear graphic effects\nwait until <(Level) = [14]>\nwait (1) seconds\nwait until <(BoltsCollected) = [2]>\nstart sound [Power Down v]\nhide\n\n@Bolts\n\nwhen flag clicked\nset [boltscollected v] to [0]\nhide\n\ndefine Clone At X: (x) (y) At Size: (size)\nset size to (size) %\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\npoint in direction (90)\n\nwhen I receive [next v]\nset [boltscollected v] to [0]\nset [totalcollected v] to [0]\nif  then\n    delete this clone\nend\nif <(Level) = [13]> then\n    Clone At X: [-10] [1] At Size: [100]\n    Clone At X: [-220] [55] At Size: [100]\n    Clone At X: [-10] [120] At Size: [100]\nend\nif <(Level) = [14]> then\n    Clone At X: [127] [109] At Size: [100]\n    Clone At X: [8] [150] At Size: [100]\nend\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (0)\npoint in direction (90)\nif <(Level) = [13]> then\n    wait until <touching (player v)?>\n    change [boltscollected v] by (1)\n    change [totalcollected v] by (1)\n    start sound [Collect v]\n    BoltJump\nelse\n    if <(Level) = [14]> then\n        wait until <touching (player v)?>\n        change [boltscollected v] by (1)\n        change [totalcollected v] by (1)\n        start sound [Collect v]\n        BoltJump\n    end\nend\n\nwhen I start as a clone\nforever\n    change y by ((0.5) * ([sin v] of (Coins: frame) ))\n    change [coins: frame v] by (5)\nend\n\nwhen I start as a clone\nshow\n\nbroadcast (Next v)\n\ndefine BoltJump\nset [boltv v] to [10]\nrepeat (20)\n    change [boltv v] by (-1)\n    change y by (BoltV)\n    change [ghost v] effect by (5)\nend\n\n@Wall\n\ndefine Glide Smoothly to xy (x) (y) Speed (s) Round? (r) GhostFX (gfx)\nif <<<(x) = [0]> or <(x) < [0]>> or <(x) > [0]>> then\n    if <<<(y) = [0]> or <(y) < [0]>> or <(y) > [0]>> then\n        if <<<(s) = [0]> or <(s) < [0]>> or <(s) > [0]>> then\n            if <(r) = [1]> then\n                repeat until <<(round (x position)) = (x)> and <(round (y position)) = (y)>>\n                    change x by (((x) - (x position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                    change y by (((y) - (y position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                    change [ghost v] effect by (gfx)\n                end\n            else\n                if <(r) = [0]> then\n                    repeat until <<(x position) = (x)> and <(y position) = (y)>>\n                        change x by (((x) - (x position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                        change y by (((y) - (y position)) / ((7) - (([abs v] of (round (s)) ) mod (5))))\n                        change [ghost v] effect by (gfx)\n                    end\n                else\n                    stop [this script v]\n                end\n            end\n            go to x: (x) y: (y)\n            clear graphic effects\n        else\n            stop [this script v]\n        end\n    else\n        stop [this script v]\n    end\nelse\n    stop [this script v]\nend\nstop [this script v]\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [animation start v]\nhide\n\nwhen I receive [next v]\nif <(Level) = [7]> then\n    wait until <(TotalCollected) = [3]>\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [next v]\nif <(Level) = [8]> then\n    show\n    clear graphic effects\n    go to x: (0) y: (0)\n    wait until <(TotalCollected) = [5]>\n    start sound [Glass Breaking v]\n    Glide Smoothly to xy (0) (-150) Speed (2) Round? (1) GhostFX (0)\nend\n\nwhen I receive [next v]\nif <(Level) = [8]> then\n    wait until <(TotalCollected) = [5]>\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [next v]\nif <(Level) = [9]> then\n    show\n    clear graphic effects\n    go to x: (0) y: (0)\n    wait until <(TotalCollected) = [6]>\n    start sound [Glass Breaking v]\n    Glide Smoothly to xy (0) (-150) Speed (2) Round? (1) GhostFX (0)\nend\n\nwhen I receive [next v]\nif <(Level) = [9]> then\n    wait until <(TotalCollected) = [6]>\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [next v]\nif <(Level) = [10]> then\n    show\n    clear graphic effects\n    go to x: (0) y: (0)\n    wait until <(TotalCollected) = [2]>\n    start sound [Glass Breaking v]\n    Glide Smoothly to xy (0) (-150) Speed (2) Round? (1) GhostFX (0)\nend\n\nwhen I receive [next v]\nif <(Level) = [10]> then\n    wait until <(TotalCollected) = [2]>\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [next v]\nif <(Level) = [11]> then\n    show\n    clear graphic effects\n    go to x: (0) y: (0)\n    wait until <(TotalCollected) = [3]>\n    start sound [Glass Breaking v]\n    Glide Smoothly to xy (0) (-150) Speed (2) Round? (1) GhostFX (0)\nend\n\nwhen I receive [next v]\nif <(Level) = [11]> then\n    wait until <(TotalCollected) = [3]>\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [next v]\nif <(Level) = [7]> then\n    show\n    clear graphic effects\n    go to x: (0) y: (0)\n    wait until <(TotalCollected) = [3]>\n    start sound [Glass Breaking v]\n    Glide Smoothly to xy (0) (-200) Speed (2) Round? (1) GhostFX (0)\nend\n\nwhen I receive [next v]\nif <(Level) = [14]> then\n    wait until <(TotalCollected) = [4]>\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [next v]\nif <(Level) = [14]> then\n    show\n    clear graphic effects\n    go to x: (0) y: (0)\n    wait until <(TotalCollected) = [4]>\n    start sound [Glass Breaking v]\n    Glide Smoothly to xy (0) (-150) Speed (2) Round? (1) GhostFX (0)\nend\n\nwhen I receive [next v]\nif <(Level) = [15]> then\n    wait (0.5) seconds\n    show\n    clear graphic effects\n    go to x: (0) y: (0)\n    wait until <(TotalCollected) = [4]>\n    start sound [Glass Breaking v]\n    Glide Smoothly to xy (0) (100) Speed (2) Round? (1) GhostFX (0)\nend\n\nwhen I receive [next v]\nif <(Level) = [15]> then\n    wait (0.5) seconds\n    wait until <(TotalCollected) = [4]>\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    hide\nend\n\n@Danger\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\ngo to [back v] layer\ngo to [back v] layer\nforever\n    switch costume to (Level)\n    go [backward v] (1) layers\nend\n\ngo to [back v] layer\n\nwhen I receive [animation start v]\nhide\n\n@Reverse\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\ngo to x: (0) y: (0)\nforever\n    go [backward v] (9) layers\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen I receive [animation start v]\nhide\n\n@Normal\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\ngo to x: (0) y: (0)\nforever\n    go [backward v] (9) layers\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen I receive [animation start v]\nhide\n\n@Portals\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\ngo to x: (0) y: (0)\nforever\n    go to x: (0) y: (0)\n    go [backward v] (5) layers\n    switch costume to (Level)\n    set [brightness v] effect to (-5)\nend\n\nwhen I receive [animation start v]\nhide\n\nset [ghost v] effect to (0)\n\n@Jumpables\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\ngo to [back v] layer\nforever\n    switch costume to (Level)\n    set [ghost v] effect to (100)\nend\n\ngo to [back v] layer\n\nwhen I receive [animation start v]\nhide\n\n@Water\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\nforever\n    go [backward v] (6) layers\n    set [ghost v] effect to (20)\n    switch costume to (Level)\n    change y by ((0.4) * ([sin v] of (WaterLevel) ))\n    change [waterlevel v] by (5)\n    if <touching (spark v)?> then\n        set [color v] effect to (105)\n        set [yellow? v] to [1]\n    else\n        set [color v] effect to (0)\n        set [yellow? v] to [0]\n    end\nend\n\nwhen I receive [animation start v]\nhide\n\n@Water2\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\nforever\n    go [backward v] (6) layers\n    set [ghost v] effect to (35)\n    switch costume to (Level)\n    change y by ((0.4) * ([sin v] of (WaterLevel) ))\n    if <touching (spark v)?> then\n        set [color v] effect to (105)\n        set [yellow2 v] to [1]\n    else\n        set [color v] effect to (0)\n        set [yellow2 v] to [0]\n    end\nend\n\nwhen I receive [animation start v]\nhide\n\n@Saws\n\nwhen flag clicked\nhide\n\ndefine Clone At X: (x) (y) At Size: (size)\nset size to (size) %\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [next v]\nif  then\n    delete this clone\nend\nif <(Level) = [1]> then\n    Clone At X: [200] [80] At Size: [100]\nend\nif <(Level) = [4]> then\n    Clone At X: [30] [40] At Size: [100]\nend\nif <(Level) = [9]> then\n    Clone At X: [203] [-150] At Size: [100]\nend\nif <(Level) = [10]> then\n    Clone At X: [-29] [4] At Size: [100]\n    Clone At X: [150] [4] At Size: [100]\nend\nif <(Level) = [11]> then\n    Clone At X: [130] [-94] At Size: [100]\nend\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nforever\n    turn right (5) degrees\n    if <(Level) = [1]> then\n        switch costume to (1 v)\n        set y to (([sin v] of ((timer) * (90)) ) * (100))\n    end\n    if <(Level) = [9]> then\n        switch costume to (1 v)\n        set x to (([sin v] of ((timer) * (60)) ) * (175))\n    end\n    if <(Level) = [10]> then\n        switch costume to (1 v)\n        set y to (([sin v] of ((timer) * (90)) ) * (100))\n    end\n    if <(Level) = [11]> then\n        switch costume to (2 v)\n    end\n    if <(Level) = [4]> then\n        switch costume to (1 v)\n    end\nend\n\nbroadcast (Next v)\n\nbroadcast (Next v)\n\nbroadcast (Next v)\n\nwhen I start as a clone\nforever\n\n@CoinLock\n\nwhen flag clicked\nhide\nclear graphic effects\n\nwhen I receive [next v]\ngo to [back v] layer\nwait until <(Level) = [3]>\nswitch costume to (1 v)\nclear graphic effects\nshow\nwait until <(CoinsCollected) = [3]>\nstart sound [Door Open v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [next v]\ngo to [back v] layer\nwait until <(Level) = [4]>\nswitch costume to (2 v)\nclear graphic effects\nshow\nwait until <(CoinsCollected) = [2]>\nstart sound [Door Open v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [next v]\ngo to [back v] layer\nwait until <(Level) = [5]>\nswitch costume to (3 v)\nclear graphic effects\nshow\nwait until <(CoinsCollected) = [1]>\nstart sound [Door Open v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [next v]\ngo to [back v] layer\nwait until <(Level) = [6]>\nwait (0.5) seconds\nswitch costume to (4 v)\nclear graphic effects\nshow\nwait until <(CoinsCollected) = [1]>\nstart sound [Door Open v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [next v]\ngo to [front v] layer\nwait until <(Level) = [8]>\nwait (0.5) seconds\nswitch costume to (6 v)\nclear graphic effects\nshow\ngo to [front v] layer\nwait until <(CoinsCollected) = [3]>\nstart sound [Door Open v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [next v]\ngo to [front v] layer\nwait until <(Level) = [9]>\nwait (0.5) seconds\nswitch costume to (7 v)\nclear graphic effects\nshow\ngo to [front v] layer\nwait until <(CoinsCollected) = [2]>\nstart sound [Door Open v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [next v]\ngo to [back v] layer\nwait until <(Level) = [7]>\nswitch costume to (5 v)\nclear graphic effects\nshow\nwait until <(CoinsCollected) = [2]>\nstart sound [Door Open v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [next v]\ngo to [front v] layer\nwait until <(Level) = [10]>\nhide\n\nwhen I receive [next v]\ngo to [front v] layer\nwait until <(Level) = [11]>\nwait (0.5) seconds\nswitch costume to (8 v)\nclear graphic effects\nshow\ngo to [front v] layer\nwait until <(CoinsCollected) = [2]>\nstart sound [Door Open v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [next v]\ngo to [front v] layer\nwait until <(Level) = [12]>\nhide\n\nwhen I receive [next v]\ngo to [front v] layer\nwait until <(Level) = [14]>\nwait (0.5) seconds\nswitch costume to (9 v)\nclear graphic effects\nshow\ngo to [front v] layer\nwait until <(CoinsCollected) = [1]>\nstart sound [Door Open v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [next v]\ngo to [front v] layer\nwait until <(Level) = [15]>\nwait (0.5) seconds\nswitch costume to (10 v)\nclear graphic effects\nshow\ngo to [front v] layer\nwait until <(CoinsCollected) = [2]>\nstart sound [Door Open v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [next v]\ngo to [front v] layer\nwait until <(Level) = [16]>\nhide\n\n@Particle\n\nwhen flag clicked\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nrepeat (50)\n    change [ghost v] effect by (2)\n    change x by (-.5)\n    change y by (-.5)\n    move (.5) steps\n    turn left (2) degrees\nend\ndelete this clone\n\nwhen I receive [intro done v]\nhide\nset [ghost v] effect to (0)\nset size to (150) %\nforever\n    change [ghost v] effect by (-1)\n    set size to (pick random (50) to (85)) %\n    go to (random position v)\n    create clone of (_myself_ v)\n    wait (0.05) seconds\n    next costume\nend\n\n@Transitions\n\nwhen I receive [died v]\ncreate clone of (_myself_ v)\n\ndefine thing\nswitch costume to (2 v)\nset size to (size) %\nchange size by (((4100) - (size)) / (4))\nset [size v] to (size)\nswitch costume to (1 v)\n\ndefine other thing\nswitch costume to (2 v)\nset size to (size) %\nchange size by (((410) - (size)) / (6))\nset [size v] to (size)\nswitch costume to (3 v)\n\nwhen flag clicked\nset [can move? v] to [1]\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I start as a clone\ngo to [front v] layer\nset [can move? v] to [0]\nset [transition> v] to [1]\ngo to x: (0) y: (0)\nset size to (0) %\nshow\nset [size v] to [100]\nbroadcast (Reset orb v)\nrepeat until <(size) > [4080]>\n    thing\nend\nset size to (10) %\nset [size v] to [10]\nrepeat until <(size) > [400]>\n    other thing\nend\nbroadcast (Reset orb v)\nset [can move? v] to [1]\nhide\nbroadcast (Move v)\nset [transition> v] to [0]\ndelete this clone\n\nbroadcast (Reset orb v)\n\n@Mute\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\nswitch costume to (1 v)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (10)\n        play sound [Hover v] until done\n        wait until <not <touching (mouse-pointer v)?>>\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [play scene v]\nwait (2) seconds\nset volume to (20) %\nforever\n    play sound [1f1n1ty - Veva v] until done\nend\n\nwhen this sprite clicked\nif <(volume) = [20]> then\n    set volume to (0) %\n    switch costume to (2 v)\nelse\n    switch costume to (1 v)\n    set volume to (20) %\nend\n\n@Next\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen I receive [next level v]\nset [transition> v] to [1]\ngo to [front v] layer\nclear graphic effects\nshow\ngo to x: (5000) y: (0)\nrepeat until <(round (x position)) = [0]>\n    go to [front v] layer\n    change x by (((0) - (x position)) / (4))\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nset [transition> v] to [0]\n\n@TITLE\n\nwhen flag clicked\nset [screen v] to [1]\ngo [backward v] (99) layers\nhide\n\nwhen I receive [play scene v]\ngo [forward v] (4) layers\nforever\n    if <(SCREEN) = [1]> then\n        change [titleturn v] by (1)\n    end\n    if <(SCREEN) = [1]> then\n        show\n    else\n        hide\n    end\n    if <(SCREEN) = [0]> then\n        go [backward v] (6) layers\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nforever\n    go [forward v] (5) layers\nend\n\nwhen I receive [show v]\nclear graphic effects\nstop [all v]\n\ngo [forward v] (5) layers\n\n@Play Button\n\nwhen I receive [play scene v]\nshow\nwait until <<<touching (mouse-pointer v)?> and <mouse down?>> and <not <(IN) = [1]>>>\nset [screen v] to [0]\nstart sound [Selected v]\nbroadcast (Transition v)\nbroadcast (Intro Done v)\nbroadcast (Next v)\n\nwhen I receive [play scene v]\nforever\n    if <touching (mouse-pointer v)?> then\n        if <<(SCREEN) = [1]> and <<not <(IN) = [1]>> and <not <(IN2) = [1]>>>> then\n            set volume to (100) %\n            start sound [Hover v]\n            wait until <not <touching (mouse-pointer v)?>>\n        end\n    end\nend\n\nwhen flag clicked\nset [screen v] to [1]\nhide\n\nwhen I receive [play scene v]\nshow\nforever\n    if <(SCREEN) = [1]> then\n        show\n    else\n        hide\n    end\n    if <touching (mouse-pointer v)?> then\n        change size by (((80) - (size)) / (5))\n        set [brightness v] effect to (5)\n        switch costume to (costume2 v)\n    else\n        change size by (((75) - (size)) / (5))\n        set [brightness v] effect to (0)\n        switch costume to (costume1 v)\n    end\nend\n\n@Instructions\n\nwhen I receive [play scene v]\nset [in v] to [0]\nshow\nwait until <<<touching (mouse-pointer v)?> and <mouse down?>> and <not <(IN) = [1]>>>\nbroadcast (IN v)\n\nwhen I receive [play scene v]\nforever\n    if <touching (mouse-pointer v)?> then\n        if <<(SCREEN) = [1]> and <<not <(IN) = [1]>> and <not <(IN2) = [1]>>>> then\n            set volume to (100) %\n            start sound [Hover v]\n            wait until <not <touching (mouse-pointer v)?>>\n        end\n    end\nend\n\nwhen flag clicked\nset [screen v] to [1]\nhide\n\nwhen I receive [play scene v]\nshow\nforever\n    if <(SCREEN) = [1]> then\n        show\n    else\n        hide\n    end\n    if <touching (mouse-pointer v)?> then\n        change size by (((80) - (size)) / (5))\n        switch costume to (costume3 v)\n        set [brightness v] effect to (5)\n        if <mouse down?> then\n            if <(IN) = [0]> then\n                broadcast (IN v)\n                set [in v] to [1]\n            end\n        end\n    else\n        switch costume to (costume1 v)\n        change size by (((75) - (size)) / (5))\n        set [brightness v] effect to (0)\n    end\nend\n\n@Credits\n\nwhen I receive [play scene v]\nset [in2 v] to [0]\nshow\nwait until <<<touching (mouse-pointer v)?> and <mouse down?>> and <not <(IN2) = [1]>>>\nbroadcast (IN v)\n\nwhen I receive [play scene v]\nforever\n    if <touching (mouse-pointer v)?> then\n        if <<(SCREEN) = [1]> and <<not <(IN) = [1]>> and <not <(IN2) = [1]>>>> then\n            set volume to (100) %\n            start sound [Hover v]\n            wait until <not <touching (mouse-pointer v)?>>\n        end\n    end\nend\n\nwhen flag clicked\nset [screen v] to [1]\nhide\n\nwhen I receive [play scene v]\nshow\nforever\n    if <(SCREEN) = [1]> then\n        show\n    else\n        hide\n    end\n    if <touching (mouse-pointer v)?> then\n        change size by (((80) - (size)) / (5))\n        switch costume to (costume3 v)\n        set [brightness v] effect to (5)\n        if <mouse down?> then\n            if <(IN2) = [0]> then\n                broadcast (IN2 v)\n                set [in2 v] to [1]\n            end\n        end\n    else\n        switch costume to (costume1 v)\n        change size by (((75) - (size)) / (5))\n        set [brightness v] effect to (0)\n    end\nend\n\n@Transition\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen I receive [transition v]\ngo to [front v] layer\nset [ghost v] effect to (0)\nwait (.2) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nwhen I receive [effect v]\ngo to [front v] layer\nset [ghost v] effect to (0)\nwait (.2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@title screen\n\nwhen flag clicked\nset [in v] to [0]\nhide\n\nwhen I receive [in v]\nset [in v] to [1]\nif <(SCREEN) = [1]> then\n    show\n    clear graphic effects\n    set size to (10) %\n    go to [front v] layer\n    repeat (20)\n        go to [front v] layer\n        change size by (((100) - (size)) / (5))\n    end\n    wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\n    set [in v] to [0]\nend\n\nwhen flag clicked\nforever\n    if <(IN) = [0]> then\n        go [backward v] (5) layers\n    end\nend\n\n@CreditsButton\n\nwhen flag clicked\nset [in2 v] to [0]\nhide\n\nwhen I receive [in2 v]\nset [in2 v] to [1]\nif <(SCREEN) = [1]> then\n    show\n    clear graphic effects\n    set size to (10) %\n    go to [front v] layer\n    repeat (20)\n        go to [front v] layer\n        change size by (((100) - (size)) / (5))\n    end\n    wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\n    set [in2 v] to [0]\nend\n\nwhen flag clicked\nforever\n    if <(IN2) = [0]> then\n        go [backward v] (5) layers\n    end\nend\n\n@Yellow Rings\n\nwhen flag clicked\nhide\n\ndefine Clone At X: (x) (y) At Size: (size)\nset size to (size) %\ngo to x: (x) y: (y)\npoint in direction (90)\ncreate clone of (_myself_ v)\n\nwhen I receive [reset orb v]\nclear graphic effects\nif  then\n    delete this clone\nend\nif <(Level) = [2]> then\n    Clone At X: [-88] [-36] At Size: [100]\n    Clone At X: [-88] [120] At Size: [100]\nend\nif <(Level) = [6]> then\n    Clone At X: [-18] [-36] At Size: [100]\nend\nif <(Level) = [7]> then\n    Clone At X: [-108] [40] At Size: [100]\nend\nif <(Level) = [8]> then\n    Clone At X: [22] [35] At Size: [90]\n    Clone At X: [22] [-10] At Size: [90]\nend\nif <(Level) = [9]> then\n    Clone At X: [-128] [-12] At Size: [90]\n    Clone At X: [201] [70] At Size: [90]\n    Clone At X: [201] [110] At Size: [90]\n    Clone At X: [201] [150] At Size: [90]\nend\nif <(Level) = [10]> then\n    Clone At X: [-150] [-15] At Size: [90]\n    Clone At X: [-220] [60] At Size: [90]\nend\nif <(Level) = [11]> then\n    Clone At X: [-100] [-20] At Size: [90]\nend\nif <(Level) = [12]> then\n    Clone At X: [-165] [-20] At Size: [90]\n    Clone At X: [-215] [71] At Size: [90]\nend\nif <(Level) = [13]> then\n    Clone At X: [-130] [55] At Size: [90]\n    Clone At X: [109] [43] At Size: [90]\nend\nif <(Level) = [14]> then\n    Clone At X: [140] [18] At Size: [90]\nend\nif <(Level) = [15]> then\n    Clone At X: [-218] [15] At Size: [90]\n    Clone At X: [-218] [80] At Size: [90]\nend\n\nwhen I start as a clone\nshow\nforever\n    point in direction (90)\n    if <touching (player v)?> then\n        set [brightness v] effect to (5)\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            start sound [Jump v]\n            change [totalcollected v] by (1)\n            repeat (10)\n                change [ghost v] effect by (10)\n                change size by (-2)\n            end\n            delete this clone\n        end\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nbroadcast (Reset orb v)\n\nwhen I start as a clone\nshow\nforever\n    set size to ((([sin v] of (((timer) + ((0) * (400))) * (150)) ) * (10)) + (80)) %\nend\n\nwhen [m v] key pressed\nset [mouse v] to (join (round (mouse x)) (join [ ] (round (mouse y))))\n\n@Moving\n\ndefine Glide (x) (y)\nrepeat until <<(round (x position)) = (x)> and <(round (y position)) = (y)>>\n    set [move x v] to (((x) - (x position)) / (15))\n    set [move y v] to (((y) - (y position)) / (15))\n    change x by (Move X)\n    change y by (Move Y)\n    change y by (3)\n    if <touching (player v)?> then\n        broadcast (Move player v)\n    end\n    change y by (-3)\nend\n\nwhen I receive [next v]\n\nif <(Level) = [3]> then\n    show\n    switch costume to (costume1 v)\n    go to x: (0) y: (0)\n    repeat until <not <(Level) = [3]>>\n        Glide [30] [0]\n        Glide [150] [0]\n    end\nend\n\nwhen flag clicked\nhide\n\n@Coins\n\nwhen flag clicked\nset [coinscollected v] to [0]\nhide\n\ndefine Clone At X: (x) (y) At Size: (size)\nset size to (size) %\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\npoint in direction (90)\n\nwhen I receive [next v]\nset [coinscollected v] to [0]\nset [totalcollected v] to [0]\nif  then\n    delete this clone\nend\nif <(Level) = [3]> then\n    Clone At X: [-155] [115] At Size: [100]\n    Clone At X: [-90] [-159] At Size: [100]\n    Clone At X: [185] [12] At Size: [100]\nend\nif <(Level) = [4]> then\n    Clone At X: [-218] [90] At Size: [100]\n    Clone At X: [-56] [20] At Size: [100]\nend\nif <(Level) = [5]> then\n    Clone At X: [-76] [-129] At Size: [100]\nend\nif <(Level) = [6]> then\n    Clone At X: [75] [110] At Size: [100]\nend\nif <(Level) = [7]> then\n    Clone At X: [-217] [30] At Size: [100]\n    Clone At X: [-108] [90] At Size: [100]\nend\nif <(Level) = [8]> then\n    Clone At X: [-140] [-50] At Size: [100]\n    Clone At X: [-40] [125] At Size: [100]\n    Clone At X: [-19] [-67] At Size: [100]\nend\nif <(Level) = [9]> then\n    Clone At X: [-200] [150] At Size: [100]\n    Clone At X: [38] [140] At Size: [100]\nend\nif <(Level) = [11]> then\n    Clone At X: [-49] [-100] At Size: [100]\n    Clone At X: [-210] [50] At Size: [100]\nend\nif <(Level) = [14]> then\n    Clone At X: [50] [-34] At Size: [100]\nend\nif <(Level) = [15]> then\n    Clone At X: [-130] [148] At Size: [100]\n    Clone At X: [-30] [-10] At Size: [100]\nend\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (0)\npoint in direction (90)\nif <(Level) = [3]> then\n    wait until <touching (player v)?>\n    change [coinscollected v] by (1)\n    start sound [Collect v]\n    set rotation style [all around v]\n    Spin\nelse\n    if <(Level) = [4]> then\n        wait until <touching (player v)?>\n        change [coinscollected v] by (1)\n        start sound [Collect v]\n        set rotation style [all around v]\n        Spin\n    else\n        if <(Level) = [5]> then\n            wait until <touching (player v)?>\n            change [coinscollected v] by (1)\n            start sound [Collect v]\n            set rotation style [all around v]\n            Spin\n        else\n            if <(Level) = [6]> then\n                wait until <touching (player v)?>\n                change [coinscollected v] by (1)\n                change [totalcollected v] by (1)\n                start sound [Collect v]\n                set rotation style [all around v]\n                Spin\n            else\n                if <(Level) = [7]> then\n                    wait until <touching (player v)?>\n                    change [coinscollected v] by (1)\n                    change [totalcollected v] by (1)\n                    start sound [Collect v]\n                    set rotation style [all around v]\n                    Spin\n                else\n                    if <(Level) = [8]> then\n                        wait until <touching (player v)?>\n                        change [coinscollected v] by (1)\n                        change [totalcollected v] by (1)\n                        start sound [Collect v]\n                        set rotation style [all around v]\n                        Spin\n                    else\n                        if <(Level) = [9]> then\n                            wait until <touching (player v)?>\n                            change [coinscollected v] by (1)\n                            change [totalcollected v] by (1)\n                            start sound [Collect v]\n                            set rotation style [all around v]\n                            Spin\n                        else\n                            if <(Level) = [11]> then\n                                wait until <touching (player v)?>\n                                change [coinscollected v] by (1)\n                                change [totalcollected v] by (1)\n                                start sound [Collect v]\n                                set rotation style [all around v]\n                                Spin\n                            else\n                                if <(Level) = [14]> then\n                                    wait until <touching (player v)?>\n                                    change [coinscollected v] by (1)\n                                    change [totalcollected v] by (1)\n                                    start sound [Collect v]\n                                    set rotation style [all around v]\n                                    Spin\n                                else\n                                    if <(Level) = [15]> then\n                                        wait until <touching (player v)?>\n                                        change [coinscollected v] by (1)\n                                        change [totalcollected v] by (1)\n                                        start sound [Collect v]\n                                        set rotation style [all around v]\n                                        Spin\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    change y by ((0.5) * ([sin v] of (Coins: frame) ))\n    change [coins: frame v] by (5)\nend\n\nwhen I start as a clone\nshow\n\nif <(Level) = [3]> then\n    wait until <touching (player v)?>\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\nend\n\ndefine Spin\nset [coin y v] to [10]\nrepeat (20)\n    change [coin y v] by (-1)\n    change [ghost v] effect by (5)\n    turn right (8) degrees\n    change y by (Coin Y)\nend\n\nbroadcast (Next v)\n\nbroadcast (Next v)\n\nchange [totalcollected v] by (1)\n\n@One\n\nwhen flag clicked\nhide\n\ndefine Clone At X: (x) (y) At Size: (size)\nset size to (size) %\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [next v]\nif  then\n    delete this clone\nend\nif <(Level) = [10]> then\n    Clone At X: [60] [100] At Size: [100]\nend\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nforever\n    turn right (5) degrees\n    if <(Level) = [10]> then\n        set y to (([sin v] of ((timer) * (90)) ) * (-100))\n    end\nend\n\nbroadcast (Next v)\n\n