AMONG US PLATFORMER

Instructions: W A S D or <  ^  >\nAvoid IMPOSTER SPIKES and try to get to the cafeteria\nto get in the safe zone\nIf you get stuck press r to restart the level \nPress q and p at the same time to restart the whole game\n❤️ & ⭐ please! A lot of time spent on this game✨

@Stage\n\nwhen flag clicked\n\nset volume to (100) %\n\n@Trampoline\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [fineshed v]\nnext costume\n\nwhen flag clicked\nhide\n\nwhen I receive [start the game v]\nshow\n\nwhen I receive [restart all levels v]\nswitch costume to (costume1 v)\n\n@Goal\n\nwhen I receive [game over v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [start the game v]\nshow\n\n@D A N G E R\n\nwhen flag clicked\nforever\n    if <<key (q v) pressed?> and <key (p v) pressed?>> then\n        broadcast (RESTART ALL LEVELS v)\n        switch costume to (level 1 v)\n    end\nend\n\nwhen flag clicked\nswitch costume to (level 1 v)\n\nwhen I receive [fineshed v]\nnext costume\n\nwhen flag clicked\nhide\n\nwhen I receive [start the game v]\nshow\n\n@Ground\n\nwhen flag clicked\nshow\nswitch costume to (level 1 v)\n\nwhen I receive [fineshed v]\nnext costume\n\nwhen flag clicked\ngo to x: (3) y: (-174)\nhide\n\nwhen flag clicked\n\nstop [all v]\n\nwhen flag clicked\nforever\n    if <<key (q v) pressed?> and <key (p v) pressed?>> then\n        broadcast (RESTART ALL LEVELS v)\n        switch costume to (level 1 v)\n    end\nend\n\nforever\n\nwhen backdrop switches to [backdrop2 v]\nswitch costume to (finished v)\nbroadcast (Game over v)\n\nwhen I receive [start the game v]\nshow\n\nwhen I receive [start the game v]\nreset timer\n\nwhen I receive [fineshed v]\nchange [tt v] by (1)\nwait until <(TT) = [10]>\nswitch backdrop to (among_us_cafeteria_scenario_lowpoly_3d_model_c4d_max_obj_fbx_ma_lwo_3ds_3dm_stl_3343607_o v)\n\nwhen flag clicked\nset [tt v] to [0]\nswitch backdrop to (backdrop1 v)\n\n@P.L.A.Y.E.R\n\nwhen flag clicked\nforever\n    if <<key (q v) pressed?> and <key (p v) pressed?>> then\n        broadcast (RESTART ALL LEVELS v)\n        switch costume to (level 1 v)\n        switch costume to (idle \(1\) v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (q v) pressed?> and <key (p v) pressed?>> then\n        broadcast (RESTART ALL LEVELS v)\n        switch costume to (level 1 v)\n        switch costume to (idle \(1\) v)\n    end\nend\n\nwhen flag clicked\nset [y-velocity v] to [0]\nset [x-velocity v] to [0]\nforever\n    Platform [11.5] [-2] [0.7] [3]\nend\n\ndefine Platform (jump height) (gravity) (friction) (running speed)\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n    point in direction (90)\n    change [x-velocity v] by (running speed)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    point in direction (-90)\n    change [x-velocity v] by ((running speed) * (-1))\nend\nset [x-velocity v] to ((X-velocity) * (friction))\nchange x by (X-velocity)\nif <touching (ground v)?> then\n    set [sprite2: slope v] to [0]\n    repeat until <<(Sprite2: Slope) = [8]> or <not <touching (ground v)?>>>\n        change [sprite2: slope v] by (1)\n        change y by (1)\n    end\nend\nif <touching (ground v)?> then\n    change y by ((Sprite2: Slope) * (-1))\n    repeat ([ceiling v] of ([abs v] of (X-velocity) ) )\n        if <touching (ground v)?> then\n            change x by ((([abs v] of (X-velocity) ) / (X-velocity)) * (-1))\n        end\n    end\n    set [x-velocity v] to [0]\nend\nchange y by (Y-velocity)\nif <touching (ground v)?> then\n    repeat ([ceiling v] of ([abs v] of (Y-velocity) ) )\n        if <touching (ground v)?> then\n            change y by ((([abs v] of (Y-velocity) ) / (Y-velocity)) * (-1))\n        end\n    end\n    if <<(([abs v] of (Y-velocity) ) / (Y-velocity)) = [-1]> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n        switch costume to (up left v)\n        set [y-velocity v] to (jump height)\n    else\n        set [y-velocity v] to [0]\n    end\nelse\n    if <touching (trampoline v)?> then\n        set [y-velocity v] to [20]\n    end\n    change [y-velocity v] by (-1)\nend\n\nswitch costume to (right v)\n\nwhen flag clicked\ngo to x: (-208) y: (-79)\nswitch costume to (idle \(1\) v)\n\nwhen flag clicked\nforever\n    if <touching (d a n g e r v)?> then\n        repeat (10)\n            switch costume to (dead v)\n        end\n        change x by (-5)\n        go to x: (-208) y: (-79)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (goal v)?> then\n        go to x: (-208) y: (-79)\n        broadcast (Fineshed v)\n        switch costume to (idle \(1\) v)\n    end\nend\n\nwhen [space v] key pressed\nswitch costume to (red v)\nforever\n    wait (0.5) seconds\n    change [color v] effect by (25)\nend\n\nwhen [r v] key pressed\ngo to x: (-200) y: (-79)\n\nwhen I receive [fineshed v]\nset [x-velocity v] to [0]\nset [y-velocity v] to [0]\n\nwhen flag clicked\nset size to (50) %\n\nwhen flag clicked\nwait (2) seconds\nset volume to (100) %\nrepeat (99)\n    play sound [The Among Us Soundtrack #1 \(Menu Music\) \(320 kbps\) v] until done\nend\n\nwhen I receive [start the game v]\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [restart all levels v]\ngo to x: (-208) y: (-79)\n\nwhen I receive [start the game v]\nswitch costume to (idle \(1\) v)\n\nswitch costume to (left v)\n\nwhen flag clicked\nforever\n    if <<key (left arrow v) pressed?> or <<key (right arrow v) pressed?> or <<key (a v) pressed?> or <key (d v) pressed?>>>> then\n        switch costume to (walk \(1\) v)\n        wait (.1) seconds\n        switch costume to (walk2 \(1\) v)\n        wait (.1) seconds\n        switch costume to (walk3 \(1\) v)\n        wait (.1) seconds\n        switch costume to (walk4 \(1\) v)\n        wait (.1) seconds\n        switch costume to (walk5 \(1\) v)\n        wait (.1) seconds\n        switch costume to (walk6 v)\n        wait (.1) seconds\n        switch costume to (walk7 v)\n        wait (.1) seconds\n        switch costume to (walk8 \(1\) v)\n        wait (.1) seconds\n        switch costume to (walk9 \(1\) v)\n        wait (.1) seconds\n        if <touching (d a n g e r v)?> then\n            switch costume to (dead v)\n        end\n    else\n        switch costume to (idle \(1\) v)\n    end\nend\n\nwait (1) seconds\n\n\n\nwhen [2 v] key pressed\nforever\n    change [color v] effect by (2)\nend\n\nwhen [1 v] key pressed\nchange [color v] effect by (20)\n\nwhen flag clicked\nforever\n    repeat until <not <touching (d a n g e r v)?>>\n        if <touching (d a n g e r v)?> then\n            switch costume to (dead v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    repeat until <not <<key (a v) pressed?> or <<key (d v) pressed?> or <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>>>>>\n        if <<key (a v) pressed?> or <<key (d v) pressed?> or <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>>>> then\n            play sound [The among us walking sound effect2 v] until done\n        end\n    end\nend\n\nchange volume by (60)\n\n@Love fave\n\nwhen flag clicked\nset [costume v] to [0]\nhide\nforever\n    if <not <<(LOVED__) = [1]> and <(FAVED___) = [1]>>> then\n        wait (pick random (30) to (40)) seconds\n        switch costume to (costume1 v)\n        go to x: (0) y: (50)\n        show\n        go to [front v] layer\n        start sound [pop v]\n        repeat (9)\n            change y by (-6)\n        end\n        repeat (5)\n            change y by (3)\n        end\n        repeat (5)\n            change y by (-1)\n        end\n        wait (2) seconds\n        repeat (15)\n            change y by (7)\n        end\n        hide\n    end\n    if <(Costume) > [0]> then\n        hide\n        stop [this script v]\n    end\nend\n\n@Sprite2\n\n@Thumbnail\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\nwait (2) seconds\nswitch costume to (costume2 v)\n\nwhen I receive [done loading v]\nhide\nbroadcast (Show Menu v)\n\nwhen I receive [loading screen v]\nshow\n\nwhen I receive [done loading 2 v]\nhide\n\n@Sprite3\n\nwhen flag clicked\ngo to x: (29) y: (35)\nswitch costume to (costume1 v)\nhide\nwait (2) seconds\nbroadcast (Start loading v)\nshow\nforever\n    wait (.5) seconds\n    switch costume to (costume2 v)\n    wait (.5) seconds\n    switch costume to (costume3 v)\n    wait (.5) seconds\n    switch costume to (costume1 v)\nend\n\nwhen I receive [done loading v]\nchange [bpggi v] by (5)\nhide\n\nwhen I receive [start loading v]\nwait (pick random (8) to (15)) seconds\nbroadcast (done loading v)\nshow\n\nwhen I receive [loading screen v]\nwait (.2) seconds\nshow\nwait (pick random (8) to (15)) seconds\nbroadcast (done loading 2 v)\n\nwhen I receive [done loading 2 v]\nhide\n\nwhen flag clicked\nset [bpggi v] to [0]\n\n@Sprite4\n\nwhen I receive [start loading v]\nset [color v] effect to (0)\nshow\nforever\n    go to x: (-257) y: (-41)\n    glide (2) secs to x: (284) y: (-41)\n    set [color v] effect to ((pick random (1) to (7)) * (25))\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [done loading v]\nhide\n\nwhen I receive [loading screen v]\nset [color v] effect to (0)\nwait (.2) seconds\nshow\nforever\n    go to x: (-258) y: (-41)\n    glide (2) secs to x: (283) y: (-41)\nend\n\nwhen I receive [done loading 2 v]\nhide\nbroadcast (Start the game v)\n\nwhen I receive [start loading v]\nswitch costume to (walk v)\nforever\n    wait (.1) seconds\n    next costume\nend\n\nwhen I receive [loading screen v]\nswitch costume to (walk v)\nforever\n    wait (.1) seconds\n    next costume\nend\n\ndelete this clone\n\nswitch costume to (walk v)\n\nwhen I start as a clone\ndelete this clone\n\n@Thanks\n\nwhen I receive [thanks v]\nbroadcast (cool look v)\nbroadcast (Change fit v)\n\nwhen I start as a clone\ngo to x: (0) y: (-50)\nshow\ngo to [front v] layer\nrepeat (12)\n    change y by (-9)\nend\nrepeat (5)\n    change y by (3)\nend\nrepeat (5)\n    change y by (-1)\nend\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (50)\n        if <(costume [number v]) = [2]> then\n            if <mouse down?> then\n                set [costume v] to [2]\n                repeat (25)\n                    change y by (10)\n                end\n                hide\n                delete this clone\n            end\n        else\n            if <(costume [number v]) = [3]> then\n                if <mouse down?> then\n                    set [costume v] to [1]\n                    repeat (25)\n                        change y by (15)\n                    end\n                    hide\n                    delete this clone\n                end\n            end\n        end\n    else\n        set [ghost v] effect to (0)\n    end\n    if <(Costume) > [0.99]> then\n        repeat (25)\n            change y by (15)\n        end\n        hide\n        delete this clone\n    end\n    hide\n    delete this clone\nend\n\nwhen flag clicked\nhide\nset [costume v] to [0.9]\nbroadcast (begin v)\n\nwhen I receive [begin v]\nset [costume v] to [0.9]\nwait (0.1) seconds\nset [costume v] to [0.9]\nwait (0.2) seconds\nset [costume v] to [0.9]\n\n@Detector\n\nwhen flag clicked\nhide\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nbroadcast (Thanks v)\n\ngo to x: (0) y: (0)\nshow\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\n@Menu\n\nwhen flag clicked\nswitch costume to (costume2 v)\nhide\n\nwhen I receive [show menu v]\nshow\n\nwhen I receive [loading screen v]\nwait (.2) seconds\nhide\n\nforever\n    wait (.) seconds\n    next costume\nend\n\n@Sprite5\n\nwhen I receive [show menu v]\nforever\n    if <not <touching (mouse-pointer v)?>> then\n        switch costume to (normal v)\n    end\nend\n\nset size to (60) %\n\nwhen I receive [show menu v]\nshow\n\nwhen I receive [show menu v]\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (hovered over v)\n    else\n        switch costume to (normal v)\n        set size to (60) %\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Loading screen v)\n\nwhen I receive [loading screen v]\nwait (.2) seconds\nhide\n\nwhen this sprite clicked\nchange [color v] effect by (25)\nswitch costume to (clicked v)\nwait (.2) seconds\nswitch costume to (clicked2 v)\nhide\n\nset size to (60) %\n\nset size to (70) %\n\nwait (.2) seconds\n\nwhen flag clicked\nhide\n\nwhen flag clicked\npoint in direction (90)\ngo to x: (20) y: (68)\n\n@Sprite6\n\nwhen I receive [show menu v]\nshow\nforever\n    glide (3) secs to x: (-111) y: (28)\n    go to x: (36) y: (28)\n    glide (3) secs to x: (-111) y: (28)\n    go to x: (36) y: (28)\nend\n\nwhen flag clicked\nforever\n    wait (3) seconds\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\ngo to x: (36) y: (28)\nhide\n\nwhen I start as a clone\nforever\n    glide (3) secs to x: (-120) y: (28)\n    go to x: (36) y: (28)\n    glide (3) secs to x: (-120) y: (28)\n    go to x: (36) y: (28)\n    delete this clone\nend\n\nglide (3) secs to x: (-111) y: (28)\n\nwhen I receive [loading screen v]\nhide\n\n@Sprite1\n\nwhen I receive [show menu v]\nshow\nrepeat (4)\n    glide (3) secs to x: (100) y: (28)\n    glide (3) secs to x: (-10) y: (28)\nend\nglide (3) secs to x: (27) y: (28)\n\nwhen I receive [loading screen v]\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\ngo to x: (27) y: (28)\n\n@Floaters\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen I start as a clone\nclear graphic effects\ngo to x: (-254) y: (pick random (-150) to (150))\nset [rotation v] to ((pick random (-3) to (3)) + (0.5))\nset [costumecounter v] to [1]\nset [costumestartnumber v] to (((pick random (1) to (3)) * (8)) - (7))\nset [color v] effect to ((pick random (1) to (7)) * (25))\nswitch costume to (costumestartnumber)\nshow\nrepeat until <(x position) > [-230]>\n    change [costumecounter v] by (1)\n    if <(costumecounter) = [8]> then\n        switch costume to (costumestartnumber)\n        set [costumecounter v] to [0]\n    else\n        next costume\n    end\n    turn right (rotation) degrees\n    change x by (3)\n    change y by (0.35)\nend\nif <<(y position) > [-50]> and <(y position) < [50]>> then\n    if <(pick random (1) to (4)) = [1]> then\n        say (item (pick random (1) to (length of [end credits v])) of [end credits v])\n        repeat until <(x position) > [75]>\n            change x by (2)\n        end\n    end\nend\nsay []\nrepeat until <(x position) > [236]>\n    change [costumecounter v] by (1)\n    if <(costumecounter) = [8]> then\n        switch costume to (costumestartnumber)\n        set [costumecounter v] to [0]\n    else\n        next costume\n    end\n    turn right (rotation) degrees\n    change x by (2)\n    change y by (0.35)\nend\ndelete this clone\n\ngo [backward v] (20) layers\n\nbroadcast (begin v)\n\nwhen I receive [loading screen v]\nhide\ndelete this clone\n\nwait (1) seconds\n\n\n    wait (0.7) seconds\nend\n\nthink [Hmm...] for (2) seconds\n\nchange [costumecounter v] by (1)\nif <(costumecounter) = [8]> then\n    switch costume to (costumestartnumber)\n    set [costumecounter v] to [0]\nelse\n    next costume\nend\n\nturn right (rotation) degrees\n\nchange y by (0.5)\n\ndelete this clone\n\nwhen I receive [start loading v]\nhide\ndelete this clone\n\nwhen I receive [show menu v]\nwait (.) seconds\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\nwait (2) seconds\ncreate clone of (_myself_ v)\nwait (2) seconds\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\nwait (2) seconds\ncreate clone of (_myself_ v)\nwait (2) seconds\ncreate clone of (_myself_ v)\nwait (1) seconds\n\nend\n\nwhen I receive [start loading v]\nhide\n\nwhen I receive [loading screen v]\nhide\n\nwhen I receive [loading screen v]\nstop [other scripts in sprite v]\n\nset [color v] effect to ((pick random (1) to (7)) * (25))\n\n