AntiGravity: A Platformer
@Stage\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset size to (100) %\nhide\ngo to [front v] layer\n\nshow\n\nset [ghost v] effect to (100)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nmove (10) steps\ngo to x: (0) y: (0)\n\n@Sprite1\n\nwhen I receive [play v]\npoint in direction (90)\nclear graphic effects\ngo to x: (-200) y: (-110)\nswitch backdrop to (backdrop2 v)\nshow\ngo to [front v] layer\nswitch costume to (costume1 v)\nset size to (60) %\n\nwhen flag clicked\nset [level v] to [0]\n\nforever\nend\n\nwhen I receive [play v]\nset [gravity v] to [1]\nset [timer v] to [0]\nforever\n    if <(Gravity) = [1]> then\n        if <(timer) < [1]> then\n            if <key (space v) pressed?> then\n                switch costume to (costume2 v)\n                broadcast (switched v)\n                set [gravity v] to [2]\n                set [timer v] to [18]\n                repeat until <(timer) < [1]>\n                    wait (0.067999) seconds\n                    change [timer v] by (-1)\n                end\n            end\n        end\n    end\n    if <(Gravity) = [2]> then\n        if <(timer) < [1]> then\n            if <key (space v) pressed?> then\n                switch costume to (costume1 v)\n                broadcast (switched v)\n                set [gravity v] to [1]\n                set [timer v] to [18]\n                repeat until <(timer) < [1]>\n                    wait (0.067999) seconds\n                    change [timer v] by (-1)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [play v]\n\nwhen I receive [play v]\nforever\n    if <(Gravity) = [1]> then\n        change [yv v] by (-0.5)\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            change [xv v] by (-1)\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [xv v] by (1)\n        end\n        set [xv v] to ((xv) * (0.8))\n        change x by (xv)\n        if <touching (levels v)?> then\n            change y by (1)\n            if <touching (levels v)?> then\n                change y by (1)\n                if <touching (levels v)?> then\n                    change y by (1)\n                    if <touching (levels v)?> then\n                        change y by (1)\n                        if <touching (levels v)?> then\n                            change y by (1)\n                            if <touching (levels v)?> then\n                                change y by (1)\n                                if <touching (levels v)?> then\n                                    change y by (-6)\n                                    change x by ((xv) * (-1))\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 (levels v)?> then\n            change y by ((yv) * (-1))\n            set [yv v] to [0]\n        end\n        change y by (-2)\n        if <<touching (levels v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            set [yv v] to [8]\n        end\n        change y by (2)\n    end\nend\n\nwhen I receive [play v]\nset [level v] to [1]\nforever\n    if <key (r v) pressed?> then\n        go to x: (-220) y: (-110)\n    end\n    if <touching color (#ff0000)?> then\n        broadcast (died v)\n        set [yv v] to [0]\n        set [ghost v] effect to (0)\n        repeat (4)\n            change [ghost v] effect by (25)\n        end\n        set [ghost v] effect to (0)\n        go to x: (-220) y: (-110)\n        set [gravity v] to [1]\n        switch costume to (costume1 v)\n    end\n    if <(x position) > [235]> then\n        change [level v] by (1)\n        broadcast (next level v)\n        go to x: (-220) y: (-110)\n        set [gravity v] to [1]\n        switch costume to (costume1 v)\n        set [yv v] to [0]\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <(Gravity) = [2]> then\n        change [yv v] by (0.5)\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            change [xv v] by (-1)\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [xv v] by (1)\n        end\n        set [xv v] to ((xv) * (0.8))\n        change x by (xv)\n        if <touching (levels v)?> then\n            change y by (-1)\n            if <touching (levels v)?> then\n                change y by (-1)\n                if <touching (levels v)?> then\n                    change y by (-1)\n                    if <touching (levels v)?> then\n                        change y by (-1)\n                        if <touching (levels v)?> then\n                            change y by (-1)\n                            if <touching (levels v)?> then\n                                change y by (-1)\n                                if <touching (levels v)?> then\n                                    change y by (6)\n                                    change x by ((xv) * (-1))\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 (levels v)?> then\n            change y by ((yv) * (-1))\n            set [yv v] to [0]\n        end\n        change y by (2)\n        if <<touching (levels v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            set [yv v] to [-8]\n        end\n        change y by (-2)\n    end\nend\n\nwhen flag clicked\nhide\n\nwait until <not <key (space v) pressed?>>\nwait until <not <key (space v) pressed?>>\n\nwait (1.8) seconds\n\nwhen I receive [switched v]\n\nif <(yv) < [0]> then\nend\nif <[0] < (yv)> then\nend\n\nif <(Gravity) = [2]> then\n    set [yv v] to [-5]\nend\nif <(Gravity) = [1]> then\n    set [yv v] to [5]\nend\n\nwhen I receive [play v]\nforever\n    if <(level) = [11]> then\n        broadcast (you win v) and wait\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [play v]\nhide\n\n@Sprite3\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (-80)\nshow\nswitch costume to (costume1 v)\nset size to (100) %\n\nwhen flag clicked\nhide variable [level v]\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        wait until <not <mouse down?>>\n        broadcast (play v)\n        wait (0) seconds\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [play v]\nhide\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        switch costume to (costume2 v)\n        set size to (90) %\n        wait until <not <mouse down?>>\n        switch costume to (costume1 v)\n        set size to (100) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat (5)\n            change size by (3)\n        end\n        wait until <not <touching (mouse-pointer v)?>>\n        repeat (5)\n            change size by (-3)\n        end\n    end\nend\n\nchange x by (10)\n\n@Levels\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\ngo to [front v] layer\n\nwhen I receive [next level v]\nnext costume\nwait (1) seconds\n\nwhen I receive [you win v]\nswitch costume to (costume11 v)\n\n@Level Counter\n\nwhen flag clicked\ngo to x: (-203) y: (140)\nswitch costume to (costume1 v)\nset size to (75) %\nhide\ngo to [front v] layer\n\nwhen I receive [play v]\nshow\ngo to [front v] layer\nwait (0.1) seconds\ngo to [front v] layer\n\nwhen I receive [next level v]\nnext costume\ngo to [front v] layer\n\nwhen I receive [you win v]\nswitch costume to (costume11 v)\n\n@lava\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nforever\n    if <<(level) = [2]> or <<(level) = [3]> or <<(level) = [4]> or <<(level) = [5]> or <<(level) = [6]> or <<(level) = [7]> or <<(level) = [8]> or <<(level) = [9]> or <(level) = [10]>>>>>>>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <(level) = [2]> then\n        switch costume to (costume2 v)\n        set size to (150) %\n        go to x: (-128) y: (68.5)\n    end\n    if <(level) = [3]> then\n        switch costume to (costume1 v)\n        set size to (65) %\n        go to x: (30) y: (60)\n    end\n    if <(level) = [4]> then\n        switch costume to (costume3 v)\n        set size to (110) %\n        go to x: (0) y: (0)\n    end\n    if <(level) = [5]> then\n        switch costume to (costume4 v)\n        set size to (120) %\n        go to x: (0) y: (0)\n    end\n    if <(level) = [6]> then\n        switch costume to (costume5 v)\n        set size to (100) %\n        go to x: (0) y: (20)\n    end\n    if <(level) = [7]> then\n        switch costume to (costume6 v)\n        set size to (100) %\n        go to x: (0) y: (0)\n    end\n    if <(level) = [8]> then\n        switch costume to (costume7 v)\n        set size to (100) %\n        go to x: (0) y: (0)\n    end\n    if <(level) = [9]> then\n        switch costume to (costume8 v)\n        set size to (100) %\n        go to x: (0) y: (0)\n    end\n    if <(level) = [10]> then\n        switch costume to (costume9 v)\n        set size to (100) %\n        go to x: (0) y: (0)\n        switch costume to (costume9 v)\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\ngo to x: (34) y: (-179)\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nnext costume\nwait (1) seconds\ngo to [front v] layer\n\nwhen I receive [play v]\nshow\nswitch costume to (costume1 v)\nwait (0) seconds\ngo to [front v] layer\n\nwhen I receive [next level v]\nif <(costume [number v]) = [5]> then\n    hide\nend\n\n@Sprite5\n\nwhen flag clicked\nset size to (150) %\nhide\nforever\n    go to x: (200) y: (100)\n    go to [front v] layer\nend\n\nforever\nend\n\nif <key (space v) pressed?> then\nend\n\nwhen I receive [play v]\nshow\nforever\n    if  then\n    end\nend\n\nwhen I receive [died v]\nswitch costume to (costume16 v)\n\nwhen I receive [switched v]\nswitch costume to (costume1 v)\nrepeat until <(costume [number v]) = [16]>\n    next costume\n    wait (0.099) seconds\nend\n\n@Sprite6\n\nwhen flag clicked\nhide\n\nwhen I receive [you win v]\nshow\nwait (0) seconds\ngo to [front v] layer\ngo to x: (0) y: (0)\n\n@Sprite7\n\nwhen I receive [play v]\nset [music v] to [1]\ngo to x: (43) y: (90)\ngo to [front v] layer\nforever\n    play sound [Ahrix - Nova.mp3 v] until done\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nwait (0.2) seconds\ngo to [front v] layer\n\nshow\n\n@Sprite8\n\nwhen flag clicked\nhide\n\n
                    AntiGravity: A Platformer\n   \nWarning: This Game Is Extremely Hard. All Levels Aredw   Possible.\nPress WASD/Arrow Keys to move. Press Space to switch gravity. There's a cooldown timer, you can only switch gravity when it's 0.\nHave fun Playing, and don't forget to love, fav, and follow me!\nCheck this game out: https://scratch.mit.edu/projects/269756701/\nThere are 10 levels.\n\n