Circles - A Platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (title v)\nwait (4) seconds\nswitch backdrop to (start v)\n\nwhen backdrop switches to [level 17 v]\nwait (5) seconds\nswitch backdrop to (level 18 v)\n\n@Player\n\nwhen flag clicked\npen up\nerase all\nset [deaths v] to [0]\nhide variable [:\) v]\nhide variable [deaths v]\nhide\n\nwhen backdrop switches to [level 11 v]\nrepeat until <not <(backdrop [name v]) = [Level 11]>>\n    if <key (3 v) pressed?> then\n        switch backdrop to (level 12 v)\n        change [level v] by (1)\n        go to x: (-114) y: (-30)\n        set [yv v] to [0]\n        wait until <not <key (3 v) pressed?>>\n    end\nend\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\nswitch backdrop to (level 1 v)\nset [ghost v] effect to (0)\nset [level v] to [1]\nset [clircles: v] to [0]\nset [volume: v] to [100]\nset [game v] to [1]\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-114) y: (-30)\npoint in direction (90)\nshow\nshow variable [:\) v]\nshow variable [deaths v]\nforever\n    if <(game) = [1]> then\n        change [yv v] by (-0.5)\n        if <key (right arrow v) pressed?> then\n            change [xv v] by (0.7)\n            point in direction (90)\n        end\n        if <key (left arrow v) pressed?> then\n            change [xv v] by (-0.7)\n            point in direction (90)\n        end\n        set [xv v] to ((Xv) * (0.9))\n        change x by (Xv)\n        if <touching color (#000008)?> then\n            change y by (1)\n            if <touching color (#000008)?> then\n                change y by (1)\n                if <touching color (#000008)?> then\n                    change y by (1)\n                    if <touching color (#000008)?> then\n                        change y by (1)\n                        if <touching color (#000008)?> then\n                            change y by (1)\n                            if <touching color (#000008)?> then\n                                change x by ((Xv) * (-1))\n                                change x by (-1)\n                                change y by (-5)\n                                change x by (1)\n                                if <key (up arrow v) pressed?> then\n                                    set volume to (50) %\n                                    start sound [Mario Jump - Sound Effect.mp3 v]\n                                    set volume to (100) %\n                                    if <(Xv) > [0]> then\n                                        set [xv v] to [-8]\n                                    else\n                                        set [xv v] to [8]\n                                    end\n                                    set [yv v] to [10]\n                                else\n                                    set [xv v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (Yv)\n        if <touching color (#000008)?> then\n            change y by ((Yv) * (-1))\n            set [yv v] to [0]\n        end\n        change y by (-1)\n        if <touching color (#000008)?> then\n            if <key (up arrow v) pressed?> then\n                set volume to (50) %\n                start sound [Mario Jump - Sound Effect.mp3 v]\n                set volume to (100) %\n                set [yv v] to [10]\n            end\n        end\n        change y by (1)\n        if <touching color (#ffff00)?> then\n            set volume to (50) %\n            start sound [Super Mario Bros.-Mushroom Sound Effect.mp3 v]\n            set volume to (100) %\n            set [yv v] to [0]\n            go to x: (-114) y: (-30)\n            switch backdrop to (next backdrop v)\n            change [level v] by (1)\n        end\n        if <touching color (#00cc44)?> then\n            set volume to (50) %\n            start sound [Mario Jump - Sound Effect.mp3 v]\n            set volume to (100) %\n            set [yv v] to [15]\n        end\n        if <touching color (#ccffff)?> then\n            if <key (up arrow v) pressed?> then\n                set [yv v] to [5]\n            else\n                set [yv v] to [-1]\n            end\n        end\n        if <touching color (#ff0000)?> then\n            set volume to (50) %\n            start sound [Megaman x 1 death sound effect.mp3 v]\n            set volume to (100) %\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            set [yv v] to [0]\n            set [xv v] to [0]\n            go to x: (-114) y: (-30)\n            set [ghost v] effect to (0)\n            change [deaths v] by (1)\n        end\n        if <(level) = [101]> then\n            set [:\) v] to [The end!]\n        end\n        if <(level) < [101]> then\n            set [:\) v] to (join [Level ] (join (level) [/50]))\n        end\n    end\nend\n\nwhen [r v] key pressed\ngo to x: (-114) y: (-30)\n\nwhen backdrop switches to [level 18 v]\nset [level v] to ((level) + (1))\n\nwhen backdrop switches to [level 16 v]\nset [level v] to ((level) + (1))\n\nwhen flag clicked\nforever\n    if <touching (. v)?> then\n        switch backdrop to (secret level v)\n        set volume to (50) %\n        start sound [Secret of Mana music and sound effects - Level Up!.mp3 v]\n        set volume to (100) %\n    end\nend\n\nwhen I receive [pause v]\nhide\nset [game v] to [0]\n\nwhen I receive [unpause v]\nshow\nset [game v] to [1]\n\nwhen flag clicked\nforever\n    if <key (r v) pressed?> then\n        set [yv v] to [0]\n        set [xv v] to [0]\n        switch costume to (costume1 v)\n        go to x: (-114) y: (-30)\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [question4 v]\nask [Will you love and favorite? \(yes/no\)] and wait\nif <(answer) = [yes]> then\n    switch backdrop to (level 16 v)\n    start sound [You win quiz v]\nelse\n    start sound [Wrong answer v]\n    broadcast (question1 v)\nend\n\nwhen I receive [question1 v]\nask [How many times have you died?] and wait\nif <(answer) = (deaths)> then\n    start sound [Right answer v]\n    broadcast (question2 v)\nelse\n    start sound [Wrong answer v]\n    broadcast (question1 v)\nend\n\nwhen I receive [question3 v]\nask [Who made this ...cough, cough... wonderful game?] and wait\nif <(answer) = [Liz314159265]> then\n    start sound [Right answer v]\n    broadcast (question4 v)\nelse\n    start sound [Wrong answer v]\n    broadcast (question1 v)\nend\n\nwhen backdrop switches to [level 15 v]\nbroadcast (question1 v)\nask [How many times have you died?] and wait\nif <(answer) = (deaths)> then\n    start sound [Right answer v]\n    broadcast (question2 v)\nelse\n    start sound [Wrong answer v]\n    broadcast (question1 v)\nend\n\nwhen I receive [question2 v]\nask [What color is the portal?] and wait\nif <(answer) = [yellow]> then\n    start sound [Right answer v]\n    broadcast (question3 v)\nelse\n    start sound [Wrong answer v]\n    broadcast (question1 v)\nend\n\nwhen [c v] key pressed\nnext costume\n\nwhen backdrop switches to [level 25 v]\ngo to x: (-114) y: (-30)\n\nwhen flag clicked\nforever\n    if <not <(username) = [Liz314159265]>> then\n        forever\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                hide\n                switch backdrop to (cheating v)\n                stop all sounds\n                start sound [Mario Death Sound Effect.mp3 v]\n                stop [all v]\n            end\n        end\n    end\nend\n\n@Start Button\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\ngo to x: (-2) y: (-43)\nwait until <(backdrop [name v]) = [Start]>\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    end\n    if <not <touching (mouse-pointer v)?>> then\n        switch costume to (costume1 v)\n    end\n    if <touching (mouse-pointer v)?> then\n        if <mouse down?> then\n            switch costume to (costume2 v)\n            hide\n            go to x: (387) y: (294)\n            broadcast (Start v)\n        end\n    end\nend\n\nwhen I receive [secret - v]\nhide\n\nwhen I receive [secret over v]\nshow\n\nwhen flag clicked\nforever\n    play sound [Platform game music.mp3 v] until done\nend\n\n@Liz314159265\n\nwhen flag clicked\nhide\nwait (1) seconds\ngo to x: (34) y: (321)\nshow\nglide (1) secs to x: (50) y: (-107)\nwait (2) seconds\nhide\n\n@.\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level ? v]\nshow\n\nwhen backdrop switches to [secret level v]\nhide\n\nwhen backdrop switches to [secret level v]\n\nhide\n\n@Moving obstacles\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 13 v]\nshow\nforever\n    go to x: (448) y: (-46)\n    glide (10) secs to x: (-348) y: (4)\nend\n\nwhen backdrop switches to [level 14 v]\nhide\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\nshow\ngo to x: (-2) y: (1)\ngo to [front v] layer\n\n@Pause Screen\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\nwait (2) seconds\nforever\n    if <key (p v) pressed?> then\n        if <not <(backdrop [name v]) = [ backdrop]>> then\n            broadcast (pause v)\n            set [ghost v] effect to (100)\n            show\n            repeat (10)\n                change [ghost v] effect by (-10)\n            end\n            wait until <not <key (p v) pressed?>>\n            wait until <key (p v) pressed?>\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            broadcast (unpause v)\n            hide\n            wait until <not <key (p v) pressed?>>\n        end\n    end\nend\n\n@Confetti\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\ngo to x: (((pick random (0) to (1)) * (480)) - (240)) y: (-180)\nswitch costume to (pick random (1) to (10))\nset [speed y v] to (pick random (10) to (30))\nif <(x position) > [0]> then\n    set [speed x v] to (pick random (-5) to (-20))\nelse\n    set [speed x v] to (pick random (5) to (20))\nend\nrepeat until <not <touching (_edge_ v)?>>\n    change [speed y v] by (-1)\n    set [speed x v] to ((Speed X) * (1))\n    change x by (Speed X)\n    change y by (Speed Y)\n    point in direction (pick random (1) to (90))\nend\nrepeat until <touching (_edge_ v)?>\n    change [speed y v] by (-1)\n    set [speed x v] to ((Speed X) * (1))\n    change x by (Speed X)\n    change y by (Speed Y)\n    point in direction (pick random (1) to (90))\nend\ndelete this clone\n\ndefine Clone\nrepeat (20)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\nend\nwait (1.9) seconds\nrepeat (50)\n    create clone of (_myself_ v)\n    create clone of (_myself_ v)\nend\n\nwhen backdrop switches to [level 21 v]\nClone\n\n@Yellow Star\n\nwhen backdrop switches to [level 24 v]\nwait (3) seconds\nshow\nforever\n    switch costume to (pick random (1) to (3))\n    go to x: (-50) y: (pick random (90) to (-160))\n    glide (pick random (1) to (2)) secs to x: (400) y: (pick random (90) to (-160))\nend\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 25 v]\nhide\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 24 v]\nforever\n    if <touching (player v)?> then\n        forever\n            if <(costume [number v]) = [1]> then\n                hide\n                switch backdrop to (level 25 v)\n                set [level v] to ((level) + (1))\n            end\n        end\n    end\nend\n\n@1BObstacle\n\nwhen flag clicked\nhide\ngo to x: (34) y: (0)\n\nwhen backdrop switches to [level 25 v]\nshow\nforever\n    switch costume to (costume1 v)\n    wait (pick random (2) to (4)) seconds\n    switch costume to (costume2 v)\n    wait (pick random (2) to (4)) seconds\n    switch costume to (costume3 v)\n    wait (pick random (2) to (3)) seconds\n    switch costume to (costume4 v)\n    wait (pick random (2) to (3)) seconds\n    switch costume to (costume1 v)\n    wait (pick random (2) to (3)) seconds\n    switch costume to (costume4 v)\n    wait (pick random (2) to (3)) seconds\n    switch costume to (costume1 v)\nend\n\nwhen backdrop switches to [backdrop1 v]\nhide\nstop [other scripts in sprite v]\n\n