Night | Platformer (Part 2)

Instructions: Part 1: https://scratch.mit.edu/projects/621821811/\nPart 3: https://scratch.mit.edu/projects/628351618\n\nHi, welcome to my new platformer, night! \n\nConsider leaving a like and love. Also, please follow me.\n\nIf you propose this to be featured, I will be very appreciated. :)\n\nYou can also put this project to whatever studio you want!\n\n✅How to play?\nWAD or arrows key to move! (No mobile control sorry)\nAvoid spikes!\nIt contains a parallax too!\nPress skip to skip!\nPress space to activate sword and axe\nKey "c" to change weapon \nOthers are in-game!\n

@Stage\n\nwhen I receive [start v]\nforever\n    play sound [Nebula v] until done\nend\n\n@Player\n\nwhen I receive [reset v]\nshow\ngo [forward v] (1) layers\ngo to x: (-199) y: (0)\n\nwhen I receive [start v]\nforever\n    Codes\n    if <[] = [2]> then\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nswitch costume to (clone v)\nrepeat (10)\n    change [ghost v] effect by (7.3)\n    change [color v] effect by (7)\n    change size by (-3)\nend\ndelete this clone\n\nwhen flag clicked\nswitch costume to (player v)\nset [level v] to [1]\nbroadcast (Reset v)\nbroadcast (start v)\n\ndefine IDK\nif <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n\nwhen I receive [n v]\ngo to x: (-220) y: (-95)\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [x speed v] by (-1)\n        switch costume to (left v)\n    else\n        IDK\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [x speed v] by (1)\n        switch costume to (right v)\n    else\n        IDK\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        switch costume to (up v)\n    else\n        IDK\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        switch costume to (left2 v)\n    else\n        IDK\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        switch costume to (right2 v)\n    else\n        IDK\n    end\n    set [x speed v] to ((x speed) * (0.85))\n    change x by (x speed)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((x speed) * (-1))\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <(x speed) > [0]> then\n                set [x speed v] to [-7]\n            else\n                set [x speed v] to [7]\n            end\n            set [y speed v] to [9]\n        else\n            set [x speed v] to [0]\n        end\n    end\n    change [y speed v] by (-0.5)\n    change y by (y speed)\n    if <touching (ground v)?> then\n        change y by ((y speed) - ((y speed) * (2)))\n        set [y speed v] to [0]\n    end\n    change y by (-1)\n    if <<touching (ground v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [y speed v] to [8]\n    end\n    change y by (1)\n    change y by ((y speed) * (0.1))\n    if <<(x position) > [239]> and <<(Level) > [0]> and <(Level) < [14]>>> then\n        change [level v] by (1)\n        go to x: (-220) y: (-95)\n    end\n    if <touching (spikes v)?> then\n        switch costume to (player2 v)\n        play sound [Rip v] until done\n        go to x: (-220) y: (-95)\n        wait (0.01) seconds\n        switch costume to (player v)\n    end\n    if <touching (spikes2 v)?> then\n        switch costume to (player2 v)\n        play sound [Rip v] until done\n        go to x: (-220) y: (-95)\n        wait (0.01) seconds\n        switch costume to (player v)\n    end\n    if <touching (enemy v)?> then\n        switch costume to (player2 v)\n        play sound [Rip v] until done\n        go to x: (-220) y: (-95)\n        wait (0.01) seconds\n        switch costume to (player v)\n    end\n    if <touching (enemies v)?> then\n        switch costume to (player2 v)\n        play sound [Rip v] until done\n        go to x: (-220) y: (-95)\n        wait (0.01) seconds\n        switch costume to (player v)\n    end\n    if <touching (speed up v)?> then\n        change [x speed v] by (6)\n    end\n    if <touching (trampoline v)?> then\n        change [y speed v] by (8)\n    end\n    if <(y position) < [-180]> then\n        switch costume to (player2 v)\n        play sound [Rip v] until done\n        go to x: (-220) y: (-95)\n        wait (0.01) seconds\n        switch costume to (player v)\n    end\nend\n\nforever\n    switch costume to (player v)\nend\n\ndefine Codes\n\n@Ground\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\nend\n\n@light\n\nwhen I receive [start v]\nforever\n    go to (player v)\nend\n\n@light2\n\nwhen I receive [start v]\nforever\n    go to (player v)\nend\n\n@SPikes\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\nend\n\n@words\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo [forward v] (3) layers\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nclear graphic effects\nset [ghost v] effect to (100)\n\n@Speed up\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\nend\n\n@Trampoline\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\n    go to [front v] layer\nend\n\nset [level v] to [013]\n\n@sword\n\nwhen flag clicked\nset [level v] to [1]\nset [enemy v] to [0]\nset [x speed v] to [0]\nset [y speed v] to [0]\npoint in direction (131)\ngo to (player v)\nswitch costume to (sword3 v)\ngo [forward v] (1) layers\nset [s v] to [1]\n\nwhen flag clicked\nshow\nforever\n    if <(S) = [1]> then\n        go to (player v)\n        if <key (space v) pressed?> then\n            if <touching (enemies v)?> then\n                broadcast (Kill v)\n                set [enemy v] to [1]\n                set [enemy v] to [0]\n            end\n            if <(costume [number v]) = [2]> then\n                repeat (6)\n                    -360\n                end\n            else\n                repeat (6)\n                    360\n                end\n            end\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (sword2 v)\n            point in direction (49)\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            switch costume to (sword3 v)\n            point in direction (131)\n        end\n    end\n    if <(S2) = [1]> then\n        hide\n    else\n        show\n    end\nend\n\ndefine 360\nturn right (60) degrees\n\ndefine -360\nturn left (60) degrees\n\n@Fake\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\nend\n\n@Sprite1\n\nwhen flag clicked\nshow\ngo to x: (193) y: (-148)\nforever\n    if <(Level) = [14]> then\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(Level) = [14]> then\nelse\n    go to x: (193) y: (-148)\n    change [level v] by (1)\n    broadcast (n v)\nend\n\nwhen flag clicked\nshow\ngo to [front v] layer\n\n@Sprite2\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    go to x: ((mouse x) / (15)) y: ((mouse y) / (15))\nend\n\n@Enemies\n\nwhen I receive [kill v]\nforever\n    if <<not <(Level) = [5]>> or <not <(Level) = [7]>>> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [start v]\nhide\nforever\n    if <(Level) = [5]> then\n        show\n        switch costume to (costume1 v)\n        go [forward v] (1000) layers\n        show\n        go to x: (0) y: (0)\n        glide (1) secs to x: (-160) y: (0)\n        glide (1) secs to x: (0) y: (0)\n        if <(enemy) = [1]> then\n            stop [this script v]\n        end\n    else\n        if <not <(Level) = [7]>> then\n            hide\n        else\n            show\n        end\n    end\n    if <(Level) = [7]> then\n        show\n        switch costume to (costume1 v)\n        go [forward v] (1000) layers\n        show\n        go to x: (-245) y: (0)\n        glide (0.3) secs to x: (-180) y: (0)\n        glide (0.3) secs to x: (-245) y: (0)\n        if <(enemy) = [1]> then\n            stop [this script v]\n        end\n    else\n        if <not <(Level) = [5]>> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen flag clicked\ngo [backward v] (1000) layers\nforever\n    if <<(Level) = [6]> or <(Level) = [8]>> then\n        hide\n    end\nend\n\n@Axe\n\nwhen flag clicked\nhide\nswitch costume to (sword v)\ngo to x: (12) y: (36)\nset [level v] to [1]\nset [enemy v] to [0]\nset [x speed v] to [0]\nset [y speed v] to [0]\nset [c v] to [0]\nset [s2 v] to [0]\npoint in direction (131)\nforever\n    if <<touching (player v)?> and <(Level) = [13]>> then\n        go to (player v)\n        set [c v] to [1]\n        switch costume to (sword3 v)\n        point in direction (-72)\n        go [forward v] (1) layers\n        set [s2 v] to [1]\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [13]> then\n        show\n    end\n    if <(S2) = [1]> then\n        go to (player v)\n        if <key (space v) pressed?> then\n            if <touching (enemies v)?> then\n                broadcast (Kill v)\n                set [enemy v] to [1]\n                set [enemy v] to [0]\n            end\n            if <(costume [number v]) = [2]> then\n                repeat (6)\n                    -360\n                end\n            else\n                repeat (6)\n                    360\n                end\n            end\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (sword2 v)\n            point in direction (49)\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            switch costume to (sword3 v)\n            point in direction (-72)\n        end\n    end\n    if <<(Level) = [14]> and <(C) = [0]>> then\n        hide\n    end\n    if <(C) = [0]> then\n    else\n        if <<(Level) = [13]> or <(Level) = [14]>> then\n            show\n        end\n    end\nend\n\ndefine 360\nturn right (60) degrees\n\ndefine -360\nturn left (60) degrees\n\nif <(costume [number v]) = [3]> then\n    think [e3e] for (2) seconds\nelse\n    think [Hmm...] for (2) seconds\nend\n\nhide\n\n@Control or others\n\nwhen [c v] key pressed\nif <(C) = [1]> then\n    if <(S2) = [2]> then\n        set [s2 v] to [1]\n    else\n        set [s2 v] to [2]\n    end\nend\n\nwhen flag clicked\nset [s2 v] to [0]\n\n