Portal Platformer v3.12
@Stage\n\nwhen I receive [green flag v]\nswitch backdrop to (tn & splash v)\n\nwhen I receive [play v]\nswitch backdrop to (play v)\n\nwhen [m v] key pressed\nif <<([abs v] of (mouse x) ) < [240]> and <(username) = [ImRohan10187]>> 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 I receive [green flag v]\nset [mouse v] to [0,0]\nhide variable [mouse v]\n\nwhen [1 v] key pressed\nif <(username) = [ImRohan10187]> then\n    if <([0 v] of [thumbnail v]) > [0]> then\n        ask [Which level do you want to skip to? <1,2,3>] and wait\n        if <<(answer) < [5]> and <not <(answer) = []>>> then\n            set [level v] to (answer)\n            broadcast (Play Game v)\n        else\n            set [level v] to (LEVEL)\n        end\n    end\nend\n\nwhen [2 v] key pressed\nif <(username) = [ImRohan10187]> then\n    if <([0 v] of [thumbnail v]) > [0]> then\n        ask [Die Free? <Y/N>] and wait\n        if <(answer) = [Y]> then\n            set [die v] to [Y]\n        end\n        if <(answer) = [N]> then\n            set [die v] to [N]\n        end\n    end\nend\n\nwhen [3 v] key pressed\nif <(username) = [ImRohan10187]> then\n    if <([0 v] of [thumbnail v]) > [0]> then\n        ask [Fast? <Y/N>] and wait\n        if <(answer) = [Y]> then\n            set [fast v] to [Y]\n        end\n        if <(answer) = [N]> then\n            set [fast v] to [N]\n        end\n    end\nend\n\n@Blank\n\n@Player\n\nwhen flag clicked\nbroadcast (Green Flag v) and wait\n\nwhen I receive [green flag v]\nset [level v] to [1]\nGreen Flag\nHandle Variables Green Flag\n\ndefine Green Flag\nhide\nswitch costume to (player v)\nset size to (100) %\ngo to x: (0) y: (0)\nset rotation style [all around v]\npoint in direction (90)\nclear graphic effects\nset [clipping glitch v] to []\nhide variable [clipping glitch v]\ndelete all of [glitch characters v]\nshow list [glitches v]\nshow list [glitch characters v]\n\ndefine Handle Variables\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [friction v] to [0.8]\nset [in air v] to [Infinity]\nset [spawn size v] to [1]\nset [state v] to []\nset [time v] to [0]\nset [exit v] to []\n\nwhen I receive [play game v]\nshow\nset [tick v] to [0]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    stop [other scripts in sprite v]\n    Game Start\n    set [time100 v] to [0]\n    repeat until <(EXIT) > []>\n        change [tick v] by (1)\n        if <(State) > []> then\n            change [time100 v] by (3.33333)\n        end\n        Timer\n        Movement\n        broadcast (Movement v) and wait\n        Spawn\n    end\n    if <(EXIT) = [Win]> then\n        Game - Win\n    else\n        Death\n    end\n    stop [other scripts in sprite v]\nend\n\ndefine Game Start\nif <(LEVEL) = [1]> then\n    Game Start at x: [-200] y: [100]\nelse\n    if <(LEVEL) = [2]> then\n        Game Start at x: [-200] y: [100]\n    else\n        if <(LEVEL) = [3]> then\n            Game Start at x: [-200] y: [100]\n        else\n            if <(LEVEL) = [4]> then\n                Game Start at x: [0] y: [100]\n            end\n        end\n    end\nend\n\ndefine Game Start at x: (x) y: (y)\nHandle Variables\nset [x v] to (x)\nset [y v] to (y)\nHide Variables\nShow Variables\nset [spawn size v] to [1]\nswitch costume to (spawn v)\nset size to (1) %\nswitch costume to (player v)\nset [ghost v] effect to (0)\nshow\n\ndefine Handle Variables Green Flag\nHandle Variables\nset [level v] to [1]\nset [comment down v] to [#PortalPlatformer]\nset [time v] to [0]\nHide Variables\n\ndefine Hide Variables\nhide variable [level v]\nhide variable [x v]\nhide variable [y v]\nhide variable [scroll x v]\nhide variable [scroll y v]\nhide variable [speed x v]\nhide variable [speed y v]\nhide variable [friction v]\nhide variable [in air v]\nhide variable [spawn size v]\nhide variable [collect display v]\nhide variable [state v]\nhide variable [time v]\nhide variable [tick v]\nhide variable [exit v]\n\ndefine Show Variables\nshow variable [collect display v]\nshow variable [time v]\n\ndefine Movement\nif <(username) = [ImRohan10187]> then\n    if <(FAST) = [Y]> then\n        Movement [3] (Friction) [12] [16] [5] [-2] [-17] [-10] [16] <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > ((x position) + (50))>>>> <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < ((x position) - (50))>>>> <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (50))>>>> [10] [50] [7] [30] <>\n    else\n        Movement [2] (Friction) [12] [16] [5] [-2] [-17] [-10] [16] <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > ((x position) + (50))>>>> <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < ((x position) - (50))>>>> <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (50))>>>> [10] [50] [7] [30] <>\n    end\nelse\n    Movement [2] (Friction) [12] [16] [5] [-2] [-17] [-10] [16] <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > ((x position) + (50))>>>> <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < ((x position) - (50))>>>> <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (50))>>>> [10] [50] [7] [30] \nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change Player y by (speed y) (trampoline jump height) (trampoline jump height for final level)\nchange [y v] by (speed y)\nPosition\nTest - Trampoline (trampoline jump height) (trampoline jump height for final level)\nchange [in air v] by (1)\nrepeat until <not <touching (platforms v)?>>\n    if <(speed y) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [speed y v] to [0]\nend\n\ndefine Change Player x by (speed x) (slope) (wall jump x) <wall jump trigger> (trampoline jump height) (trampoline jump height for final level)\nchange [x v] by (speed x)\nPosition\nTest - Trampoline (trampoline jump height) (trampoline jump height for final level)\nif <touching (platforms v)?> then\n    repeat (slope)\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 ((slope) * (-1))\n    if <wall jump trigger> then\n        if <(speed x) > [0]> then\n            set [speed x v] to (() - (wall jump x))\n        else\n            set [speed x v] to (wall jump x)\n        end\n        set [in air v] to [0]\n    else\n        set [speed x v] to [0]\n    end\n    repeat until <not <touching (platforms v)?>>\n        if <(speed x) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\nif <not <(LEVEL) = [4]>> then\n    if <(x) < [-230]> then\n        set [x v] to [-230]\n    end\nend\nif <not <(State) = [Moved]>> then\n    set [state v] to [Moved]\nend\n\ndefine Death\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\n\ndefine Spawn\nif <not <(size) = [100]>> then\n    Position\n    repeat until <(size) = [100]>\n        switch costume to (spawn v)\n        change size by (Spawn Size)\n        switch costume to (player v)\n        change [spawn size v] by (1.6)\n    end\nend\n\ndefine Test - Die <imrohan10187?>\nif <not <imrohan10187?>> then\n    if <(username) = [ImRohan10187]> then\n        if <touching (danger v)?> then\n            if <(DIE) = [N]> then\n                set [exit v] to [Die]\n            end\n        end\n    else\n        if <touching (danger v)?> then\n            set [exit v] to [Die]\n        end\n    end\nend\n\ndefine Timer\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\ndefine Game - Win\nbroadcast (Game - Win v) and wait\nset rotation style [left-right v]\nrepeat (50)\n    point towards (portal v)\n    turn right (65) degrees\n    move ((distance to [portal v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nif <(LEVEL) < [4]> then\n    change [level v] by (1)\nend\nwait (1) seconds\n\ndefine Test - Glitch? <clipping glitch?>\nif <clipping glitch?> then\n    add [CG] to [glitch characters v]\n    if <(pick random (1) to (2)) = [1]> then\n        if <(pick random (1) to (2)) = [1]> then\n            add (pick random (1) to (9)) to [glitch characters v]\n        else\n            add (join (pick random (1) to (9)) (pick random (1) to (9))) to [glitch characters v]\n        end\n    else\n        add (join (pick random (1) to (9)) (join (pick random (1) to (9)) (pick random (1) to (9)))) to [glitch characters v]\n    end\n    if <(pick random (1) to (pick random (1) to (2))) = [1]> then\n        if <(pick random (1) to (2)) = [1]> then\n            add [x] to [glitch characters v]\n        else\n            add [y] to [glitch characters v]\n        end\n    else\n        add [z] to [glitch characters v]\n    end\n    if <(pick random (1) to (2)) = [1]> then\n        add (pick random (1) to (9)) to [glitch characters v]\n    else\n        add (join (pick random (1) to (9)) (pick random (1) to (9))) to [glitch characters v]\n    end\n    add [-] to [glitch characters v]\n    if <(pick random (1) to (2)) = [1]> then\n        add (pick random (1) to (9)) to [glitch characters v]\n    else\n        add (join (pick random (1) to (9)) (pick random (1) to (9))) to [glitch characters v]\n    end\n    if <(pick random (1) to (pick random (1) to (pick random (1) to (pick random (2) to (2))))) = [1]> then\n        add [T] to [glitch characters v]\n    else\n        if <(pick random (1) to (2)) = [1]> then\n            add [E] to [glitch characters v]\n        else\n            if <(pick random (1) to (2)) = [1]> then\n                add [R] to [glitch characters v]\n            else\n                add [F] to [glitch characters v]\n            end\n        end\n    end\n    if <(pick random (1) to (2)) = [1]> then\n        add (pick random (1) to (9)) to [glitch characters v]\n    else\n        add (join (pick random (1) to (9)) (pick random (1) to (9))) to [glitch characters v]\n    end\n    set [glitch character counter v] to [0]\n    repeat (length of [glitch characters v])\n        change [glitch character counter v] by (1)\n        set [clipping glitch v] to (join (Clipping Glitch) (item (Glitch Character Counter) of [glitch characters v]))\n    end\n    broadcast (Clipping Glitch Error v) and wait\n    show variable [clipping glitch v]\n    add (join (username) (join [ ] (join [-] (join [ ] (Clipping Glitch))))) to [glitches v]\n    stop [all v]\nend\n\nwhen I receive [play game v]\nforever\n    Test - Glitch? <<<([abs v] of (x position) ) = [240]> and <(y position) < [-30]>> or <<([abs v] of (x position) ) < [201]> and <(y position) = [180]>>>\nend\n\nset [clipping glitch v] to (join (pick random (1) to (9)) (join (pick random (1) to (9)) (join (pick random (1) to (9)) (join [x] (join (pick random (1) to (9)) (join (pick random (1) to (9)) (join [-] (join (pick random (1) to (9)) (join (pick random (1) to (9)) (join [T] (pick random (1) to (9))))))))))))\n\ndefine Movement (speed) (friction) (slope) (jump height) (max in air) (gravity) (max gravity) (max scroll y) (wall jump x) <right movement trigger> <left movement trigger> <jump trigger> (scroll y delay) (trampoline jump height) (trampoline scroll y delay) (trampoline jump height for final level) <imrohan10187?>\nif <right movement trigger> then\n    change [speed x v] by (speed)\nend\nif <left movement trigger> then\n    change [speed x v] by ((speed) * (-1))\nend\nset [speed x v] to ((Speed x) * (friction))\nif <([abs v] of (Speed x) ) > [0.9]> then\n    Change Player x by (round (Speed x)) (slope) (wall jump x) <jump trigger> (trampoline jump height) (trampoline jump height for final level)\nend\nif <jump trigger> then\n    if <not <imrohan10187?>> then\n        if <(In Air) < (max in air)> then\n            set [speed y v] to (jump height)\n        end\n    else\n        set [speed y v] to (jump height)\n    end\nend\nchange [speed y v] by (gravity)\nif <(Speed y) < (max gravity)> then\n    set [speed y v] to (max gravity)\nend\nChange Player y by (Speed y) (trampoline jump height) (trampoline jump height for final level)\nset [scroll x v] to (x)\nif <not <(LEVEL) = [4]>> then\n    if <(SCROLL X) < [0]> then\n        set [scroll x v] to [0]\n    end\nend\nif <<(Speed y) = ((trampoline jump height) - ([abs v] of (gravity) ))> and <not <(LEVEL) = [4]>>> then\n    change [scroll y v] by (round (((y) - (SCROLL Y)) / (scroll y delay)))\nelse\n    change [scroll y v] by (round (((y) - (SCROLL Y)) / (trampoline scroll y delay)))\nend\nif <(SCROLL Y) < (max scroll y)> then\n    set [scroll y v] to (max scroll y)\nend\nPosition\nif <not <imrohan10187?>> then\n    if <(y) < [-180]> then\n        set [exit v] to [Die]\n    end\nend\nTest - Die <imrohan10187?>\n\ndefine Test - Trampoline (trampoline jump height) (trampoline jump height for final level)\nif <touching (trampoline v)?> then\n    if <(LEVEL) = [4]> then\n        set [speed y v] to (trampoline jump height for final level)\n    else\n        set [speed y v] to (trampoline jump height)\n    end\nend\n\nwhen I receive [game - win v]\nif <(username) = [ImRohan10187]> then\n    if <(DIE) = [N]> then\n        if <(FAST) = [N]> then\n            World Record\n        end\n    end\nelse\n    World Record\nend\n\nset [☁ world record - 1 v] to [21.90]\nset [☁ world record - 2 v] to [26.27]\nset [☁ world record - 3 v] to [28.83]\n\ndefine World Record\nif <<(☁ World Record - 1) > (TIME)> and <(LEVEL) = [1]>> then\n    set [☁ world record - 1 v] to (TIME)\nend\nif <<(☁ World Record - 2) > (TIME)> and <(LEVEL) = [2]>> then\n    set [☁ world record - 2 v] to (TIME)\nend\nif <<(☁ World Record - 3) > (TIME)> and <(LEVEL) = [3]>> then\n    set [☁ world record - 3 v] to (TIME)\nend\n\n@Platforms\n\nwhen I receive [green flag v]\nGreen Flag\n\ndefine Green Flag\ngo to x: (0) y: (0)\npoint in direction (90)\nset rotation style [all around v]\nset size to (100) %\nswitch costume to (level 1.1 v)\nclear graphic effects\nhide\nset [portal animation v] to []\n\nwhen I receive [fhp v]\nswitch costume to (fhp v)\nshow\ngo to [front v] layer\ngo [backward v] (100) layers\ngo to x: (128) y: (-222)\npoint in direction (63)\nwait until <key (any v) pressed?>\nwait (1) seconds\nhide\n\nwhen I receive [splash portal v]\nswitch costume to (portal v)\ngo to x: (188) y: (-73)\npoint in direction (90)\nset [ghost v] effect to (100)\nshow\nrepeat (34)\n    change [ghost v] effect by (-3)\nend\nrepeat until <(Portal Animation) = [Stop]>\n    switch costume to (portal v)\n    wait (0.5) seconds\n    switch costume to (portal2 v)\n    wait (0.5) seconds\nend\n\nwhen I receive [pre-play v]\nrepeat (34)\n    change [ghost v] effect by (3)\nend\nset [portal animation v] to [Stop]\nhide\n\nwhen I receive [play v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nswitch costume to (level 1.1 v)\nshow\nclear graphic effects\nbroadcast (Play Game v)\n\nwhen I receive [movement v]\nPosition\n\ndefine Position\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nSetup\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\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\ndefine New Platform: Costume: (costume) x: (x) y: (y)\nset size to (100) %\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nswitch costume to (costume)\n\ndefine Setup\nstop [other scripts in sprite v]\nset [x v] to [0]\nset [y v] to [0]\ndelete all of [collectables data v]\nshow list [collectables data v]\nhide\nif <(LEVEL) = [1]> then\n    switch costume to (level 1.1 v)\n    New Platform: Costume: [Level 1.2] x: [360] y: [0]\n    New Platform: Costume: [Level 1.3] x: [360] y: [0]\n    New Platform: Costume: [Level 1.4] x: [500] y: [0]\n    New Platform: Costume: [Level 1.5] x: [350] y: [200]\n    New Platform: Costume: [Level 1.6] x: [600] y: [0]\n    New Platform: Costume: [Level 1.7] x: [360] y: [0]\n    New Platform: Costume: [Level 1.9] x: [500] y: [100]\n    New Platform: Costume: [Level 1.10] x: [400] y: [0]\n    New Platform: Costume: [Level 1.11] x: [500] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2.1 v)\n        New Platform: Costume: [Level 2.2] x: [360] y: [0]\n        New Platform: Costume: [Level 2.3] x: [360] y: [0]\n        New Platform: Costume: [Level 2.4] x: [360] y: [0]\n        New Platform: Costume: [Level 2.5] x: [360] y: [0]\n        New Platform: Costume: [Level 2.6] x: [685] y: [0]\n        New Platform: Costume: [Level 2.9] x: [10] y: [200]\n        New Platform: Costume: [Level 2.10] x: [400] y: [75]\n        New Platform: Costume: [Level 2.7] x: [25] y: [-275]\n        New Platform: Costume: [Level 2.11] x: [590] y: [0]\n        New Platform: Costume: [Level 2.12] x: [640] y: [0]\n        New Platform: Costume: [Level 2.13] x: [550] y: [100]\n        New Platform: Costume: [Level 2.14] x: [300] y: [350]\n        New Platform: Costume: [Level 2.15] x: [500] y: [300]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3.1 v)\n            New Platform: Costume: [Level 3.2] x: [650] y: [75]\n            New Platform: Costume: [Level 3.3] x: [530] y: [-105]\n            New Platform: Costume: [Level 3.4] x: [400] y: [200]\n            New Platform: Costume: [Level 3.5] x: [0] y: [-200]\n            New Platform: Costume: [Level 3.6] x: [400] y: [0]\n            New Platform: Costume: [Level 3.6] x: [200] y: [0]\n            New Platform: Costume: [Level 3.7] x: [200] y: [0]\n            New Platform: Costume: [Level 3.8] x: [500] y: [0]\n            New Platform: Costume: [Level 3.10] x: [290] y: [0]\n            New Platform: Costume: [Level 3.10] x: [290] y: [100]\n            New Platform: Costume: [Level 3.10] x: [290] y: [100]\n            New Platform: Costume: [Level 3.12] x: [260] y: [60]\n            New Platform: Costume: [Level 3.13] x: [20] y: [-310]\n            New Platform: Costume: [Level 3.14] x: [565] y: [0]\n            New Platform: Costume: [Level 3.15] x: [200] y: [600]\n        else\n            if <(LEVEL) = [4]> then\n                set size to (100) %\n                switch costume to (scratch v)\n                New Platform: Costume: [Exclamation Mark] x: [250] y: [80]\n            end\n        end\n    end\nend\n\nif <(LEVEL) = [3]> then\nNew Platform: Costume: [Level 3.3] x: [] y: []\nNew Platform: Costume: [Level 3.3] x: [] y: []\nNew Platform: Costume: [Level 3.4] x: [] y: []\nNew Platform: Costume: [Level 3.5] x: [] y: []\nNew Platform: Costume: [Level 3.6] x: [] y: []\nNew Platform: Costume: [Level 3.7] x: [] y: []\nNew Platform: Costume: [Level 3.8] x: [] y: []\nNew Platform: Costume: [Level 3.9] x: [] y: []\nNew Platform: Costume: [Level 3.10] x: [] y: []\nNew Platform: Costume: [Level 3.11] x: [] y: []\nNew Platform: Costume: [Level 3.12] x: [] y: []\nNew Platform: Costume: [Level 3.13] x: [] y: []\nNew Platform: Costume: [Level 3.14] x: [] y: []\nNew Platform: Costume: [Level 3.15] x: [] y: []\n\nNew Platform: Costume: [Level 3.4] x: [500] y: [95]\n\nforever\n    New Platform: Costume: [Level 3.12] x: [0] y: [60]\n    wait (0.1) seconds\nend\n\ndelete this clone\n\nforever\n    wait (0.1) seconds\n    stop [other scripts in sprite v]\nend\n\n@Danger\n\nwhen I receive [green flag v]\nGreen Flag\n\ndefine Green Flag\ngo to x: (0) y: (0)\npoint in direction (90)\nset rotation style [all around v]\nset size to (100) %\nswitch costume to (level 1.1 v)\nclear graphic effects\nhide\n\nwhen I receive [play v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nswitch costume to (level 1.1 v)\nshow\nclear graphic effects\nbroadcast (Play Game v)\n\nwhen I receive [movement v]\nPosition\n\ndefine Position\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nSetup\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\ngo [backward v] (10) layers\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine New Platform: Costume: (costume) x: (x) y: (y)\nset size to (100) %\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nswitch costume to (costume)\n\ndefine Setup\nstop [other scripts in sprite v]\nset [x v] to [0]\nset [y v] to [0]\ndelete all of [collectables data v]\nshow list [collectables data v]\nhide\nif <(LEVEL) = [1]> then\n    switch costume to (level 1.1 v)\n    New Platform: Costume: [Level 1.2] x: [360] y: [0]\n    New Platform: Costume: [Level 1.3] x: [360] y: [0]\n    New Platform: Costume: [Level 1.4] x: [500] y: [0]\n    New Platform: Costume: [Level 1.5] x: [350] y: [200]\n    New Platform: Costume: [Level 1.6] x: [600] y: [0]\n    New Platform: Costume: [Level 1.7] x: [360] y: [0]\n    New Platform: Costume: [Level 1.9] x: [500] y: [100]\n    New Platform: Costume: [Level 1.10] x: [400] y: [0]\n    New Platform: Costume: [Level 1.11] x: [500] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2.1 v)\n        New Platform: Costume: [Level 2.2] x: [360] y: [0]\n        New Platform: Costume: [Level 2.3] x: [360] y: [0]\n        New Platform: Costume: [Level 2.4] x: [360] y: [0]\n        New Platform: Costume: [Level 2.5] x: [360] y: [0]\n        New Platform: Costume: [Level 2.6] x: [685] y: [0]\n        New Platform: Costume: [Level 2.9] x: [10] y: [200]\n        New Platform: Costume: [Level 2.10] x: [400] y: [75]\n        New Platform: Costume: [Level 2.7] x: [25] y: [-275]\n        New Platform: Costume: [Level 2.11] x: [590] y: [0]\n        New Platform: Costume: [Level 2.12] x: [640] y: [0]\n        New Platform: Costume: [Level 2.13] x: [550] y: [100]\n        New Platform: Costume: [Level 2.14] x: [300] y: [350]\n        New Platform: Costume: [Level 2.15] x: [500] y: [300]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3.1 v)\n            New Platform: Costume: [Level 3.2] x: [650] y: [75]\n            New Platform: Costume: [Level 3.3] x: [530] y: [-100]\n            New Platform: Costume: [Level 3.4] x: [400] y: [200]\n            New Platform: Costume: [Level 3.5] x: [0] y: [-200]\n            New Platform: Costume: [Level 3.6] x: [400] y: [0]\n            New Platform: Costume: [Level 3.6] x: [200] y: [0]\n            New Platform: Costume: [Level 3.7] x: [200] y: [0]\n            New Platform: Costume: [Level 3.8] x: [500] y: [0]\n            New Platform: Costume: [Level 3.10] x: [290] y: [0]\n            New Platform: Costume: [Level 3.10] x: [290] y: [100]\n            New Platform: Costume: [Level 3.10] x: [290] y: [100]\n            New Platform: Costume: [Level 3.12] x: [260] y: [60]\n            New Platform: Costume: [Level 3.13] x: [20] y: [-310]\n            New Platform: Costume: [Level 3.14] x: [565] y: [0]\n            New Platform: Costume: [Level 3.15] x: [200] y: [400]\n        else\n            if <(LEVEL) = [4]> then\n                set size to (100) %\n                switch costume to (scratch v)\n                New Platform: Costume: [Exclamation Mark] x: [250] y: [80]\n            end\n        end\n    end\nend\n\nif <(LEVEL) = [3]> then\nNew Platform: Costume: [Level 3.3] x: [] y: []\nNew Platform: Costume: [Level 3.3] x: [] y: []\nNew Platform: Costume: [Level 3.4] x: [] y: []\nNew Platform: Costume: [Level 3.5] x: [] y: []\nNew Platform: Costume: [Level 3.6] x: [] y: []\nNew Platform: Costume: [Level 3.7] x: [] y: []\nNew Platform: Costume: [Level 3.8] x: [] y: []\nNew Platform: Costume: [Level 3.9] x: [] y: []\nNew Platform: Costume: [Level 3.10] x: [] y: []\nNew Platform: Costume: [Level 3.11] x: [] y: []\nNew Platform: Costume: [Level 3.12] x: [] y: []\nNew Platform: Costume: [Level 3.13] x: [] y: []\nNew Platform: Costume: [Level 3.14] x: [] y: []\nNew Platform: Costume: [Level 3.15] x: [] y: []\n\nNew Platform: Costume: [Level 3.4] x: [500] y: [95]\n\nforever\n    New Platform: Costume: [Level 3.12] x: [0] y: [60]\n    wait (0.1) seconds\nend\n\ndelete this clone\n\nforever\n    wait (0.1) seconds\n    stop [other scripts in sprite v]\nend\n\n@Background\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [play v]\nshow\n\nwhen I receive [movement v]\nset [ghost v] effect to (50)\ngo to x: (((((SCROLL X) * (0.5)) mod (480)) - (240)) * (-1)) y: (((SCROLL Y) * (-0.5)) - (12))\ngo to [back v] layer\n\n@Collectables\n\nwhen I receive [green flag v]\nhide\ngo to x: (0) y: (0)\nswitch costume to (collectable v)\nset size to (100) %\nclear graphic effects\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [collected v] to [0]\nset [collected max v] to [0]\nset [collect display v] to [0]\nset [collectable infoo v] to []\ndelete all of [collectables data v]\nshow list [collectables data v]\nswitch costume to (collectable v)\nif <(LEVEL) = [1]> then\n    Clone at x: [-90] y: [-15] Info: [1st Beginning]\n    Clone at x: [-43] y: [-15] Info: [2nd Beginning]\n    Clone at x: [4] y: [-15] Info: [3rd Beginning]\n    Clone at x: [242] y: [100] Info: [Top of Jump Platform]\n    Clone at x: [449] y: [20] Info: [Top of Spikes 1]\n    Clone at x: [492] y: [50] Info: [Top of Spikes 2]\n    Clone at x: [533] y: [20] Info: [Top of Spikes 3]\n    Clone at x: [650] y: [120] Info: [Top of Float Platform with Spikes Beneath]\n    Clone at x: [1200] y: [192] Info: [Top of 3rd Raised Platform after which you jump on Floating Platforms]\n    Clone at x: [1419] y: [294] Info: [Floating Platform 1]\n    Clone at x: [1582] y: [377] Info: [Floating Platform 2]\n    Clone at x: [1745] y: [250] Info: [Floating Platform 3]\n    Clone at x: [1901] y: [320] Info: [Side of Wall]\n    Clone at x: [1982] y: [402] Info: [Top of Wall]\n    Clone at x: [2228] y: [332] Info: [Top of Float Platform with Spikes Beneath]\n    Clone at x: [2491] y: [450] Info: [Top of Float Square Platform with 2 Spikes]\n    Clone at x: [2646] y: [340] Info: [Top of Lava Pit]\n    Clone at x: [2987] y: [313] Info: [In area between wall and small wall?]\n    Clone at x: [3435] y: [396] Info: [Top of Spikes Pit Left]\n    Clone at x: [3483] y: [425] Info: [Top of Spikes Pit Mid]\n    Clone at x: [3531] y: [396] Info: [Top of Spikes Pit Right]\n    Clone at x: [4278] y: [393] Info: [Top of Floating Platform Almost End 1]\n    Clone at x: [4108] y: [481] Info: [Top of Floating Platform Almost End 2]\nelse\n    if <(LEVEL) = [2]> then\n        Clone at x: [0] y: [40] Info: [Beginning Top]\n        Clone at x: [279] y: [21] Info: [Over the Pit left]\n        Clone at x: [326] y: [35] Info: [Over the Pit mid]\n        Clone at x: [373] y: [21] Info: [Over the Pit right]\n        Clone at x: [607] y: [68] Info: [Top of first stair]\n        Clone at x: [752] y: [191] Info: [Top of Spikes of Second stair]\n        Clone at x: [1024] y: [214] Info: [Over 1st float rectangle]\n        Clone at x: [1235] y: [180] Info: [Over 1st float square]\n        Clone at x: [1451] y: [180] Info: [Over 2nd float square]\n        Clone at x: [1675] y: [180] Info: [Over 2nd float square]\n        Clone at x: [1860] y: [135] Info: [Side Wall]\n        Clone at x: [1937] y: [200] Info: [On wall]\n        Clone at x: [2164] y: [340] Info: [Big Float Platform #1.1]\n        Clone at x: [2330] y: [400] Info: [Big Float Platform #1.2]\n        Clone at x: [2401] y: [388] Info: [Big Float Platform #1.3]\n        Clone at x: [2625] y: [450] Info: [Big Float Platform #2 Mid]\n        Clone at x: [2700] y: [406] Info: [Big Float Platform #2.2]\n        Clone at x: [2528] y: [132] Info: [Top of Pit which is below big float platforms left]\n        Clone at x: [2580] y: [150] Info: [Top of Pit which is below big float platforms mid]\n        Clone at x: [2632] y: [132] Info: [Top of Pit which is below big float platforms right]\n        Clone at x: [2760] y: [97] Info: [Top of Platform b4 da slope]\n        Clone at x: [3250] y: [235] Info: [Top of Slope perpendicular]\n        Clone at x: [3575] y: [91] Info: [Top of 1st metal circle]\n        Clone at x: [3785] y: [91] Info: [Top of 2nd metal circle]\n        Clone at x: [3990] y: [91] Info: [Top of 3rd metal circle]\n        Clone at x: [4206] y: [90] Info: [Slope 2.1]\n        Clone at x: [4308] y: [187] Info: [Slope 2.2]\n        Clone at x: [4431] y: [297] Info: [Slope 2.3]\n        Clone at x: [4537] y: [328] Info: [Over Slope 2 - Spikes]\n        Clone at x: [4714] y: [415] Info: [Top of Float Round from Below Platform #1]\n        Clone at x: [4550] y: [494] Info: [Top of Float Round from Below Platform #2]\n        Clone at x: [4736] y: [591] Info: [Top of Float Round from Below Platform #2]\n        Clone at x: [4932] y: [950] Info: [Side Wall End 1]\n        Clone at x: [4932] y: [1000] Info: [Side Wall End 2]\n        Clone at x: [4932] y: [1050] Info: [Side Wall End 3]\n    else\n        if <(LEVEL) = [3]> then\n            Clone at x: [125] y: [41] Info: [Top of Lava Pit]\n            Clone at x: [425] y: [89] Info: [Top of Float Platform 1]\n            Clone at x: [650] y: [218] Info: [Top of Float Platform 2]\n            Clone at x: [650] y: [170] Info: [Top of Float Platform 2.2]\n            Clone at x: [874] y: [180] Info: [Top of Float Platform 3]\n            Clone at x: [1110] y: [28] Info: [Before Stair]\n            Clone at x: [1204] y: [109] Info: [Stair 1]\n            Clone at x: [1298] y: [190] Info: [Stair 2]\n            Clone at x: [1496] y: [159] Info: [Side Wall with Spikes]\n            Clone at x: [1685] y: [26] Info: [Safe Platform Mid Jump]\n            Clone at x: [1978] y: [38] Info: [Top of Float Square 1]\n            Clone at x: [2177] y: [38] Info: [Top of Float Square 2]\n            Clone at x: [2482] y: [0] Info: [Top of 5 Spikes Left]\n            Clone at x: [2532] y: [30] Info: [Top of 5 Spikes]\n            Clone at x: [2582] y: [0] Info: [Top of 5 Spikes Right]\n            Clone at x: [2879] y: [65] Info: [Top of So much Spikes]\n            Clone at x: [3164] y: [58] Info: [Top of Ninja 1]\n            Clone at x: [3455] y: [157] Info: [Top of Ninja 2]\n            Clone at x: [3745] y: [257] Info: [Top of Ninja 3]\n            Clone at x: [3883] y: [-80] Info: [Almost near Tramp]\n            Clone at x: [4000] y: [-80] Info: [Below Cave 1]\n            Clone at x: [4055] y: [-80] Info: [Below Cave 2]\n            Clone at x: [4110] y: [-80] Info: [Below Cave 3]\n            Clone at x: [4199] y: [4] Info: [Side Wall Near Tramp]\n            Clone at x: [4524] y: [-48] Info: [Above Pit near Tramp]\n            Clone at x: [4787] y: [-60] Info: [Above Tramp]\n            Clone at x: [4873] y: [485] Info: [Float near Portal 1]\n            Clone at x: [4705] y: [579] Info: [Float near Portal 2]\n        else\n            if <(LEVEL) = [4]> then\n                Clone at x: [156] y: [88] Info: []\n            end\n        end\n    end\nend\nset [x v] to [-99999]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y) Info: (info)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nchange [collected max v] by (1)\nset [collectable infoo v] to (info)\nadd (info) to [collectables data v]\n\nwhen I receive [movement v]\nPosition ((x) - (SCROLL X)) (((y) + ((3) * ([sin v] of (((x) + (TICK)) * (10)) ))) - (SCROLL Y))\nset [collect display v] to (join (COLLECTED) (join [/] (COLLECTED MAX)))\nif <touching (player v)?> then\n    change [collected v] by (1)\n    if <(COLLECTED) = (COLLECTED MAX)> then\n        broadcast (Open Portal v)\n    end\n    delete this clone\nend\nif <<key (c v) pressed?> and <(username) = [ImRohan10187]>> then\n    hide list [collectables data v]\nelse\n    show list [collectables data v]\nend\n\nClone at x: [242] y: [100] Info: []\n\n@Portal\n\nwhen I receive [green flag v]\nhide\ngo to x: (0) y: (0)\nswitch costume to (closed v)\nset size to (100) %\nclear graphic effects\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [portal info v] to []\ndelete all of [portal data v]\nshow list [portal data v]\nadd (join [Level ] (join (LEVEL) [:])) to [portal data v]\nswitch costume to (closed v)\nset size to (100) %\nif <(LEVEL) = [1]> then\n    Go to x: [4303] y: [610] Info: []\nelse\n    if <(LEVEL) = [2]> then\n        Go to x: [5123] y: [1185] Info: []\n    else\n        if <(LEVEL) = [3]> then\n            Go to x: [4900] y: [700] Info: []\n        else\n            if <(LEVEL) = [4]> then\n                set size to (70) %\n                Go to x: [250] y: [-52] Info: []\n            end\n        end\n    end\nend\n\ndefine Position\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Go to x: (x) y: (y) Info: (info)\nset [x v] to (x)\nset [y v] to (y)\nset [portal info v] to (join (x) (join [,] (y)))\nadd (Portal Info) to [portal data v]\n\nwhen I receive [movement v]\nPosition\nif <(username) = [ImRohan10187]> then\n    if <touching (player v)?> then\n        set [exit v] to [Win]\n    end\nelse\n    if <<touching (player v)?> and <<(costume [name v]) = [Open]> or <(costume [name v]) = [Scratch Open]>>> then\n        set [exit v] to [Win]\n    end\nend\nif <<key (p v) pressed?> and <(username) = [ImRohan10187]>> then\n    hide list [portal data v]\nelse\n    show list [portal data v]\nend\n\nwhen I receive [open portal v]\nif <(LEVEL) = [4]> then\n    switch costume to (scratch open v)\nelse\n    switch costume to (open v)\nend\n\n@Thumbnail\n\nwhen I receive [green flag v]\nGreen Flag\nSetup\n\ndefine Green Flag\nhide\nswitch costume to (thumbnail v)\nswitch backdrop to (tn & splash v)\nset size to (100) %\nclear graphic effects\ngo to x: (0) y: (0)\npoint in direction (90)\nset rotation style [all around v]\ngo to [front v] layer\nbroadcast (FHP v)\nset [costume v] to []\nset [thumbnail transition? v] to []\nset [tn transition ghost effect v] to [0]\nset [tn transition = done? v] to []\nset [enter splash transition ghost effect v] to [100]\nset [x v] to [0]\nset [y v] to [0]\nset [play? v] to []\nset [final x v] to [0]\nset [final y v] to [0]\nset [0 v] to []\nset [die v] to [N]\nset [fast v] to [N]\n\ndefine Setup\nCostume: [Thumbnail] x: [0] y: [0] Direction: [63]\nCostume: [Lava Wave TN] x: [0] y: [-170] Direction: [90]\nCostume: [Lava Wave TN2] x: [480] y: [-170] Direction: [90]\nwait until <key (any v) pressed?>\nset [thumbnail transition? v] to [Yes]\nbroadcast (Thumbnail Transition v) and wait\nCostume: [Splash] x: [0] y: [0] Direction: [90]\nCostume: [PlayButton] x: [0] y: [-45] Direction: [90]\nCostume: [Portal] x: [188] y: [-73] Direction: [90]\n\ndefine Thumbnail\n\ndefine Lava Wave TN\n\ndefine Splash\n\ndefine PlayButton\n\ndefine Portal\n\ndefine Costume: (costume) x: (x) y: (y) Direction: (direction)\nswitch costume to (costume)\nset [x v] to (x)\nset [y v] to (y)\npoint in direction (direction)\nset size to (100) %\ncreate clone of (_myself_ v)\nset [costume v] to (costume)\n\nset rotation style [all around v]\ngo to [front v] layer\n\nwhen I receive [splash portal v]\n\nrepeat until <[] > []>\n    switch costume to (costume 1)\n    wait (0.3) seconds\n    switch costume to (costume 2)\n    wait (0.3) seconds\nend\n\nwhen I start as a clone\n\nif <(costume [name v]) = [Thumbnail]> then\n    switch costume to (dot v)\n    set size to (100) %\n    switch costume to (thumbnail v)\n    Position\n    show\nend\nif <(costume [name v]) = [Lava Wave TN]> then\n    Position\n    go to [back v] layer\n    show\n    Wave Effect\nend\nif <(costume [name v]) = [Lava Wave TN2]> then\n    set size to (150) %\n    Position\n    set size to (100) %\n    go to [back v] layer\n    show\n    Wave Effect\nend\nwait until <[] = [Yes]>\nrepeat until <<[] = [Done]> or <[] > []>>\n    if <(costume [name v]) = [Thumbnail]> then\n        switch costume to (thumbnail v)\n    end\n    if <(costume [name v]) = [Lava Wave TN]> then\n        switch costume to (thumbnail v)\n    end\n    if <(costume [name v]) = [Lava Wave TN2]> then\n        switch costume to (thumbnail v)\n    end\n    broadcast (TN Transition Occuring v)\n    if <(costume [name v]) = [Thumbnail]> then\n        switch costume to (lava wave tn v)\n    end\n    if <(costume [name v]) = [Lava Wave TN]> then\n        switch costume to (lava wave tn v)\n    end\n    if <(costume [name v]) = [Lava Wave TN2]> then\n        switch costume to (lava wave tn v)\n    end\n    broadcast (TN Transition Occuring v)\n    if <(costume [name v]) = [Thumbnail]> then\n        switch costume to (lava wave tn2 v)\n    end\n    if <(costume [name v]) = [Lava Wave TN]> then\n        switch costume to (lava wave tn2 v)\n    end\n    if <(costume [name v]) = [Lava Wave TN2]> then\n        switch costume to (lava wave tn2 v)\n    end\n    broadcast (TN Transition Occuring v)\n    wait until <<[] > [100]> or <[] = [100]>>\nend\nif <(costume [name v]) = [Splash]> then\n    Position\n    show\nend\nif <(costume [name v]) = [PlayButton]> then\n    Position\n    set size to (100) %\n    show\n    repeat until <(Play?) > []>\n        if <touching (mouse-pointer v)?> then\n            repeat until <(size) = [110]>\n                change size by (2)\n            end\n        else\n            repeat until <(size) = [100]>\n                change size by (-2)\n            end\n        end\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            set [play? v] to [Yes]\n        end\n    end\n    repeat until <(size) = [100]>\n        change size by (-2)\n    end\n    if <(Play?) = [Yes]> then\n        broadcast (Play v) and wait\n    end\nend\n\nswitch backdrop to (tn & splash v)\nset size to (100) %\nclear graphic effects\ngo to x: (x) y: (y)\npoint in direction (direction)\n\nswitch costume to (dot v)\nset size to (100) %\nswitch costume to (thumbnail v)\ngo to x: (x) y: (y)\n\ndefine Position\ngo to x: (x) y: (y)\n\ndefine Wave Effect\nshow\nrepeat until <(TN Transition = Done?) = [Done]>\n    set size to (150) %\n    change x by (-3)\n    if <(x position) < [-479]> then\n        set x to ((x position) * (-1))\n    end\n    set size to (100) %\nend\n\nset size to (100) %\n\nwhen I receive [tn transition occuring v]\nrepeat until <<[] > [100]> or <[] = [100]>>\n    change [ghost v] effect by (3)\nend\n\nwhen I start as a clone\n\nif <(costume [name v]) = [Thumbnail]> then\n    switch costume to (dot v)\n    set size to (100) %\n    switch costume to (thumbnail v)\n    Position\n    show\nend\nif <(costume [name v]) = [Lava Wave TN]> then\n    Position\n    go to [back v] layer\n    show\n    Wave Effect\nend\nif <(costume [name v]) = [Lava Wave TN2]> then\n    set size to (150) %\n    Position\n    set size to (100) %\n    go to [back v] layer\n    show\n    Wave Effect\nend\nwait until <[] = [Yes]>\nrepeat until <<[] = [Done]> or <[] > []>>\n    if <(costume [name v]) = [Thumbnail]> then\n        switch costume to (thumbnail v)\n    end\n    if <(costume [name v]) = [Lava Wave TN]> then\n        switch costume to (thumbnail v)\n    end\n    if <(costume [name v]) = [Lava Wave TN2]> then\n        switch costume to (thumbnail v)\n    end\n    broadcast (TN Transition Occuring v)\n    if <(costume [name v]) = [Thumbnail]> then\n        switch costume to (lava wave tn v)\n    end\n    if <(costume [name v]) = [Lava Wave TN]> then\n        switch costume to (lava wave tn v)\n    end\n    if <(costume [name v]) = [Lava Wave TN2]> then\n        switch costume to (lava wave tn v)\n    end\n    broadcast (TN Transition Occuring v)\nend\nif <(costume [name v]) = [Splash]> then\n    Position\n    show\nend\nif <(costume [name v]) = [PlayButton]> then\n    Position\n    set size to (100) %\n    show\n    repeat until <(Play?) > []>\n        if <touching (mouse-pointer v)?> then\n            repeat until <(size) = [110]>\n                change size by (2)\n            end\n        else\n            repeat until <(size) = [100]>\n                change size by (-2)\n            end\n        end\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            set [play? v] to [Yes]\n        end\n    end\n    repeat until <(size) = [100]>\n        change size by (-2)\n    end\n    if <(Play?) = [Yes]> then\n        broadcast (Play v) and wait\n    end\nend\n\nif <(costume [name v]) = [Thumbnail]> then\n    switch costume to (lava wave tn2 v)\nend\nif <(costume [name v]) = [Lava Wave TN]> then\n    switch costume to (lava wave tn2 v)\nend\nif <(costume [name v]) = [Lava Wave TN2]> then\n    switch costume to (lava wave tn2 v)\nend\nrepeat until <<[] > [100]> or <[] = [100]>>\n    change [ghost v] effect by (3)\nend\nwait until <<[] > [100]> or <[] = [100]>>\n\nwhen I start as a clone\nif <(costume [name v]) = [Thumbnail]> then\n    switch costume to (dot v)\n    set size to (100) %\n    switch costume to (thumbnail v)\n    Position\n    show\nend\nif <(costume [name v]) = [Lava Wave TN]> then\n    Position\n    go to [back v] layer\n    show\n    Wave Effect\nend\nif <(costume [name v]) = [Lava Wave TN2]> then\n    set size to (150) %\n    Position\n    set size to (100) %\n    go to [back v] layer\n    show\n    Wave Effect\nend\nif <<(Thumbnail Transition?) = [Yes]> or <(Thumbnail Transition?) > []>> then\n    if <(costume [name v]) = [Splash]> then\n        Position\n        clear graphic effects\n        set [ghost v] effect to (100)\n        show\n    end\n    if <(costume [name v]) = [PlayButton]> then\n        Position\n        clear graphic effects\n        set size to (100) %\n        set [ghost v] effect to (100)\n        show\n        broadcast (PlayButton Code v)\n    end\n    Enter Splash Transition\nend\n\nrepeat until <<<[] = [Done]> or <[] > []>> and <<[] = [Done]> or <[] > []>>>\nif <(costume [name v]) = [Splash]> then\n    Position\n    show\nend\nif <(costume [name v]) = [PlayButton]> then\n    Position\n    set size to (100) %\n    show\n    repeat until <(Play?) > []>\n        if <touching (mouse-pointer v)?> then\n            repeat until <(size) = [110]>\n                change size by (2)\n            end\n        else\n            repeat until <(size) = [100]>\n                change size by (-2)\n            end\n        end\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            set [play? v] to [Yes]\n        end\n    end\n    repeat until <(size) = [100]>\n        change size by (-2)\n    end\n    if <(Play?) = [Yes]> then\n        broadcast (Play v) and wait\n    end\nend\n\nwhen I receive [thumbnail transition v]\nrepeat until <<(TN Transition Ghost Effect) > [100]> or <(TN Transition Ghost Effect) = [100]>>\n    change [tn transition ghost effect v] by (3)\n    change [ghost v] effect by (3)\nend\nset [tn transition = done? v] to [Done]\nbroadcast (Splash Portal v)\n\ndefine Enter Splash Transition\nrepeat until <<(Enter Splash Transition Ghost Effect) < [0]> or <(Enter Splash Transition Ghost Effect) = [0]>>\n    change [enter splash transition ghost effect v] by (-3)\n    change [ghost v] effect by (-3)\nend\n\ndefine Exit Splash Transition\nrepeat (34)\n    change [ghost v] effect by (3)\nend\n\nwhen I receive [playbutton code v]\nif <(costume [name v]) = [PlayButton]> then\n    repeat until <<(Play?) = [Play]> or <(Play?) > []>>\n        if <touching (mouse-pointer v)?> then\n            repeat until <<<(size) = [110]> or <(size) > [110]>> or <not <touching (mouse-pointer v)?>>>\n                change size by (2)\n            end\n        else\n            repeat until <<(size) = [100]> or <(size) < [100]>>\n                change size by (-2)\n            end\n        end\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            set [play? v] to [Play]\n            broadcast (Pre-Play v)\n        end\n    end\nend\n\nwhen I receive [pre-play v]\nExit Splash Transition\nwait (0.5) seconds\nset [0 v] to [1]\nbroadcast (Play v)\n\nwhen I receive [play v]\nrepeat (10)\n    delete this clone\nend\n\nforever\n\nswitch costume to (portal2 v)\n\nwhen I receive [clipping glitch error v]\nswitch costume to (game crash v)\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [play game v]\nwait (1) seconds\nswitch costume to (pls l,s,f :\) v)\nset [final x v] to [0]\nset [final y v] to [200]\n\nwhen I receive [movement v]\nPosition ((Final x) - (SCROLL X)) ((Final y) - (SCROLL Y))\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(LEVEL) = [4]> then\n        show\n    else\n        hide\n    end\nelse\n    hide\nend\nset [ghost v] effect to (0)\n\n@Trampoline\n\nwhen I receive [green flag v]\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nset size to (100) %\nhide\nset [tramp x v] to [0]\nset [tramp y v] to [0]\n\nwhen I receive [movement v]\nPosition ((Tramp x) - (SCROLL X)) ((Tramp y) - (SCROLL Y))\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <<(LEVEL) = [3]> or <(LEVEL) = [4]>> then\n        show\n    else\n        hide\n    end\nelse\n    hide\nend\nif <touching (player v)?> then\n    broadcast (Extend Trampoline v)\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nif <(LEVEL) = [3]> then\n    New Trampoline at x: [4788] y: [-111]\nelse\n    if <(LEVEL) = [4]> then\n        New Trampoline at x: [-150] y: [60]\n    end\nend\n\ndefine New Trampoline at x: (x) y: (y)\nset [tramp x v] to (x)\nset [tramp y v] to (y)\n\nif <<(LEVEL) = [3]> or <(LEVEL) = [4]>> then\n\nwhen I receive [extend trampoline v]\nswitch costume to (costume2 v)\nwait (0.5) seconds\nswitch costume to (costume1 v)\n\nrepeat (10)\n    switch costume to (costume2 v)\nend\n\n@Sea\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [play game v]\nset [ghost v] effect to (20)\n\nwhen I receive [movement v]\nif <(round ([size v] of [player v])) = [100]> then\n    Position (((((SCROLL X) * (-1)) - (TICK)) mod (480)) - (240)) (((-180) - (SCROLL Y)) + ((10) * ([sin v] of ((TICK) * (5)) )))\n    go to [back v] layer\n    go [forward v] (1) layers\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\n@Logo\n\nwhen I receive [green flag v]\nset [ghost v] effect to (100)\ngo to [front v] layer\n\n
This is my First Project in my account. It is finally ready after 3 entire months of Hard work, research and determination. Hope you enjoy Playing :)\nPRESS SPACE TO BEGIN\nBe Sure to press the Green Flag TWICE to prevent bugs.\nCursor Keys, WASD or Mobile Controls to Move the player. You can move right, left and jump.\nCollect all the coins to open the Portal at the end of each level. To finish the level, you must enter the Portal.\nThere is a surprise waiting for you in Level 1 itself. If any of you finds out, be sure to comment down with tag #I-Found-It.\nAt the end of the last level,  an awesome graphic scene with the blends of Scratch's logo is waiting for you. Didn't get it? Don't worry, Play to find out ;)\n\nIf the game is LAGGY for you, play the game on TurboWarp over here: https://turbowarp.org/474673415\nOr, try closing other tabs, it helps a lot.\n\nIf you really read these instructions and made it through the entire game comment down #Portal-Platformer!\n\nAny nice background music for this? Any person who suggests will get a Shoutout!