Scrolling Platformer Test

Instructions: Feel free to use this. \nPlay with WASD.\nThe Green and blue things are teleporters, jump into them.\nYou need to star this project to activate the teleporters, if not the teleporters will just act like normal blocks.\nThe orange thing at the end is a jump pad.\nThe Purple is ice, it lets you jump further.\nCan you find the wizard?\nCheck out: https://scratch.mit.edu/projects/537312819/

@Stage\n\nwhen flag clicked\nswitch backdrop to (2 v)\nwait until <(Stared) = [1]>\nswitch backdrop to (1 v)\n\n@Player\n\nwhen flag clicked\nforever\n    if <<<[-90] > (mouse x)> and <[-168] < (mouse x)>> and <(mouse y) = [-180]>> then\n        set [stared v] to [1]\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo to x: (7) y: (-54)\nforever\n    wait (0.3) seconds\n    wait until <not <<key (a v) pressed?> or <key (d v) pressed?>>>\nend\n\nwhen I receive [check v]\nCheck\n\ndefine Check\nif <<touching color (#ff6666)?> or <touching (enemy v)?>> then\n    set [dead v] to [1]\nelse\n    set [dead v] to [0]\nend\nif <(Stared) = [1]> then\n    if <touching color (#102fff)?> then\n        set [teleport v] to [1]\n    else\n        set [teleport v] to [0]\n    end\n    if <touching color (#98ff66)?> then\n        set [teleport 2 v] to [1]\n    else\n        set [teleport 2 v] to [0]\n    end\nelse\n    set [teleport 2 v] to [0]\n    set [teleport v] to [0]\nend\nif <touching color (#ffcf74)?> then\n    broadcast (Jump_Boost v)\nend\nif <touching color (#ff4ef9)?> then\n    set [ice v] to [1]\n    Reset Timer\nelse\n    if <<(Timer) > [1]> or <touching (level v)?>> then\n        set [ice v] to [0]\n    end\nend\nif <touching color (#ffa600)?> then\n    broadcast (Jump Boost 2 v)\nend\nif <touching color (#ff1212)?> then\n    broadcast (Die level v)\nend\nif <touching color (#5500ff)?> then\n    broadcast (End Level v)\n    broadcast (Die v)\nend\n\nwhen flag clicked\nforever\n    play sound [level2 v] until done\nend\n\nwhen I receive [end level v]\nset [final time v] to (Time)\nhide variable [time v]\nif <(Final Time) < (☁ Worlds Fastest Time)> then\n    set [☁ worlds fastest time v] to (Final Time)\nend\nshow variable [final time v]\nshow variable [☁ worlds fastest time v]\nwait (5) seconds\nhide variable [☁ worlds fastest time v]\nhide variable [final time v]\n\nwhen flag clicked\nforever\n    wait (1) seconds\n    change [timer v] by (1)\nend\n\ndefine Reset Timer\nset [timer v] to [0]\n\nset [☁ worlds fastest time v] to [1000]\n\n@Level\n\nwhen flag clicked\nhide variable [☁ worlds fastest time v]\nhide variable [final time v]\nhide variable [time v]\nswitch costume to (costume2 v)\nset size to (1000) %\nswitch costume to (costume1 v)\nset rotation style [left-right v]\ngo to x: (323) y: (-178)\nset [speedy y v] to [0]\nforever\n    set [time v] to (timer)\n    Move\n    set [level x v] to (x position)\n    set [level y v] to (y position)\n    broadcast (Check v)\n    if <(Teleport 2) = [1]> then\n        broadcast (Teleport 2 v)\n    end\n    if <(Teleport) = [1]> then\n        broadcast (Teleport v)\n    end\n    if <(Dead) = [1]> then\n        broadcast (Die v)\n    end\n    change y by (Speedy Y)\n    Fall\n    Jump\nend\n\ndefine Fall\nchange [speedy y v] by (1)\nif <touching (player v)?> then\n    set [speedy y v] to [0]\nend\nchange y by (-30)\nif <touching (player v)?> then\n    change y by (30)\nelse\n    change y by (30)\n    change y by (-1)\n    if <touching (player v)?> then\n        change y by (1)\n        repeat until <not <touching (player v)?>>\n            change y by (-1)\n        end\n    else\n        change y by (1)\n    end\nend\n\ndefine Jump\nif <<touching (player v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    set [speedy y v] to [-15]\nend\n\ndefine Move\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    if <(Ice) = [1]> then\n        repeat (13)\n            move (1) steps\n        end\n    else\n        repeat (7)\n            move (1) steps\n        end\n    end\n    change y by (-30)\n    if <touching (player v)?> then\n        repeat (14)\n            move (-1) steps\n        end\n    end\n    change y by (30)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    if <(Ice) = [1]> then\n        move (-13) steps\n    else\n        move (-7) steps\n    end\n    change y by (-30)\n    if <touching (player v)?> then\n        repeat (14)\n            move (1) steps\n        end\n    end\n    change y by (30)\nend\n\nif <touching (player v)?> then\nchange y by (30)\n\nrepeat (10)\n    move (-1) steps\nend\n\nwhen I receive [die v]\nswitch costume to (costume2 v)\nset size to (1000) %\nswitch costume to (costume1 v)\nset rotation style [left-right v]\ngo to x: (323) y: (-178)\nset [speedy y v] to [0]\n\nwhen I receive [teleport v]\ngo to x: (-648) y: (-435)\nchange [speedy y v] by (-3)\n\nwhen I receive [teleport 2 v]\ngo to x: (466) y: (-317)\nchange [speedy y v] by (-3)\n\nwhen I receive [jump_boost v]\ngo to x: (x position) y: (-302)\nset [speedy y v] to [-20]\n\nwhen I receive [jump boost 2 v]\ngo to x: (x position) y: (-163)\nset [speedy y v] to [-20]\n\nwhen [l v] key pressed\nreset timer\nshow variable [time v]\ngo to x: (2000) y: (1300)\n\nwhen I receive [die level v]\ngo to x: (2000) y: (1300)\n\n@Eye\n\nwhen flag clicked\nshow\nwait (0.03) seconds\ngo to [front v] layer\nforever\n    Eye\nend\n\ndefine Eye\ngo to x: (7) y: (-54)\npoint towards (mouse-pointer v)\nmove ((distance to [mouse-pointer v]) / (35)) steps\n\n@Thumbnail\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nwait (1) seconds\ngo to [front v] layer\n\n@Enemy\n\nwhen flag clicked\nset rotation style [left-right v]\npoint in direction (-90)\nforever\n    Lock\nend\n\ndefine Lock\nswitch costume to (costume1 v)\nswitch costume to (small v)\nset size to (1000) %\ngo to x: ((Level X) + (Enemy Move)) y: (Level Y)\nswitch costume to (enemy v)\n\nwhen flag clicked\nset [enemy move v] to [-200]\nforever\n    repeat (40)\n        change [enemy move v] by (10)\n        wait (0.03) seconds\n    end\n    repeat (40)\n        change [enemy move v] by (-10)\n        wait (0.03) seconds\n    end\nend\n\nif <touching (border v)?> then\n    set [ghost v] effect to (100)\nelse\n    set [ghost v] effect to (0)\nend\n\n@Border\n\nwhen flag clicked\nset [ghost v] effect to (100)\nswitch costume to (abby-b v)\nset size to (91) %\nswitch costume to (costume1 v)\ngo to x: (36) y: (28)\n\n