Classic Obby || A scrolling platformer #games #All #roblox #platform #platformer #obby #coolgames

Instructions: If you like this project pls share _()_\nMovement : Arrow keys\nLvls:\n-1\n-2\n-3\n-4\n-5\n-6\n-7\n-8\n-9\n-10\n-11\n-12\n-13\nTouch blue to go to the next lv.\nDon't touch red.\nTouch yellow to run faster : Touch purple to run slower\nTouch purple to win.\nIf u don't mind, pls heart and star xD.

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [game start v]\nswitch backdrop to (backdrop2 v)\n\n@Sprite1\n\nwhen flag clicked\nhide\nset [control left v] to [-1.3]\nset [control right v] to [1.3]\n\ndefine Tick\nif <key (left arrow v) pressed?> then\n    change [x v] by (control left)\nend\nif <key (right arrow v) pressed?> then\n    change [x v] by (control right)\nend\nchange x by (x)\nset [x v] to ((x) * (0.9))\nif <touching color (#000000)?> then\n    change y by (1)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change x by ((x) * (-1))\n                        change y by (-5)\n                        if <key (up arrow v) pressed?> then\n                            if <(x) > [0]> then\n                                set [x v] to [-10]\n                            else\n                                set [x v] to [10]\n                            end\n                            set [y v] to [15]\n                        else\n                            set [x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange [y v] by (-1)\nchange y by (y)\nif <touching color (#000000)?> then\n    change y by ((y) * (-1))\n    set [y v] to [0]\nend\nchange y by (-1)\nif <key (up arrow v) pressed?> then\n    if <touching (sprite2 v)?> then\n        set [y v] to [13]\n    end\nend\nchange y by (1)\nchange [scrx v] by ((x position) * (-1))\nchange [scry v] by ((y position) * (-1))\ngo to x: (0) y: (0)\nif <<touching color (#ff0000)?> or <(scrY) > [300]>> then\n    start sound [ROBLOX Death Sound.mp3 v]\n    set [scrx v] to [94]\n    set [scry v] to [-130]\nend\nif <touching color (#0015ff)?> then\n    broadcast (next lv v)\nend\nif <touching color (#00ff15)?> then\n    set [y v] to [20]\nend\nif <touching color (#9966ff)?> then\n    broadcast (win v)\n    hide\n    stop [other scripts in sprite v]\n    stop [this script v]\nend\nif <touching color (#fff266)?> then\n    set [control left v] to [-5]\n    set [control right v] to [5]\nend\nif <touching color (#ff39f8)?> then\n    set [control left v] to [-1.3]\n    set [control right v] to [1.3]\nend\n\nwhen I receive [message1 v]\nTick\n\nwhen I receive [game start v]\nshow\ngo to [front v] layer\nset [x v] to [0]\nset [y v] to [0]\nforever\n    broadcast (message1 v)\nend\n\nwhen I receive [game start v]\nswitch costume to (costume5 v)\nforever\n    if <not <touching (sprite2 v)?>> then\n        if <<<(direction) = [90]> and <not <touching color (#000000)?>>> or <<key (up arrow v) pressed?> and <key (right arrow v) pressed?>>> then\n            switch costume to (costume6 v)\n            point in direction (90)\n        end\n        if <<<(direction) = [-90]> and <not <touching color (#000000)?>>> or <<key (up arrow v) pressed?> and <key (left arrow v) pressed?>>> then\n            switch costume to (costume6 v)\n            point in direction (-90)\n        end\n    else\n        if <(direction) = [90]> then\n            switch costume to (costume3 v)\n            point in direction (90)\n        end\n        if <(direction) = [-90]> then\n            switch costume to (costume3 v)\n            point in direction (-90)\n        end\n        if <key (left arrow v) pressed?> then\n            point in direction (-90)\n            switch costume to (costume4 v)\n            wait (0.1) seconds\n            switch costume to (costume3 v)\n            wait (0.1) seconds\n        end\n        if <key (right arrow v) pressed?> then\n            point in direction (90)\n            switch costume to (costume4 v)\n            wait (0.1) seconds\n            switch costume to (costume3 v)\n            wait (0.1) seconds\n        end\n    end\nend\n\n\n\n\n\n@Sprite2\n\ndefine position\nset [scrx v] to [300]\nset [scry v] to [0]\n\nwhen I receive [next lv v]\nnext costume\nposition\n\nwhen I receive [game start v]\nshow\nswitch costume to (costume2 v)\nset size to (400) %\nswitch costume to (costume1 v)\nposition\nforever\n    go to x: (scrX) y: (scrY)\nend\n\nwhen flag clicked\nhide\n\nset [scrx v] to [300]\nset [scry v] to [0]\n\nwhen I receive [win v]\nhide\n\n@Sprite3\n\nwhen flag clicked\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (150) %\n        if <mouse down?> then\n            start sound [pop v]\n            broadcast (game start v)\n            hide\n            stop [this script v]\n        end\n    else\n        set size to (100) %\n    end\nend\n\n@song\n\nwhen flag clicked\nforever\n    play sound [Belupacito-full v] until done\nend\n\n@win\n\nwhen I receive [win v]\nshow\nforever\n    change [mosaic v] effect by (1)\n    change size by (-1)\n    turn right (15) degrees\n    change [whirl v] effect by (1)\n    if <(size) = [4]> then\n        set size to (500) %\n        set [mosaic v] effect to (0)\n        set [whirl v] effect to (0)\n    end\nend\n\nwhen flag clicked\nhide\n\n@b18ae9b97bf052d197ebaf5e5ab1c6f3\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n@Love fave\n\nwhen flag clicked\nset [costume v] to [0]\nhide\nforever\n    wait (pick random (5) to (10)) seconds\n    switch costume to (costume1 v)\n    go to x: (0) y: (50)\n    show\n    go to [front v] layer\n    start sound [pop v]\n    repeat (9)\n        change y by (-6)\n    end\n    repeat (5)\n        change y by (3)\n    end\n    repeat (5)\n        change y by (-1)\n    end\n    wait (2) seconds\n    repeat (15)\n        change y by (7)\n    end\n    hide\nend\n\n