Troll Platformer 2

Instructions: Use WASD or Arrow keys to play. Your goal is to beat the game in the quickest time possible. Every level is possible! Have FUN! I will put the world record in the notes and credits.\n\nComment #trolled if you were trolled!\nMake sure to star and heart if you want more stuff like this!\n\nTROLL PLATFORMER 3 IS COMING SOON!!

@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (join [Level ] (#️⃣))\nend\n\n@Box person\n\nwhen flag clicked\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [x vel v] by (0.8)\n        switch costume to (looking right v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [x vel v] by (-0.8)\n        switch costume to (looking left v)\n    end\n    set [x vel v] to ((X vel) * (0.89))\n    change x by (X vel)\n    if <touching (platform v)?> then\n        change y by (1)\n        if <touching (platform v)?> then\n            change y by (1)\n            if <touching (platform v)?> then\n                change y by (1)\n                if <touching (platform v)?> then\n                    change y by (1)\n                    if <touching (platform v)?> then\n                        change y by (1)\n                        if <touching (platform v)?> then\n                            change x by ((X vel) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                if <(X vel) > [0]> then\n                                    set [x vel v] to [-5]\n                                else\n                                    set [x vel v] to [5]\n                                end\n                                set [y vel v] to [10]\n                            else\n                                set [x vel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y vel v] by (-1)\n    change y by (Y vel)\n    if <touching (platform v)?> then\n        change y by ((Y vel) * (-1))\n        set [y vel v] to [0]\n    end\n    change y by (-1)\n    if <touching (platform v)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y vel v] to [10]\n        end\n    end\n    change y by (1)\nend\n\nwhen flag clicked\ngo to x: (-200) y: (-150)\n\nwhen [r v] key pressed\ngo to x: (-200) y: (-150)\n\nwhen flag clicked\nforever\n    if <touching (kill part v)?> then\n        broadcast (Death v)\n        go to x: (-200) y: (-150)\n    else\n        if <touching (moving kill part v)?> then\n            broadcast (Death v)\n            go to x: (-200) y: (-150)\n        else\n            if <(y position) < [-178]> then\n                broadcast (Death v)\n                go to x: (-200) y: (-150)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [#️⃣ v] to [1]\nset [☠️ v] to [0]\n\nif <(#️⃣) = [1]> then\n\nwhen flag clicked\nforever\n    if <(x position) > [235]> then\n        broadcast (Next Level v)\n        change [#️⃣ v] by (1)\n    end\nend\n\nwhen I receive [next level v]\ngo to x: (-200) y: (-150)\n\nwhen flag clicked\nforever\n    play sound [230 Yusuf Alev - Yoros v] until done\n    play sound [Summertime v] until done\nend\n\nwhen flag clicked\nforever\n    if <touching (wall v)?> then\n        change x by ((X vel) * (-1))\n    end\nend\n\nwhen flag clicked\nset [timer v] to [0]\nwait until <<key (up arrow v) pressed?> or <<<key (up arrow v) pressed?> or <<key (down arrow v) pressed?> or <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>>>> or <<key (w v) pressed?> or <<key (a v) pressed?> or <<key (s v) pressed?> or <key (d v) pressed?>>>>>>\nforever\n    repeat until <(#️⃣) = [7]>\n        wait (0.1) seconds\n        change [timer v] by (0.1)\n    end\nend\n\nwhen flag clicked\nset [x vel v] to [0]\nset [y vel v] to [0]\n\nwhen [t v] key pressed\nshow variable [☁ world record time v]\nwait until <not <key (t v) pressed?>>\nwait until <key (t v) pressed?>\nhide variable [☁ world record time v]\n\nwhen I receive [next level v]\n\n\nwhen backdrop switches to [level 7 v]\nif <(Timer) < (☁ World record time)> then\n    set [☁ world record time v] to (Timer)\n    say [CONGRATS U GOT THE WORLD RECORD] for (2) seconds\nend\nstop [this script v]\n\n@Kill part\n\nwhen flag clicked\nswitch costume to (join [Level ] (#️⃣))\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen I receive [next level v]\nswitch costume to (join [Level ] (#️⃣))\n\n@Moving kill part\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (join [Level ] (#️⃣))\n\nwhen I receive [next level v]\nswitch costume to (join [Level ] (#️⃣))\n\nwhen I receive [next level v]\nforever\n    if <(#️⃣) = [5]> then\n        repeat (10)\n            wait (0.1) seconds\n            change y by (-40)\n        end\n        repeat (10)\n            wait (0.1) seconds\n            change y by (40)\n        end\n    end\nend\n\n@Platform\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nswitch costume to (join [Level ] (#️⃣))\n\nwhen I receive [next level v]\nswitch costume to (join [Level ] (#️⃣))\n\nwhen I receive [troll part v]\nif <(costume [name v]) = [Level 4]> then\n    switch costume to (level 4 part 2 v)\nelse\n    if <(costume [name v]) = [Level 4 Part 2]> then\n        switch costume to (level 4 part 3 v)\n    else\n        if <(costume [name v]) = [Level 4 Part 3]> then\n            switch costume to (level 4 part 4 v)\n        end\n    end\nend\n\n@Kill animation\n\nwhen flag clicked\nhide\n\nwhen I receive [death v]\nchange [☠️ v] by (1)\nshow\ngo to x: (0) y: (0)\nswitch costume to (troll-face-creepy-smile v)\nset size to (100) %\nrepeat (30)\n    next costume\nend\nhide\n\nwhen I receive [next level v]\nif <(#️⃣) = [7]> then\n    set size to (100) %\n    show\n    switch costume to (troll-face-creepy-smile v)\n    repeat (30)\n        change size by (10)\n        next costume\n    end\n    hide\nend\n\n@Senser block\n\nwhen flag clicked\nforever\n    if <touching (box person v)?> then\n        broadcast (Troll part v)\n    end\nend\n\nwhen I receive [next level v]\nswitch costume to (join [Level ] (#️⃣))\n\nwhen flag clicked\nswitch costume to (join [Level ] (#️⃣))\nset [ghost v] effect to (100)\n\nwhen I receive [troll part v]\nif <(costume [name v]) = [Level 4]> then\n    switch costume to (level 4 part 2 v)\nelse\n    if <(costume [name v]) = [Level 4 Part 2]> then\n        switch costume to (level 4 part 3 v)\n    end\nend\n\n@Fake Moving kill part\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (join [Level ] (#️⃣))\n\nwhen I receive [next level v]\nswitch costume to (join [Level ] (#️⃣))\n\nwhen I receive [next level v]\nforever\n    if <(#️⃣) = [5]> then\n        repeat (10)\n            wait (0.1) seconds\n            change y by (-40)\n        end\n        repeat (10)\n            wait (0.1) seconds\n            change y by (40)\n        end\n    end\nend\n\n@Wall\n\nwhen I receive [next level v]\nswitch costume to (join [Level ] (#️⃣))\n\nwhen flag clicked\nswitch costume to (join [Level ] (#️⃣))\n\n@Ending thing\n\n