Hero a platformer

Instructions:                          \n\n                                   ! STORY !\nA new cube has been born and has turned against his army to join the good guy team and become a hero.\nThe boss is invading every city of redshed kingdom.\nand is heading for his city. Will he save his city?\n\nThis took me a lot of hard work so i would really appreciate it if you ❤️,⭐️ and follow\n\n\n

@Stage\n\n@player\n\nwhen flag clicked\nforever\n    if <touching (danger v)?> then\n        go to x: (-200) y: (0)\n        change [deaths v] by (1)\n    end\nend\n\nwhen flag clicked\nshow\nset [x v] to [0]\nset [y v] to [0]\nforever\n    change [y v] by (-1)\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    if <touching (levels v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n            set [y v] to [17]\n            if <(x) > [0]> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching (levels v)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> and <touching (levels v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <(x position) > [222]> then\n        go to x: (-200) y: (0)\n        broadcast (NEXT LEVEL v) and wait\n        if <touching (trampoline v)?> then\n            set [y v] to [22]\n        end\n    end\nend\n\nwhen flag clicked\nset [level v] to [0]\nchange [☁ views! v] by (1)\ngo to x: (-200) y: (0)\n\nwhen I receive [next level v]\nchange [level v] by (1)\n\nwhen flag clicked\nforever\n    if <touching (trampoline v)?> then\n        set [y v] to [22]\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (skin)\nend\n\nwhen flag clicked\nset [skin v] to [costume]\n\nwhen I receive [cutscene v]\nwait (12) seconds\n\nstop [other scripts in sprite v]\n\nwhen flag clicked\nforever\n    if <touching (boss v)?> then\n        go to x: (-200) y: (0)\n        change [deaths v] by (1)\n    end\nend\n\n@levels\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (level 1 v)\n\n@danger\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [6]> then\n        repeat until <(costume [number v]) = [7]>\n            go to x: (38) y: (-113)\n            wait (1) seconds\n            go to x: (-8) y: (-105)\n            wait (1) seconds\n            go to x: (51) y: (-104)\n            if <touching (shuriken v)?> then\n                hide\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume7]> then\n        repeat until <(costume [name v]) = [costume8]>\n            show\n            go to x: (38) y: (-113)\n            wait (1) seconds\n            go to x: (32) y: (-181)\n            wait (1) seconds\n            go to x: (21) y: (-52)\n        end\n    end\nend\n\nwhen flag clicked\ngo to x: (38) y: (-113)\n\n@boss\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [11]> then\n        repeat until <(costume [number v]) = [12]>\n            switch costume to (costume11 v)\n            wait (1) seconds\n            switch costume to (costume11 v)\n            wait (0.5) seconds\n            set size to (100) %\n            show\n            go to x: (112) y: (204)\n            point in direction (90)\n            repeat (1)\n                change y by (-10)\n                turn right (10) degrees\n            end\n            broadcast (boss time v)\n            wait (1) seconds\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [boss time v]\nswitch costume to (costume11 v)\npoint in direction (90)\ngo to x: (83) y: (22)\n\n\n\nwhen flag clicked\nforever\n    if <touching (shuriken v)?> then\n        switch costume to (costume14 v)\n        wait (1) seconds\n        switch costume to (costume15 v)\n        wait (1) seconds\n        switch costume to (costume16 v)\n        wait (1) seconds\n        switch costume to (costume17 v)\n        wait (1) seconds\n        switch costume to (costume18 v)\n        wait (1) seconds\n        switch costume to (costume11 v)\n        broadcast (Cutscene v)\n    end\nend\n\ndelete this clone\n\nwhen I receive [cutscene v]\ngo to x: (80) y: (25)\nwait (1) seconds\ngo to x: (136) y: (92)\nwait (1) seconds\ngo to x: (153) y: (95)\nwait (1) seconds\ngo to x: (221) y: (70)\nhide\nplay sound [12-world-clear v] until done\n\nwait (1) seconds\n\n@saw\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [10]> then\n        repeat until <(costume [number v]) = [11]>\n            wait (0.5) seconds\n            set size to (100) %\n            show\n            go to x: (112) y: (204)\n            repeat (40)\n                change y by (-10)\n                turn right (10) degrees\n            end\n        end\n    end\nend\n\nwhen I receive [next level v]\nnext costume\n\nshow\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\n@trampoline\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\n@Inventory\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    switch costume to (costume2 v)\n    wait (0.02) seconds\n    broadcast (shop v)\nend\n\nwhen flag clicked\n\nwhen I receive [found v]\nforever\n    if <<not <touching (mouse-pointer v)?>> and <(costume [number v]) = [1]>> then\n        repeat (5)\n            change size by (2)\n        end\n        wait until <<not <touching (mouse-pointer v)?>> or <(costume [number v]) = [2]>>\n        if <(costume [number v]) = [2]> then\n            set size to (100) %\n        else\n            repeat (5)\n                change size by (-2)\n            end\n        end\n    end\nend\n\nwhen I receive [found v]\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\ngo to [front v] layer\nrepeat (8)\n    change [ghost v] effect by (-10)\n    go to [front v] layer\nend\n\nwhen I receive [shop v]\nset [ghost v] effect to (0)\nrepeat (5)\n    change [ghost v] effect by (20)\nend\n\nwhen I receive [doneshop v]\nswitch costume to (costume1 v)\nrepeat (5)\n    change [ghost v] effect by (-25)\nend\nset [ghost v] effect to (0)\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        say [Inventory] for (1) seconds\n    end\nend\n\ngo to x: (40) y: (-40)\nhide\n\n@shopback\n\nwhen I receive [shop v]\nset [ghost v] effect to (100)\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nrepeat (4)\n    change [ghost v] effect by (-25)\nend\nwait until <not <mouse down?>>\nwait until <<mouse down?> and <not <touching (mouse-pointer v)?>>>\nbroadcast (doneshop v)\nwait (0.05) seconds\nrepeat (4)\n    change [ghost v] effect by (25)\nend\nhide\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\n@Shuriken\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        broadcast (Shuriken v)\n        wait until <not <key (space v) pressed?>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(Throwing?) = [1]>> then\n        go to (player v)\n        point in direction ([direction v] of [player v])\n    end\nend\n\nwhen I receive [shuriken v]\nset [throwing? v] to [1]\nshow\nrepeat until <touching (enemy v)?>\n    move (10) steps\n    next costume\n    if <touching (_edge_ v)?> then\n        set [throwing? v] to [0]\n        hide\n    end\nend\nset [throwing? v] to [0]\nhide\n\nwhen I receive [shuriken v]\nplay sound [Slash v] until done\n\n@player (shuriken)\n\nwhen this sprite clicked\nif <[1] < (coins)> then\n    set [skin v] to [costume2]\n    broadcast (doneshop v)\nend\n\nwhen I receive [shop v]\nshow\nforever\n    go to [front v] layer\n    go [forward v] (33333) layers\n    go [forward v] (33333) layers\nend\n\nwhen I receive [doneshop v]\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        say [Shuriken] for (1) seconds\n    end\nend\n\n@text\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@thumbnail\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n