Among Us Platformer (MOBILE FRIENDLY)

Instructions: Use arrow keys to move ( and WASD)\nTo change your color click yourself (or space)\nඞ\n\n\n(MINOR LAG WARNING) (Normally when yu wall jump)\n\n\n\nUpdates:\n10/2/2020 Cat hat crewmate avatars \n10/4/2020 Added dark purple and green avatars\n10/6/2020 Added Party and Cowboy hat avatars\n10/10/2020 Flower and Plant hatted avatars \n10/17/2020 I fly through da backdrop \n10/17/2020 added ghost and mini crewmate avatars\n10/22/2020 Polus lava at end of lvl 2\n10/24/2020 Witch hatted avatars\n10/27/2020 Lil notice button\n10/30/2020 I covered more grass with black\n11/2/2020 Added new homescreen\n11/3/2020 Player (gametoons) and brainslug hat avatar\n11/7/2020 ADDED MUSIC! (click the headphones)\n11/20/2020 Play time and year\n11/24/2020 New suited crewmate avatars \n11/27/2020 More music + new avatars\n12/5/2020 Santa hat avatars :D\n12/12/2020 Added a new song!\n12/17/2020 tongue kill avatar\n12/29/2020 Even MORRRRRE music\n2/6/2021 Added Good To Be Alive (Cg5)\n4/24/2021 Added Red (BFTA) and dead body\nNotices: \n#1 If this gets somewhere on the front page I will FREAK\n#2 thank you all so much for 200 views!\n#3 Oml 300 views aaaaaaaaaaaaaaaaaaaaa\n#4 New https://scratch.mit.edu/projects/437590951/\n#5 800 views this is insane!\n#6 Please just view this... (My friend asked me to put it here) https://scratch.mit.edu/projects/434710055\n#6 NO ADVERTISING IN THE COMMENTS\n#7 To the Scratch team, please don't take this down! I know you hv been taking down some Among Us things with "guns" and weapons. i am pretty sure my project is safe! :D\n#8 Sorry for not updating, I've been busy with school and stuff. But if you have any ideas just tell mwe!\n#9 61 hearts and 60 stars? WOWZA\n#10 Among Us BANG! map! (Closed)\n#11 I may not update this anymore bc it constantly lags on me...\n#12 THANK YOU GUYS SM AHHHH 11/16/2022\n\nRemix Tree! :D https://scratch.mit.edu/projects/422939985/remixtree/\n\nBug Fixes: (Tell me in the comments)\n12/29/2020 Fixed turning into cyan when pressing space glitch\n4/24/2021 Fixed turning into only lime, cyan, and peach.

@Stage\n\nwhen [m v] key pressed\nif <([abs v] of (mouse x) ) < [240]> then\n    set [mouse v] to (join ((mouse x) + (SCROLL X)) (join [, ] ((mouse y) + (SCROLL Y))))\n    show variable [mouse v]\nelse\n    hide variable [mouse v]\nend\n\nwhen flag clicked\nwait (0.1) seconds\n\nwhen flag clicked\n\nwhen flag clicked\nforever\n    switch backdrop to (backdrop1 v)\n    wait (10) seconds\n    repeat (6)\n        wait (0.1) seconds\n        next backdrop\n    end\nend\n\nwhen flag clicked\nforever\n    wait (1) seconds\n    change [play time v] by (1)\nend\n\n@Splash\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide variable [collect display v]\nhide variable [time v]\nShow Buttons [Splash]\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nforever\n    repeat until <touching (mouse-pointer v)?>\n        wait (0) seconds\n    end\n    set [brightness v] effect to (10)\n    set size to (110) %\n    repeat until <not <touching (mouse-pointer v)?>>\n        if <mouse down?> then\n            set [level v] to (id)\n            if <(costume [name v]) = [Playback]> then\n                set [recorder v] to [play]\n                broadcast (Recording - Load v) and wait\n            else\n                set [recorder v] to [record]\n            end\n            broadcast (Level Chosen v)\n        end\n        wait (0) seconds\n    end\n    set [brightness v] effect to (0)\n    set size to (100) %\nend\n\nwhen I receive [level chosen v]\ndelete this clone\n\ndefine Save High Score\nshow\nif <(RECORDER) = [record]> then\n    switch costume to (level complete v)\n    if <(TIME) > [5]> then\n        if <(LEVEL) = [1]> then\n            if <(TIME) < (☁ Best #1)> then\n                set [☁ best #1 v] to (TIME)\n                switch costume to (best score v)\n                broadcast (Recording - Save  v) and wait\n            end\n        else\n            if <(LEVEL) = [2]> then\n                if <(TIME) < (☁ Best #2)> then\n                    set [☁ best #2 v] to (TIME)\n                    switch costume to (best score v)\n                    broadcast (Recording - Save  v) and wait\n                end\n            else\n                if <(LEVEL) = [3]> then\n                    if <(TIME) < (☁ Best #3)> then\n                        set [☁ best #3 v] to (TIME)\n                        switch costume to (best score v)\n                        broadcast (Recording - Save  v) and wait\n                    end\n                end\n            end\n        end\n    end\nelse\n    switch costume to (best score v)\nend\n\nwhen I receive [game won v]\nSave High Score\nShow Buttons (costume [name v])\n\ndefine Show Buttons (splash costume)\nClone Buttons\ngo to x: (0) y: (0)\nset [id v] to [0]\nswitch costume to (splash costume)\nshow variable [☁ best #1 v]\nshow variable [☁ best #2 v]\nshow variable [☁ best #3 v]\nset [recorder v] to [record]\nrepeat until <(LEVEL) > []>\n    wait (0) seconds\nend\nhide\nhide variable [☁ best #1 v]\nhide variable [☁ best #2 v]\nhide variable [☁ best #3 v]\nbroadcast (green flag v) and wait\nshow variable [collect display v]\nshow variable [time v]\nbroadcast (play game v)\n\nset [☁ best #1 v] to [99.99]\nset [☁ best #2 v] to [99.99]\nset [☁ best #3 v] to [99.99]\n\nhide variable [☁ best #1 v]\nhide variable [☁ best #2 v]\nhide variable [☁ best #3 v]\n\ndefine Clone Buttons\ngo to [front v] layer\nshow\nset [level v] to []\nClone Button [1] x: [-100]\nClone Button [2] x: [30]\nClone Button [3] x: [160]\n\ndefine Clone Button (id) x: (x)\nset [id v] to (id)\nswitch costume to (id)\ngo to x: (x) y: (-130)\ncreate clone of (_myself_ v)\nswitch costume to (playback v)\nchange y by (-34)\ncreate clone of (_myself_ v)\n\nwhen [timer v] > (0.1)\nshow\n\nwhen flag clicked\nforever\n    reset timer\nend\n\n@Joystick\n\nwhen flag clicked\nhide\nshow list [share v]\ndelete all of [share v]\nhide variable [user v]\nset [rec tick v] to []\nset [joy timer v] to [1]\nset [joy orig x v] to []\nset size to (130) %\ngo to x: (-174) y: (-116)\nswitch costume to (background v)\ncreate clone of (_myself_ v)\nswitch costume to (joystick v)\n\nwhen I receive [joystick v]\ntick\n\nwhen I receive [setup v]\ngo to [front v] layer\n\nwhen I receive [reset v]\ngo to [front v] layer\n\ndefine tick\nif <(RECORDER) = [play]> then\n    if <(rec tick) > []> then\n        if <(item (rec idx) of [recording v]) = (rec tick)> then\n            play (item ((rec idx) + (1)) of [recording v])\n        end\n        change [rec tick v] by (1)\n    end\nelse\n    if <<mouse down?> and <(EDITOR) < [1]>> then\n        if <(Joy Timer) > [-20]> then\n            set [ghost v] effect to (50)\n            if <(Joy Timer) > [0]> then\n                show\n            end\n        end\n        set [joy timer v] to [-20]\n        if <(Joy Orig X) = []> then\n            set [joy orig x v] to (mouse x)\n            set [joy orig y v] to (mouse y)\n            go to (mouse-pointer v)\n        end\n    else\n        change [joy timer v] by (1)\n        if <(Joy Timer) < [0]> then\n            change [ghost v] effect by (20)\n        else\n            if <(Joy Timer) = [0]> then\n                hide\n            end\n        end\n        if <not <(Joy Orig X) = []>> then\n            go to x: (Joy Orig X) y: (Joy Orig Y)\n            set [joy orig x v] to []\n        end\n    end\n    if <(costume [number v]) = [2]> then\n        set [joy x v] to [0]\n        set [joy y v] to [0]\n        if <mouse down?> then\n            go to x: (Joy Orig X) y: (Joy Orig Y)\n            point towards (mouse-pointer v)\n            set [power v] to (distance to [mouse-pointer v])\n            if <(power) > ((size) / (4))> then\n                set [power v] to ((size) / (4))\n            end\n            move (power) steps\n            if <(power) > [14]> then\n                if <<(direction) > [-60]> and <(direction) < [60]>> then\n                    set [joy y v] to [1]\n                else\n                    if <<(direction) < [-120]> or <(direction) > [120]>> then\n                        set [joy y v] to [-1]\n                    end\n                end\n                if <<(direction) > [30]> and <(direction) < [150]>> then\n                    set [joy x v] to [1]\n                else\n                    if <<(direction) > [-150]> and <(direction) < [-30]>> then\n                        set [joy x v] to [-1]\n                    end\n                end\n            else\n                set [digital dir v] to []\n            end\n        else\n            set [power v] to [0]\n            set [digital dir v] to []\n        end\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [joy y v] to [1]\n        end\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            set [joy y v] to [-1]\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            set [joy x v] to [-1]\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            set [joy x v] to [1]\n        end\n    end\n    if <(RECORDER) = [record]> then\n        if <not <<(rec x) = (Joy X)> and <(rec y) = (Joy Y)>>> then\n            record\n        end\n        change [rec tick v] by (1)\n    end\nend\n\nwhen I receive [recording - start v]\nset [rec x v] to [0]\nset [rec y v] to [0]\nset [rec tick v] to [0]\nset [rec idx v] to [1]\nset [joy x v] to [0]\nset [joy y v] to [0]\nif <(RECORDER) = [record]> then\n    delete all of [recording v]\n    hide variable [user v]\nend\n\ndefine record\nadd (rec tick) to [recording v]\nif <(Joy X) > [0]> then\n    if <(Joy Y) > [0]> then\n        add [9] to [recording v]\n    else\n        if <(Joy Y) = [0]> then\n            add [6] to [recording v]\n        else\n            add [3] to [recording v]\n        end\n    end\nelse\n    if <(Joy X) = [0]> then\n        if <(Joy Y) > [0]> then\n            add [8] to [recording v]\n        else\n            if <(Joy Y) = [0]> then\n                add [5] to [recording v]\n            else\n                add [2] to [recording v]\n            end\n        end\n    else\n        if <(Joy Y) > [0]> then\n            add [7] to [recording v]\n        else\n            if <(Joy Y) = [0]> then\n                add [4] to [recording v]\n            else\n                add [1] to [recording v]\n            end\n        end\n    end\nend\nset [rec x v] to (Joy X)\nset [rec y v] to (Joy Y)\nset [rec tick v] to [0]\n\ndefine play (a)\nif <(a) < [4]> then\n    set [joy y v] to [-1]\nelse\n    if <(a) < [7]> then\n        set [joy y v] to [0]\n    else\n        set [joy y v] to [1]\n    end\nend\nif <((a) mod (3)) = [1]> then\n    set [joy x v] to [-1]\nelse\n    if <((a) mod (3)) = [2]> then\n        set [joy x v] to [0]\n    else\n        set [joy x v] to [1]\n    end\nend\nset [rec tick v] to [0]\nchange [rec idx v] by (2)\n\nset [recorder v] to [record]\n\nset [recorder v] to [play]\n\ndefine Save Recording\nset [encode v] to []\nset [rec idx v] to [1]\nrepeat ((length of [recording v]) / (2))\n    set [i v] to (item (rec idx) of [recording v])\n    change [rec idx v] by (1)\n    repeat until <(i) < [100]>\n        set [encode v] to (join (encode) (join [99] (item (rec idx) of [recording v])))\n        change [i v] by (-99)\n    end\n    if <(length of (i)) < [2]> then\n        set [encode v] to (join (encode) [0])\n    end\n    set [encode v] to (join (encode) (join (i) (item (rec idx) of [recording v])))\n    change [rec idx v] by (1)\nend\n\nwhen I receive [recording - save  v]\nSave Recording\nreplace item ((LEVEL) * (2)) of [saves v] with (encode)\ndelete all of [share v]\nadd [Griffpatch will manually add your recording to the project soon...] to [share v]\nadd (encode) to [share v]\nhide list [share v]\nset [i v] to [1]\nset [rec idx v] to []\nrepeat until <(i) > (length of (encode))>\n    if <(length of (rec idx)) = [256]> then\n        wait (0.15) seconds\n        set [☁ snapshot v] to (rec idx)\n        set [rec idx v] to []\n    end\n    set [rec idx v] to (join (rec idx) (letter (i) of (encode)))\n    change [i v] by (1)\nend\nwait (0.15) seconds\nif <(length of (rec idx)) > [0]> then\n    set [☁ snapshot v] to (rec idx)\nend\n\ndelete all of [share v]\nadd (encode) to [share v]\nhide list [share v]\n\nwhen I receive [level chosen v]\nshow list [share v]\ndelete all of [share v]\nif <(RECORDER) = [record]> then\n    hide variable [user v]\nend\n\ndefine Load Recording\ndelete all of [recording v]\nset [encode v] to (item ((LEVEL) * (2)) of [saves v])\nset [user v] to (join [Recording by ] (item (((LEVEL) * (2)) - (1)) of [saves v]))\nshow variable [user v]\nset [i v] to [1]\nrepeat ((length of (encode)) / (3))\n    add ((0) + (join (letter (i) of (encode)) (letter ((i) + (1)) of (encode)))) to [recording v]\n    add ((0) + (letter ((i) + (2)) of (encode))) to [recording v]\n    change [i v] by (3)\nend\n\nwhen I receive [recording - load v]\ndelete all of [recording v]\nLoad Recording\n\nwhen [z v] key pressed\n\nchange [rec tick v] by (-1)\n\n@Enemies\n\ndefine move enemy <clamp?>\nset [x v] to (round ((orig x) + ((move x) * ([abs v] of (((((TICK) / (div)) + (offset)) mod (2)) - (1)) ))))\nset [y v] to (round ((orig y) + ((move y) * ([abs v] of (((((TICK) / (div)) + (offset)) mod (2)) - (1)) ))))\nPosition\nif <clamp?> then\n    if <<(visible) > [0]> and <touching (platforms v)?>> then\n        repeat (12)\n            change [y v] by (1)\n            Position\n            if <not <touching (platforms v)?>> then\n                stop [this script v]\n            end\n        end\n    end\nend\n\ndefine Position\nposition at ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine Stuck! (x) (y)\nset [distance v] to [2]\nrepeat (12)\n    set [angle v] to [0]\n    repeat (8)\n        set [x v] to ((x) + ((distance) * ([sin v] of (angle) )))\n        set [y v] to ((y) + ((distance) * ([cos v] of (angle) )))\n        Position\n        if <<(visible) > [0]> and <not <touching (platforms v)?>>> then\n            stop [this script v]\n        end\n        change [angle v] by (45)\n    end\n    change [distance v] by (2)\nend\nset [x v] to (x)\nset [y v] to (y)\nPosition\n\ndefine New Enemy (costume) at x, y: (x) (y)\ncreate clone of (_myself_ v)\nset rotation style [left-right v]\nswitch costume to (costume)\nset [type v] to [1]\nset [x v] to (x)\nset [y v] to (y)\nset [orig x v] to (x)\nset [orig y v] to (y)\n\ndefine then glide (time) secs to x: (x) y: (y)\nset [type v] to [2]\nset [orig x v] to (x)\nset [orig y v] to (y)\nset [move x v] to ((x) - (x))\nset [move y v] to ((y) - (y))\nset [div v] to ((30) * (time))\nset [offset v] to [0]\n\ndefine then rotate (time) secs\nset rotation style [all around v]\nset [type v] to [4]\nset [div v] to ((360) / ((time) * (30)))\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nhide\nset [type v] to []\nif <(LEVEL) = [1]> then\n    New Enemy [Big Green] at x, y: [159] [40]\n    then glide [2.5] secs to x: [308] y: [40]\n    New Enemy [Big Green] at x, y: [1920] [-75]\n    then glide [3] secs to x: [1741] y: [-75]\n    New Enemy [Mace] at x, y: [2632] [130]\n    then rotate [-2] secs\nelse\n    if <(LEVEL) = [2]> then\n        New Enemy [Big Green] at x, y: [1214] [358]\n        then glide [2.5] secs to x: [1342] y: [358]\n        New Enemy [Spear2] at x, y: [2391] [123]\n        then glide [1] secs to x: [2391] y: [210]\n        change [type v] by (1)\n        New Enemy [Spear2] at x, y: [2581] [123]\n        then glide [1] secs to x: [2581] y: [210]\n        change [type v] by (1)\n        set [offset v] to [1]\n        New Enemy [Spikie] at x, y: [3646] [30]\n        then rotate [-0.5] secs\n        New Enemy [Spikie] at x, y: [3846] [100]\n        then rotate [0.5] secs\n        New Enemy [Spikie] at x, y: [4046] [30]\n        then rotate [-0.5] secs\n    else\n        if <(LEVEL) = [3]> then\n            New Enemy [Blade] at x, y: [2506] [460]\n            then rotate [-0.5] secs\n            New Enemy [Blade] at x, y: [2373] [300]\n            then rotate [0.5] secs\n            New Enemy [Blade] at x, y: [2526] [110]\n            then rotate [-0.5] secs\n            New Enemy [Blade] at x, y: [2526] [-120]\n            then rotate [0.5] secs\n            New Enemy [Big Green] at x, y: [2834] [0]\n            then glide [2.5] secs to x: [2920] y: [0]\n        end\n    end\nend\n\nwhen I receive [post tick v]\nif <(type) > []> then\n    if <<(type) = [2]> or <(type) = [3]>> then\n        move enemy <(type) = [2]>\n    else\n        if <(type) = [4]> then\n            point in direction ((TICK) * (div))\n        end\n    end\n    Position\n    if <touching (player v)?> then\n        set [exit v] to [die]\n    end\nend\n\ndefine position at (x) (y)\nset size to (200) %\ngo to x: (x) y: (y)\nset size to (100) %\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    set [visible v] to [1]\nelse\n    hide\n    set [visible v] to [0]\nend\n\n@Exit\n\nwhen I receive [open portal v]\nswitch costume to (open v)\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nset [collected v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (closed v)\n    Clone at x: (2958) y: (567)\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (closed v)\n        Clone at x: (4787) y: (79)\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (closed v)\n            Clone at x: (2790) y: (173)\n        else\n            set [x v] to [-99999]\n        end\n    end\nend\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<(costume [name v]) = [Open]> and <touching (player v)?>> then\n    set [exit v] to [win]\nend\n\ndefine position (x) (y)\nset size to (200) %\ngo to x: (x) y: (y)\nset size to (100) %\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\n@Collectables\n\ndefine show total\nset [collect display v] to (join (COLLECTED) (join [ of ] (COLLECTED MAX)))\n\nClone at x: (53) y: (570)\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nif <(RECORDER) = [play]> then\n    switch costume to (dot2 v)\nelse\n    switch costume to (dot v)\nend\nset [collected v] to [0]\nset [collected max v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    Clone at x: (-49) y: (-88)\n    Clone at x: (91) y: (-30)\n    Clone at x: (234) y: (113)\n    Clone at x: (433) y: (-13)\n    Clone at x: (494) y: (28)\n    Clone at x: (555) y: (-13)\n    Clone at x: (753) y: (248)\n    Clone at x: (789) y: (316)\n    Clone at x: (1140) y: (377)\n    Clone at x: (1252) y: (362)\n    Clone at x: (1339) y: (211)\n    Clone at x: (1404) y: (74)\n    Clone at x: (1804) y: (82)\n    Clone at x: (1579) y: (-12)\n    Clone at x: (2155) y: (112)\n    Clone at x: (2301) y: (132)\n    Clone at x: (2613) y: (49)\n    Clone at x: (2791) y: (169)\n    Clone at x: (2791) y: (250)\n    Clone at x: (1010) y: (393)\nelse\n    if <(LEVEL) = [2]> then\n        Clone at x: (41) y: (35)\n        Clone at x: (274) y: (85)\n        Clone at x: (906) y: (-78)\n        Clone at x: (1095) y: (-21)\n        Clone at x: (1189) y: (363)\n        Clone at x: (1395) y: (365)\n        Clone at x: (1558) y: (389)\n        Clone at x: (1860) y: (247)\n        Clone at x: (1915) y: (461)\n        Clone at x: (2033) y: (233)\n        Clone at x: (2123) y: (460)\n        Clone at x: (2393) y: (278)\n        Clone at x: (2482) y: (229)\n        Clone at x: (2578) y: (278)\n        Clone at x: (2769) y: (214)\n        Clone at x: (2906) y: (50)\n        Clone at x: (3135) y: (10)\n        Clone at x: (3330) y: (28)\n        Clone at x: (3530) y: (28)\n        Clone at x: (3648) y: (80)\n        Clone at x: (3846) y: (28)\n        Clone at x: (4046) y: (80)\n        Clone at x: (4389) y: (30)\n        Clone at x: (4567) y: (76)\n    else\n        if <(LEVEL) = [3]> then\n            Clone at x: (-71) y: (154)\n            Clone at x: (208) y: (220)\n            Clone at x: (214) y: (384)\n            Clone at x: (53) y: (570)\n            Clone at x: (53) y: (697)\n            Clone at x: (134) y: (928)\n            Clone at x: (-61) y: (853)\n            Clone at x: (848) y: (864)\n            Clone at x: (1048) y: (874)\n            Clone at x: (1200) y: (829)\n            Clone at x: (1689) y: (905)\n            Clone at x: (1749) y: (905)\n            Clone at x: (1809) y: (905)\n            Clone at x: (2369) y: (988)\n            Clone at x: (2124) y: (704)\n            Clone at x: (2500) y: (660)\n            Clone at x: (2245) y: (927)\n            Clone at x: (2378) y: (456)\n            Clone at x: (2496) y: (303)\n            Clone at x: (2389) y: (94)\n            Clone at x: (2446) y: (202)\n            Clone at x: (2417) y: (544)\n            Clone at x: (2435) y: (388)\n            Clone at x: (2889) y: (76)\n        end\n    end\nend\nset [x v] to [-99999]\nshow total\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) (((y) + ((5) * ([sin v] of (((x) + (TICK)) * (10)) ))) - (SCROLL Y))\nif <touching (player v)?> then\n    change [collected v] by (1)\n    show total\n    if <(COLLECTED) = (COLLECTED MAX)> then\n        broadcast (Open Portal v)\n    end\n    delete this clone\nend\n\ndefine position (x) (y)\nset size to (200) %\ngo to x: (x) y: (y)\nset size to (100) %\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\n@Platforms\n\ndefine z get direction (dx) (dy)\nif <(dy) = [0]> then\n    if <(dx) > [0]> then\n        set [p dir v] to [90]\n    else\n        set [p dir v] to [-90]\n    end\nelse\n    set [p dir v] to ([atan v] of ((dx) / (dy)) )\n    if <(dy) < [0]> then\n        if <(dx) > [0]> then\n            change [p dir v] by (180)\n        else\n            if <(dx) < [0]> then\n                change [p dir v] by (-180)\n            else\n                set [p dir v] to [180]\n            end\n        end\n    end\nend\nset [p radius v] to (([sqrt v] of (((dx) * (dx)) + ((dy) * (dy))) ) / (2))\n\nwhen I receive [pre-tick v]\nif <(typ) > [0]> then\n    if <(typ) = [1]> then\n        Type 1 move ((p radius) * ([cos v] of (((TICK) * (p timer)) + (p offset)) ))\n    else\n        if <(typ) = [2]> then\n            if <(p timer) > [0]> then\n                change [p timer v] by (-1)\n                if <(p timer) = [0]> then\n                    switch costume to (tramp v)\n                end\n            else\n                position (((x) - (SCROLL X)) - (3)) (((y) - (SCROLL Y)) + (2))\n                if <touching (player v)?> then\n                    position (((x) - (SCROLL X)) + (3)) (((y) - (SCROLL Y)) + (2))\n                    if <touching (player v)?> then\n                        switch costume to (extend v)\n                        set [impulse x v] to ((p radius) * ([sin v] of (p dir) ))\n                        set [impulse y v] to ((p radius) * ([cos v] of (p dir) ))\n                        set [p timer v] to (p offset)\n                    end\n                end\n                position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n            end\n        else\n            if <(typ) = [3]> then\n                pre-tick Cloud\n            end\n        end\n    end\nend\n\ndefine reposition (x) (y)\nif <(visible) = [1]> then\n    position ((x) - (SCROLL X)) (((y) - (SCROLL Y)) + (4))\n    if <touching (player v)?> then\n        set [platform sx v] to ((x) - (x))\n        set [platform sy v] to ((y) - (y))\n        if <(p offset) < [0]> then\n            set [p offset v] to (((0) - ((TICK) * (p timer))) mod (360))\n        end\n    else\n        position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n        if <touching (player v)?> then\n            set [platform sx v] to ((x) - (x))\n            set [platform sy v] to ((y) - (y))\n        end\n    end\n    position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nend\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [post tick v]\nif <(EDITOR) > [0]> then\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        Drag ((x) - (mouse x)) ((y) - (mouse y)) orig (x) (y)\n    end\nend\n\ndefine Drag (ox) (oy) orig (x) (y)\nrepeat until <not <mouse down?>>\n    set [x v] to ((ox) + (mouse x))\n    set [y v] to ((oy) + (mouse y))\n    position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nend\nchange [origin x v] by ((x) - (x))\nchange [origin y v] by ((y) - (y))\nif <(typ) = [1]> then\n    Debug Position ((p radius) * ([sin v] of (p dir) )) ((p radius) * ([cos v] of (p dir) ))\nelse\n    Debug Position [0] [0]\nend\nshow variable [mouse v]\n\ndefine New Platform (costume) at x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [x v] to (x)\nset [y v] to (y)\nset [origin x v] to (x)\nset [origin y v] to (y)\nset [typ v] to [0]\nset [p timer v] to [0]\nswitch costume to (costume)\n\ndefine Type 1 move (dist)\nif <(p offset) < [0]> then\n    reposition (x) (y)\nelse\n    reposition ((origin x) - (round ((dist) * ([sin v] of (p dir) )))) ((origin y) - (round ((dist) * ([cos v] of (p dir) ))))\nend\n\ndefine Debug Position (ox) (oy)\nset [mouse v] to (join (costume [name v]) (join [ at x,y: ] (join ((origin x) - (ox)) (join [, ] ((origin y) - (oy))))))\n\ndefine New Glider (costume) start xy: (x) (y) to xy: (x2) (y2) time: (time)\nNew Platform (costume) at x: (x) y: (y)\nset [typ v] to [1]\nz get direction ((x2) - (x)) ((y2) - (y))\nset [p timer v] to ((360) / ((time) * (30)))\nchange [origin x v] by (round ((p radius) * ([sin v] of (p dir) )))\nchange [origin y v] by (round ((p radius) * ([cos v] of (p dir) )))\nset [p offset v] to [0]\n\ndefine New Trampoline xy: (x) (y) power (sy)\nNew Platform [tramp] at x: (x) y: (y)\nset [typ v] to [2]\nset [p dir v] to (dir)\nset [p radius v] to (sy)\nset [p offset v] to [20]\n\nchange [p timer v] by (-1)\n\ndefine pre-tick Cloud\nif <(p timer) > [0]> then\n    if <(y) > ((origin y) - (10))> then\n        reposition (x) ((y) - (1))\n        change [ghost v] effect by (8)\n    else\n        if <(p timer) = (p offset)> then\n            switch costume to (blank v)\n        end\n        change [p timer v] by (-1)\n        if <(p timer) = [0]> then\n            switch costume to (p radius)\n            if <touching (player v)?> then\n                switch costume to (blank v)\n                set [p timer v] to [1]\n            end\n        end\n    end\nelse\n    position ((x) - (SCROLL X)) (((y) - (SCROLL Y)) + (3))\n    if <touching (player v)?> then\n        set [p timer v] to (p offset)\n    else\n        if <(y) < (origin y)> then\n            reposition (x) ((y) + (1))\n            change [ghost v] effect by (-8)\n        end\n    end\n    position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nend\n\ndefine New Temporary Platform (costume) at x: (x) y: (y) wait (seconds)\nNew Platform (costume) at x: (x) y: (y)\nset [typ v] to [3]\nset [p offset v] to (seconds)\nset [p radius v] to (costume [name v])\n\ndefine ... wait for touching\nset [p offset v] to [-1]\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\nset size to (150) %\ngo to x: (x) y: (y)\nset size to (100) %\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nclear graphic effects\nset [typ v] to [-1]\nset [visible v] to [0]\nset [p timer v] to [0]\nset [visible v] to [1]\nset [x v] to [-99999]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    New Platform [Test] at x: [0] y: [0]\n    New Platform [Test2] at x: [480] y: [0]\n    New Platform [Test3] at x: [960] y: [0]\n    New Trampoline xy: [721] [115] power [28]\n    New Platform [Floating Island] at x: [897] y: [264]\n    New Platform [Floating Island] at x: [1138] y: [325]\n    New Glider [Lift1] start xy: [1253] [333] to xy: [1453] [-30] time: [5]\n    ... wait for touching\n    New Platform [Test4] at x: [1711] y: [0]\n    New Platform [Test5] at x: [2191] y: [0]\n    New Platform [Test6] at x: [2671] y: [0]\n    New Platform [Test7] at x: [2671] y: [360]\n    New Platform [Test8] at x: [3151] y: [360]\n    New Platform [Test9] at x: [3151] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        New Platform [level 2 1] at x: [0] y: [0]\n        New Glider [Floating Island] start xy: [270] [40] to xy: [270] [280] time: [2.5]\n        ... wait for touching\n        New Platform [Test10] at x: [630] y: [360]\n        New Platform [Test11] at x: [630] y: [0]\n        New Platform [Test12] at x: [1110] y: [0]\n        New Platform [Test13] at x: [1110] y: [360]\n        New Trampoline xy: [1101] [-79] power [41]\n        New Glider [Test16] start xy: [1987] [300] to xy: [1929] [300] time: [2.2]\n        ... wait for touching\n        New Platform [Test14] at x: [1590] y: [360]\n        New Platform [Test15] at x: [1958] y: [367]\n        New Platform [Test17] at x: [1590] y: [80]\n        New Platform [Test17] at x: [2070] y: [80]\n        New Platform [Test17] at x: [1992] y: [600]\n        New Platform [Test18] at x: [2406] y: [196]\n        New Platform [Test19] at x: [2886] y: [196]\n        New Platform [Test20] at x: [2886] y: [0]\n        New Glider [Whale] start xy: [3360] [-170] to xy: [4200] [-170] time: [10]\n        ... wait for touching\n        New Platform [Test21] at x: [4600] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            New Platform [level 3 1] at x: [0] y: [0]\n            New Temporary Platform [Cloud] at x: [-70] y: [100] wait [45]\n            New Platform [level 3 2] at x: [136] y: [296]\n            New Platform [level 3 2] at x: [136] y: [640]\n            New Platform [level 3 3] at x: [136] y: [860]\n            New Glider [Lift1] start xy: [-63] [812] to xy: [500] [812] time: [7]\n            ... wait for touching\n            New Platform [Floating Island] at x: [645] y: [811]\n            New Temporary Platform [Cloud] at x: [850] y: [800] wait [45]\n            New Temporary Platform [Cloud] at x: [1050] y: [820] wait [45]\n            New Temporary Platform [Cloud] at x: [1200] y: [770] wait [45]\n            New Platform [level 3 4] at x: [1580] y: [675]\n            New Platform [level 3 5] at x: [2000] y: [750]\n            New Platform [level 3 6] at x: [2566] y: [943]\n            New Platform [level 3 9] at x: [2895] y: [1137]\n            New Glider [Wide Lift] start xy: [2428] [617] to xy: [2428] [-150] time: [28]\n            ... wait for touching\n            New Platform [level 3 7] at x: [2260] y: [448]\n            New Platform [level 3 8] at x: [2260] y: [88]\n            New Platform [level 3 8] at x: [2613] y: [762]\n            New Platform [level 3 8] at x: [2613] y: [402]\n            New Platform [level 3 10] at x: [2820] y: [0]\n            New Temporary Platform [Cloud] at x: [3125] y: [30] wait [45]\n            New Temporary Platform [Cloud] at x: [3207] y: [112] wait [45]\n            New Temporary Platform [Cloud] at x: [3100] y: [190] wait [45]\n            New Temporary Platform [Cloud] at x: [2930] y: [200] wait [45]\n        end\n    end\nend\n\n@Danger\n\ndefine New Platform (costume) at x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [x v] to (x)\nset [y v] to (y)\nswitch costume to (costume)\n\nwhen I receive [post tick v]\nif <(EDITOR) > [0]> then\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        Drag ((x) - (mouse x)) ((y) - (mouse y)) orig (x) (y)\n    end\nend\n\ndefine Drag (ox) (oy) orig (x) (y)\nrepeat until <not <mouse down?>>\n    set [x v] to ((ox) + (mouse x))\n    set [y v] to ((oy) + (mouse y))\n    position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nend\nDebug Position [0] [0]\nshow variable [mouse v]\n\ndefine Debug Position (ox) (oy)\nset [mouse v] to (join (costume [name v]) (join [ at x,y: ] (join ((x) - (ox)) (join [, ] ((y) - (oy))))))\n\nNew Platform [Spike1] at x: [2319] y: [954]\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine position (x) (y)\nset size to (200) %\ngo to x: (x) y: (y)\nset size to (100) %\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nhide\nset [x v] to [-99999]\nif <(LEVEL) = [1]> then\n    New Platform [Test4] at x: [1927] y: [139]\n    New Platform [Test5] at x: [2191] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        New Platform [Test11] at x: [459] y: [-16]\n        New Platform [Test10] at x: [630] y: [360]\n        New Platform [Test14] at x: [1486] y: [223]\n        New Platform [Test21] at x: [4600] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            New Platform [Test4] at x: [-89] y: [-109]\n            New Platform [Spike1] at x: [1958] y: [904]\n            New Platform [Spike1] at x: [2318] y: [948]\n            New Platform [Spike1] at x: [2722] y: [-30]\n            New Platform [Test4] at x: [1738] y: [845]\n            New Platform [Spears] at x: [2389] y: [726]\n            New Platform [Spike2] at x: [1860] y: [866]\n        end\n    end\nend\n\n@Player\n\ndefine Show Time\nset [time v] to ((round (time100)) / (100))\nif <(letter ((length of (TIME)) - (1)) of (TIME)) = [.]> then\n    set [time v] to (join (TIME) [0])\nelse\n    if <not <(letter ((length of (TIME)) - (2)) of (TIME)) = [.]>> then\n        set [time v] to (join (TIME) [.00])\n    end\nend\n\nwhen I receive [green flag v]\nhide\npoint in direction (-90)\ngo to [front v] layer\nset [debug v] to [0]\n\nwhen I receive [play game v]\nset [resettime v] to [0]\nforever\n    broadcast (reset v) and wait\n    set [tick v] to [0]\n    set [time100 v] to (resetTime)\n    set [state v] to []\n    Game On\n    broadcast (setup v) and wait\n    broadcast (tick v) and wait\n    broadcast (Recording - start v) and wait\n    show\n    repeat until <(EXIT) > []>\n        change [tick v] by (1)\n        if <(state) > []> then\n            change [time100 v] by (3.33333)\n        end\n        Show Time\n        if <(debug) > [0]> then\n            wait until <key (space v) pressed?>\n            wait until <not <key (space v) pressed?>>\n        end\n        broadcast (Joystick v)\n        broadcast (begin loop v)\n        broadcast (pre-tick v)\n        broadcast (local tick v)\n        broadcast (tick v)\n        broadcast (post tick v)\n        wait (0) seconds\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\nbroadcast (post tick v) and wait\n\ndefine Game On\nset [x v] to [-200]\nset [y v] to [0]\n\n    set [x v] to [1656]\n    set [y v] to [850]\nend\nset [scroll x v] to (x)\nset [scroll y v] to (y)\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [impulse y v] to []\nset size to (100) %\nset [ghost v] effect to (0)\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Tick\nif <(IMPULSE Y) > []> then\n    Touching Platform: out (1)\nend\nHandle Platforms (x) (y)\nif <(EXIT) > []> then\n    stop [this script v]\nend\nif <(IMPULSE Y) > []> then\n    change [sx v] by (IMPULSE X)\n    change [sy v] by (IMPULSE Y)\n    set [impulse y v] to []\n    set [in air v] to [10]\nelse\n    if <([joy y v] of [joystick v]) > [0]> then\n        if <<(in air) < [2]> or <<(sy) > [8]> and <(in air) < [4]>>> then\n            set [sy v] to [15]\n        end\n    end\nend\nchange [sy v] by (-2)\nif <(sy) < [-24]> then\n    set [sy v] to [-24]\nend\nChange Player y by (sy)\nset [sx v] to (((sx) * (0.8)) + ((PLATFORM SX) * (0.2)))\nif <([joy x v] of [joystick v]) < [0]> then\n    change [sx v] by (-2)\n    set [state v] to [1]\nend\nif <([joy x v] of [joystick v]) > [0]> then\n    change [sx v] by (2)\n    set [state v] to [1]\nend\nif <([abs v] of ((sx) - (PLATFORM SX)) ) > [1.5]> then\n    Change Player x by (round (sx))\nelse\n    Change Player x by (round (PLATFORM SX))\nend\nif <(x) < [-230]> then\n    set [x v] to [-230]\nend\nPosition\nTest - Die\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\n    if <<([joy y v] of [joystick v]) > [0]> and <(in air) > [6]>> then\n        change y by (2)\n        if <touching (platforms v)?> then\n            set [sx v] to [0]\n        else\n            set [sx v] to (((sx) / ([abs v] of (sx) )) * (-18))\n            set [sy v] to [15]\n            set [in air v] to [0]\n        end\n    else\n        set [sx v] to [0]\n    end\nend\n\ndefine Game - Die\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nif <touching (platforms v)?> then\n    if <(sy) > [0]> then\n        Touching Platform: out (-1)\n    else\n        Touching Platform: out (1)\n    end\nend\n\ndefine Test - Die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\n\ndefine Touching Platform: out (out)\nchange [y v] by (out)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    change [y v] by (out)\n    Position\nend\nset [sy v] to [0]\nif <(out) > [0]> then\n    set [in air v] to [0]\nend\n\ndefine Game - Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nbroadcast (Game Won v)\n\nwhen I receive [local tick v]\nTick\nScroll Stage\n\nwhen I receive [begin loop v]\nset [platform sx v] to [0]\nset [platform sy v] to [0]\n\ndefine Handle Platforms (x) (y)\nchange [y v] by (PLATFORM SY)\nPosition\nif <touching (platforms v)?> then\n    set [distance v] to [1]\n    repeat (8)\n        set [angle v] to [0]\n        repeat (8)\n            set [x v] to (round ((x) + ((distance) * ([sin v] of (angle) ))))\n            set [y v] to (round ((y) + ((distance) * ([cos v] of (angle) ))))\n            Position\n            if <not <touching (platforms v)?>> then\n                stop [this script v]\n            end\n            change [angle v] by (45)\n        end\n        change [distance v] by (1)\n    end\n    set [x v] to (x)\n    set [y v] to (y)\n    Position\n    set [exit v] to [die]\nend\n\ndefine Scroll Stage\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <((y) - (SCROLL Y)) < [-100]> then\n    set [scroll y v] to ((y) + (100))\nend\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\n\nset [editor v] to [1]\n\nset [resettime v] to (time100)\nchange [level v] by (1)\nwait (1) seconds\n\nwhen I receive [game won v]\nstop [other scripts in sprite v]\n\nset [☁ best #1 v] to [99.99]\nset [☁ best #2 v] to [99.99]\n\nset [editor v] to [0]\n\nset [recorder v] to [record]\n\nwhen [left arrow v] key pressed\npoint in direction (90)\n\nwhen [right arrow v] key pressed\npoint in direction (-90)\n\nwhen flag clicked\n\nif <(username) = [FixoAJ]> then\n    switch costume to (fixoaj v)\nelse\n    switch costume to (player5 v)\nend\n\nwhen this sprite clicked\nnext costume\nif <(costume [name v]) = [FixoAJ]> then\n    switch costume to (player5 v)\nend\nif <(costume [name v]) = [Player6]> then\n    switch costume to (player2 v)\nend\nif <(costume [name v]) = [FixoAJ]> then\n    switch costume to (fixoaj v)\nend\n\nwhen [space v] key pressed\nnext costume\n\nif <(username) = [FixoAJ]> then\n    switch costume to (fixoaj v)\nelse\n    if <(costume [name v]) = [FixoAJ]> then\n        switch costume to (fixoaj v)\n    end\nend\n\nif <(username) = [Pikaf33t]> then\n    switch costume to (fixoaj v)\nelse\n    if <(costume [name v]) = [FixoAJ]> then\n        switch costume to (player2 v)\n    end\nend\n\nwhen I receive [code1 v]\nset [codestuff v] to [1]\nswitch costume to (player6 v)\n\nwhen flag clicked\nset [codestuff v] to [0]\n\nnext costume\n\nswitch costume to (player5 v)\n\nwhen [space v] key pressed\nnext costume\n\nif  then\nelse\nend\n\nswitch costume to (fixoaj v)\nif <(username) = [Pikaf33t]> then\n    switch costume to (fixoaj v)\nelse\n    if <(costume [name v]) = [FixoAJ]> then\n        switch costume to (fixoaj v)\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nswitch costume to (among us emergency v)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nshow\nswitch costume to (among us emergency v)\nrepeat (10)\n    wait (0.0) seconds\n    next costume\nend\nwait (1) seconds\nhide\n\nwhen flag clicked\nwait (0.1) seconds\nstart sound [Emergency Meeting Sound Among us \(128 kbps\) v]\n\n@Sprite1\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [front v] layer\nshow\n\nwhen I receive [play game v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\n@Music\n\nwhen this sprite clicked\nstop all sounds\nbroadcast (music v)\nplay sound (pick random (1) to (12)) until done\n\nwhen flag clicked\nshow\nforever\n    go to [front v] layer\nend\n\nhide\n\n@Bouncing icon\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0)\nwait (0.15) seconds\nshow\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (203) y: (-144)\nchange y by (-100)\nforever\n    go to [front v] layer\n    change [ghost v] effect by (-10)\n    set [bounce_3_vel v] to (((bounce_3_vel) * (0.6)) + (((y position) - (-144)) * (-0.2)))\n    change y by (bounce_3_vel)\nend\n\nwhen [timer v] > (0)\nforever\n    wait until <touching (mouse-pointer v)?>\n    repeat (10)\n        change [brightness v] effect by (5)\n    end\n    wait until <not <touching (mouse-pointer v)?>>\n    repeat (10)\n        change [brightness v] effect by (-5)\n    end\n    clear graphic effects\nend\n\nwhen [timer v] > (0)\nforever\n    repeat until <touching (mouse-pointer v)?>\n        change size by (((size) - (100)) / (-4))\n    end\n    wait until <not <touching (mouse-pointer v)?>>\n    start sound [Rick roll v]\n    set size to (100) %\n    set [__stop_effect_size_vel v] to [20]\n    repeat (17)\n        change [__stop_effect_size_vel v] by (-2.5)\n        change size by (__stop_effect_size_vel)\n    end\nend\n\n