Wings of Fire platformer 4

Instructions: Arrow keys to move\nAvoid spikes\nConsider loving and favoriting, I worked hard on this\nComment any feedback\nThank you!\nATTENTION, FOR MOBILE VERSION, SEE THIS REMIX:\nhttps://scratch.mit.edu/projects/630376856\n\n\n\n#Games #All #Fun #Platformer #Scrolling Platformer #Winter\n@sigma61

@Stage\n\nwhen flag clicked\nset volume to (70) %\nforever\n    set volume to (70) %\n    play sound [Vexento - Syndrome v] until done\nend\n\n@Player\n\nwhen flag clicked\nset [xvel v] to [0]\nset [yvel v] to [0]\nset [level v] to [1]\ngo to x: (-180) y: (-50)\nforever\n    Run physics [0.9] [.9] [-1] [15]\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > (mouse y)>>> then\n        switch costume to (costume2 v)\n    else\n        if <not <<touching color (#4c86ff)?> or <touching color (#437de0)?>>> then\n            switch costume to (costume1 v)\n        else\n            switch costume to (costume2 v)\n        end\n    end\nend\n\ndefine Run physics (speed) (friction) (gravity) (jump height)\nchange [yvel v] by (gravity)\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [xvel v] by (speed)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n    change [xvel v] by ((speed) * (-1))\nend\nset [xvel v] to ((Xvel) * (friction))\nchange x by (Xvel)\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change y by (-4)\n    change x by ((Xvel) * (-1))\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        set [yvel v] to ((jump height) - (3.5))\n        if <[0] < (Xvel)> then\n            set [xvel v] to [-6]\n        else\n            set [xvel v] to [6]\n        end\n    else\n        set [xvel v] to [0]\n    end\nend\nchange y by (Yvel)\nif <touching (ground v)?> then\n    change y by ((Yvel) * (-1))\n    set [yvel v] to [0]\nend\nchange y by (-1)\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <touching (ground v)?> then\n        set [yvel v] to (jump height)\n    end\nend\nchange y by (1)\n\nwhen I receive [ded v]\nstart sound [Roblox Death Sound  OOF Sound Effect v]\ngo to x: (-220) y: (-50)\nset [ghost v] effect to (0)\n\nwhen I start as a clone\nrepeat (2)\n    change size by (-10)\n    change [ghost v] effect by (20)\nend\ndelete this clone\n\nwhen I receive [next level v]\ngo to x: (-180) y: (-50)\n\nwhen flag clicked\nrepeat until <(Level) = [22]>\n    if <[220] < (x position)> then\n        broadcast (Next level v) and wait\n        wait until <not <[220] < (x position)>>\n    end\n    if <<<(y position) < [-170]> or <touching (spikes v)?>> or <<touching (lava v)?> or <touching (saw v)?>>> then\n        broadcast (Ded v) and wait\n    end\n    if <touching (bouncy v)?> then\n        set [yvel v] to [20]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching color (#54ceff)?> or <touching color (#63d2ff)?>> then\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n            change [xvel v] by (-1.3)\n        end\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n            change [xvel v] by (1.3)\n        end\n        if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > (mouse y)>>> then\n            change [yvel v] by (-1.3)\n        end\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            change [yvel v] by (1.3)\n        end\n        set [xvel v] to ((Xvel) * (0.81))\n        set [yvel v] to ((Yvel) * (0.81))\n        change [yvel v] by (((Yvel) / (14.9)) + (0.1))\n    end\n    set size to (125) %\nend\n\nwhen I receive [respawn v]\ngo to x: (-220) y: (-50)\nset [ghost v] effect to (0)\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go [backward v] (1) layers\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nforever\n    if <[220] < (x position)> then\n        play sound [Ding Sound Effect v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (bouncy v)?> then\n        play sound [Mario_Jump_-_Gaming_Sound_Effect v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<(y position) < [-170]> or <touching (spikes v)?>> or <<touching (lava v)?> or <touching (saw v)?>>> then\n        play sound [Roblox Death Sound  OOF Sound Effect v] until done\n        change [deaths: v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <[2] = (costume [number v])> then\n        set [xvel v] to [0]\n        wait until <not <[2] = (costume [number v])>>\n    end\nend\n\n@Ground\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    go to [front v] layer\n    go [backward v] (5) layers\n    set [level v] to (costume [number v])\n    go to x: (0) y: (0)\nend\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [21]> then\n        broadcast (Finished v)\n        stop [this script v]\n    end\nend\n\n@Spikes\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    go to [front v] layer\n    go [backward v] (10) layers\n    set [level v] to (costume [number v])\n    go to x: (0) y: (0)\nend\n\nwhen I receive [next level v]\nnext costume\n\n@Love fave\n\nwhen flag clicked\nset [costume v] to [0]\nhide\nforever\n    if <not <<(Love) = [1]> and <(Fave) = [1]>>> then\n        wait (pick random (15) to (30)) 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 (4) seconds\n        repeat (15)\n            change y by (7)\n        end\n        hide\n    end\n    if <(Costume) > [0]> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [message1 v]\nwait (5) seconds\nstop [other scripts in sprite v]\n\n@Tb\n\nwhen flag clicked\nhide variable [total deaths: v]\nset [deaths: v] to [0]\nhide variable [☁ fastest time: v]\nset [time: v] to [0]\nhide variable [time: v]\ngo to x: (0) y: (0)\ngo to [front v] layer\nhide\nset [ghost v] effect to (100)\nshow variable [timer v]\nshow variable [deaths: v]\nforever\n    set [timer v] to (timer)\nend\n\nwhen [timer v] > (Timer)\nhide variable [deaths: v]\nhide variable [timer v]\nset [ghost v] effect to (0)\nshow\nforever\n    go to [front v] layer\nend\n\nwhen I receive [finished v]\nshow variable [total deaths: v]\nset [total deaths: v] to (Deaths:)\nshow variable [☁ fastest time: v]\nshow variable [time: v]\nset [time: v] to (round (Timer))\nstop [this script v]\n\nwhen I receive [finished v]\nhide variable [timer v]\nif <(Time:) < (☁ Fastest time:)> then\n    set [☁ fastest time: v] to (Time:)\nend\n\nwhen flag clicked\n\n@Love\n\nwhen flag clicked\nset [fave v] to [0]\nset [love v] to [0]\nforever\n    if <touching (mouse-pointer v)?> then\n        set [love v] to [1]\n        broadcast (message1 v)\n    end\nend\n\nwhen flag clicked\nshow\n\n@fave\n\nwhen flag clicked\nset [fave v] to [0]\nset [love v] to [0]\nforever\n    if <touching (mouse-pointer v)?> then\n        set [fave v] to [1]\n        broadcast (message1 v)\n    end\nend\n\nwhen flag clicked\nshow\n\n