Powerups - a Platformer #games

Instructions: Hello! This is a part 2 of my original project, Toast - Platformer || https://scratch.mit.edu/projects/603039933/\n\n▶Advertising is allowed\n▶No spamming or F4F\n▶No mean comments or else you'll be reported\n▶Please LOVE and FAVORITE ❤⭐\n▶If you enjoyed this project, please consider Following :)\n▶100 Likes for a part 3! \n▶Hope you enjoy! :D\n\nRULES:\n-Arrow keys or WAD to move\n-Down Arrow of S to get squished :p\n-The sink/hose/water thing will make you go higher...\n-Don't touch spikes or fall\n-Get to the Toaster to get to the other level\n\n\n

@Stage\n\nwhen flag clicked\nforever\n    play sound [Explorer v] until done\nend\n\n@Player\n\nbroadcast (end v)\n\nwhen I start as a clone\nswitch costume to (light v)\nset [ghost v] effect to (0)\nrepeat (5)\n    change [ghost v] effect by (20)\nend\ndelete this clone\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <touching (ground v)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\ndefine Walk (direction) (speed)\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (ground v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\nend\nif <(speed) < [0]> then\n    change [frame v] by ((speed) / (-8))\nelse\n    change [frame v] by ((speed) / (8))\nend\n\nwhen flag clicked\nswitch costume to (light v)\ngo to x: (-210) y: (-121)\nset rotation style [left-right v]\nshow\nset [speed y v] to [0]\nset [falling? v] to [10]\nforever\n    switch costume to (hitbox v)\n    change y by (speed y)\n    Touch Ground <(speed y) > [0]>\n    change [speed y v] by (-1.3)\n    set [speed x v] to ((speed x) * (0.8))\n    if <key (left arrow v) pressed?> then\n        change [speed x v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        change [speed x v] by (1)\n    end\n    if <(speed x) < [-0.5]> then\n        Walk (-90) (speed x)\n    else\n        if <(speed x) > [0.5]> then\n            Walk (90) (speed x)\n        else\n            set [frame v] to [0]\n        end\n    end\n    if <key (up arrow v) pressed?> then\n        if <<(jump key) = [0]> and <(falling?) < [3]>> then\n            set [speed y v] to [14]\n            set [falling? v] to [6]\n            set [jump key v] to [1]\n        end\n    else\n        set [jump key v] to [0]\n    end\n    if <<(y position) < [-175]> or <<touching (enemy v)?> or <touching (lava v)?>>> then\n        go to x: (-220) y: (-121)\n        set [speed y v] to [0]\n        broadcast (Reset v)\n    end\n    if <touching (goal v)?> then\n        go to x: (-220) y: (-121)\n        set [speed y v] to [0]\n        change [my variable v] by (1)\n        broadcast (Next Level v)\n    end\n    switch costume to (classic v)\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nswitch costume to (classic v)\n\nwhen flag clicked\nforever\n    if <key (r v) pressed?> then\n        go to x: (-220) y: (-121)\n        set [speed y v] to [0]\n        broadcast (Reset v)\n    end\nend\n\nwhen I receive [cave v]\n\nswitch costume to (steel v)\nforever\n    switch costume to (steel v)\nend\n\nwhen flag clicked\nforever\n    if <touching (gem v)?> then\n        broadcast (End v)\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (light v)\nend\n\n@Ground\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [8]> then\n        broadcast (cave v)\n    end\nend\n\n@Goal\n\nwhen flag clicked\nshow\ndelete all of [goal places v]\nadd [210] to [goal places v]\nadd [-110] to [goal places v]\nadd [210] to [goal places v]\nadd [-114] to [goal places v]\nadd [210] to [goal places v]\nadd [-110] to [goal places v]\nadd [210] to [goal places v]\nadd [-117] to [goal places v]\nadd [210] to [goal places v]\nadd [-110] to [goal places v]\nadd [210] to [goal places v]\nadd [-110] to [goal places v]\nadd [210] to [goal places v]\nadd [-40] to [goal places v]\nwait (0.1) seconds\nset [level v] to [1]\nforever\n    go to x: (item (((Level) * (2)) - (1)) of [goal places v]) y: (item ((Level) * (2)) of [goal places v])\nend\n\nif <(Level) > [7]> then\n    hide\nend\n\nwhen flag clicked\nshow\nforever\n    show\n    go to x: (210) y: (-110)\n    if <(Level) = [7]> then\n        go to x: (210) y: (-40)\n    end\n    if <(Level) = [2]> then\n        go to x: (210) y: (-115)\n    end\n    if <(Level) = [4]> then\n        go to x: (210) y: (-117)\n    end\n    if <(Level) = [16]> then\n        hide\n    end\nend\n\nwhen flag clicked\n\nforever\n    if <<touching (player v)?> and <(Level) = [8]>> then\n        broadcast (end v)\n    end\nend\n\n@Enemy\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <touching (ground v)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\ndefine Walk (direction) (speed)\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (ground v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\nend\nif <(speed) < [0]> then\n    change [frame v] by ((speed) / (-8))\nelse\n    change [frame v] by ((speed) / (8))\nend\n\nwhen flag clicked\nhide\nwait (0.05) seconds\nforever\n    if <(Level) = [5]> then\n        go to x: (0) y: (-115)\n        create clone of (_myself_ v)\n        wait until <(Level) = [7]>\n    end\n    if <(Level) = [7]> then\n        go to x: (130) y: (-45)\n        create clone of (_myself_ v)\n        wait until <(Level) = [8]>\n    end\n    wait (0.05) seconds\nend\n\nwhen I start as a clone\nset rotation style [left-right v]\nshow\nset [speed y v] to [0]\nset [falling? v] to [10]\nforever\n    repeat (pick random (40) to (90))\n        switch costume to (hitbox v)\n        set [speed x v] to ((speed x) * (0.8))\n        if <(x position) > ([x position v] of [player v])> then\n            Walk (-90) (-1.8)\n        else\n            if <(x position) < ([x position v] of [player v])> then\n                Walk (90) (1.8)\n            else\n                set [frame v] to [0]\n            end\n        end\n        set [my c v] to [2]\n    end\n    set [my c v] to [3]\n    wait (0.35) seconds\n    set [my c v] to [4]\n    wait (0.05) seconds\n    set [my c v] to [5]\n    wait (0.05) seconds\n    set [my c v] to [6]\n    wait (0.15) seconds\n    set [my c v] to [7]\n    wait (0.05) seconds\n    set [my c v] to [3]\n    wait (0.25) seconds\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I receive [reset v]\nrepeat (1)\n    delete this clone\nend\nif <(Level) = [5]> then\n    go to x: (0) y: (-115)\n    create clone of (_myself_ v)\nend\nif <(Level) = [7]> then\n    go to x: (130) y: (-45)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset rotation style [left-right v]\nshow\nset [speed y v] to [0]\nset [falling? v] to [10]\nforever\n    switch costume to (hitbox v)\n    change [speed y v] by (-1.3)\n    change y by (speed y)\n    Touch Ground <(speed y) > [0]>\n    switch costume to (My C)\n    if <<(y position) < [-175]> or <touching (lava v)?>> then\n        delete this clone\n    end\nend\n\n@Decorations\n\nwhen flag clicked\nset [my variable v] to [1]\nforever\n    switch costume to (my variable)\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\n@Thumbnail\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    show\nend\n\nwhen I receive [end v]\nswitch costume to (costume2 v)\nforever\n    set [ghost v] effect to (0)\n    go to [front v] layer\n    show\nend\n\n@Gem\n\nwhen flag clicked\nforever\n    hide\n    if <(Level) = [16]> then\n        show\n    end\nend\n\n@Clouds\n\nwhen flag clicked\nhide\nforever\n    wait (pick random (2.5) to (5)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nset size to (pick random (50) to (70)) %\nswitch costume to (pick random (1) to (3))\nset [ghost v] effect to (pick random (30) to (45))\nset [cloud side v] to (pick random (1) to (2))\nif <(Cloud Side) = [1]> then\n    go to x: (246) y: (pick random (131) to (0))\n    repeat until <(x position) < [-243]>\n        change x by ((0) - (pick random (0.5) to (2)))\n    end\nelse\n    go to x: (-246) y: (pick random (131) to (0))\n    repeat until <(x position) > [243]>\n        change x by (pick random (0.5) to (2))\n    end\nend\ndelete this clone\n\n@Lava\n\nwhen flag clicked\nset [my variable v] to [1]\nforever\n    switch costume to (my variable)\n    go to [back v] layer\nend\n\n