Rainbow Platformer

Instructions:                           Rainbow Platformer\nWelcome to the rainbow platformer. Simply click the green flag to play. Use the arrow keys to move! Feel free to remix and have fun! Just be sure to give credit!\n-------------------------------------------------------------------------\nPlease❤️ and ⭐for more games if you like this one!

@Stage\n\nwhen flag clicked\nforever\n    play sound [Roar v] until done\nend\n\n@Player\n\nwhen flag clicked\ngo to [front v] layer\nshow\ngo to x: (-209) y: (-59)\nset [y v] to [0]\nset [x v] to [0]\nset rotation style [left-right v]\nforever\n    change [y v] by (-0.5)\n    if <key (right arrow v) pressed?> then\n        change [x v] by (0.7)\n        point in direction (90)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-0.7)\n        point in direction (-90)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (platform v)?> then\n        change y by (1)\n        if <touching (platform v)?> then\n            change y by (1)\n            if <touching (platform v)?> then\n                change y by (1)\n                if <touching (platform v)?> then\n                    change y by (1)\n                    if <touching (platform v)?> then\n                        change y by (1)\n                        if <touching (platform v)?> then\n                            change x by ((x) * (-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                                if <(x) > [0]> then\n                                    set [x v] to [-8]\n                                else\n                                    set [x v] to [8]\n                                end\n                                set [y v] to [10]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y)\n    if <touching (platform v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <(y position) < [-180]> then\n        go to x: (-209) y: (-59)\n    end\n    if <touching (platform v)?> then\n        if <key (up arrow v) pressed?> then\n            set [y v] to [10]\n        end\n    end\n    change y by (1)\n    if <touching (flag v)?> then\n        broadcast (next level v)\n        change [level v] by (1)\n        go to x: (-209) y: (-59)\n    end\n    if <touching (lava v)?> then\n        go to x: (-209) y: (-59)\n    end\nend\n\nwhen I receive [next level v]\ngo to x: (-209) y: (-59)\n\nwhen I receive [respawn v]\ngo to x: (-209) y: (-59)\n\n@Platform\n\nwhen flag clicked\nswitch costume to (level 1 v)\nset [level v] to [1]\nforever\n    switch costume to (join [Level ] (Level))\nend\n\nwhen I receive [next level v]\nswitch backdrop to (next backdrop v)\n\n@Flag\n\nwhen flag clicked\nshow\nforever\n    if <(Level) = [1]> then\n        switch costume to (flag-removebg-preview v)\n        show\n    end\n    if <(Level) = [2]> then\n        switch costume to (flag-removebg-preview v)\n        show\n    end\n    if <(Level) = [3]> then\n        switch costume to (flag-removebg-preview v)\n        show\n    end\n    if <(Level) = [4]> then\n        switch costume to (flag-removebg-preview v)\n        show\n    end\n    if <(Level) = [5]> then\n        switch costume to (flag-removebg-preview v)\n        show\n    end\n    if <(Level) = [6]> then\n        switch costume to (flag-removebg-preview v)\n        show\n    end\n    if <(Level) = [7]> then\n        switch costume to (flag-removebg-preview2 v)\n        show\n    end\n    if <(Level) = [8]> then\n        switch costume to (flag-removebg-preview v)\n        show\n    end\n    if <(Level) = [9]> then\n        switch costume to (flag-removebg-preview v)\n        show\n    end\n    if <(Level) = [10]> then\n        hide\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\nforever\n    set [cloud pos v] to (pick random (90) to (20))\n    create clone of (_myself_ v)\n    wait (3) seconds\n    go to x: (-206) y: (Cloud pos)\nend\n\nwhen I start as a clone\nshow\nglide (5) secs to x: (206) y: (Cloud pos)\ndelete this clone\n\n@lava\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        hide\n    end\n    if <(Level) = [2]> then\n        switch costume to (costume1 v)\n        go to x: (-28) y: (-13)\n        show\n    end\n    if <(Level) = [3]> then\n        hide\n    end\n    if <(Level) = [4]> then\n        switch costume to (costume2 v)\n        go to x: (0) y: (0)\n        show\n    end\n    if <(Level) = [5]> then\n        switch costume to (costume3 v)\n        show\n    end\n    if <(Level) = [6]> then\n        go to x: (0) y: (0)\n        switch costume to (costume4 v)\n        show\n    end\n    if <(Level) = [7]> then\n        hide\n    end\n    if <(Level) = [8]> then\n        hide\n    end\n    if <(Level) = [9]> then\n        switch costume to (costume5 v)\n        show\n    end\n    if <(Level) = [10]> then\n        hide\n    end\nend\n\n@Respawn button\n\nwhen flag clicked\ngo to x: (-188) y: (-156)\nshow\nforever\n    if <(Level) = [10]> then\n        go to x: (-190) y: (-149)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (respawn v)\n\n@skip level BUTTON\n\nwhen flag clicked\nshow\nforever\n    if <(Level) = [1]> then\n        show\n    end\n    if <(Level) = [2]> then\n        show\n    end\n    if <(Level) = [3]> then\n        show\n    end\n    if <(Level) = [4]> then\n        show\n    end\n    if <(Level) = [5]> then\n        show\n    end\n    if <(Level) = [6]> then\n        show\n    end\n    if <(Level) = [7]> then\n        show\n    end\n    if <(Level) = [8]> then\n        show\n    end\n    if <(Level) = [9]> then\n        show\n    end\n    if <(Level) = [10]> then\n        hide\n    end\nend\n\nwhen this sprite clicked\nchange [level v] by (1)\nbroadcast (next level v)\n\n@Sprite2\n\nwhen flag clicked\nchange [ghost v] effect by (100)\nforever\n    go to [front v] layer\nend\n\n