2021- A Mobile Platformer

Instructions: Welcome to my entry\n2021 A Platformer\nEnjoy and wish me good luck\n\nInstructions:\nUse WASD, arrow keys or mobile\n8 levels

@Stage\n\n@Player\n\nwhen flag clicked\ngo to x: (-172) y: (181)\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [xv v] by (1)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\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 y by (1)\n                        if <touching color (#000000)?> then\n                            change x by ((Xv) * (-1))\n                            if <<<mouse down?> and <(mouse y) > (y position)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\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 [yv v] by (-1)\n    change y by (Yv)\n    if <touching color (#000000)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (-1)\nend\n\nwhen flag clicked\nforever\n    if <touching (spikes v)?> then\n        go to x: (-172) y: (181)\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\n\nwhen flag clicked\nforever\n    if <(x position) > [227]> then\n        go to x: (-172) y: (181)\n        change [level v] by (1)\n    end\nend\n\nwhen flag clicked\nplay sound [TheFatRat - Monody \(feat. Laura Brehm\).mp3 v] until done\n\n@Ground\n\nwhen flag clicked\nshow\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        switch costume to (costume1 v)\n    end\n    if <(Level) = [2]> then\n        switch costume to (costume2 v)\n    end\n    if <(Level) = [3]> then\n        switch costume to (costume3 v)\n    end\n    if <(Level) = [4]> then\n        switch costume to (costume4 v)\n    end\n    if <(Level) = [5]> then\n        switch costume to (costume5 v)\n    end\n    if <(Level) = [6]> then\n        switch costume to (costume6 v)\n    end\n    if <(Level) = [7]> then\n        switch costume to (costume7 v)\n    end\n    if <(Level) = [8]> then\n        switch costume to (costume8 v)\n    end\n    if <(Level) = [9]> then\n        switch costume to (costume9 v)\n    end\nend\n\n@Spikes\n\nwhen flag clicked\nshow\n\nwhen flag clicked\nshow\nforever\n    if <(Level) = [1]> then\n        switch costume to (1 v)\n    end\n    if <(Level) = [2]> then\n        switch costume to (costume1 v)\n    end\n    if <(Level) = [3]> then\n        switch costume to (costume2 v)\n    end\n    if <(Level) = [4]> then\n        switch costume to (costume3 v)\n    end\n    if <(Level) = [5]> then\n        switch costume to (costume4 v)\n    end\n    if <(Level) = [6]> then\n        switch costume to (costume5 v)\n    end\n    if <(Level) = [7]> then\n        switch costume to (costume6 v)\n    end\n    if <(Level) = [8]> then\n        switch costume to (costume7 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [9]> then\n        hide\n    end\nend\n\n@Thumbnail \n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n