Unfinished - A 100% Pen Platformer
@Stage\n\n@Pen\n\ndefine Collide (length) (height) (color) (x) (y) (size) (id#) (hitbox) (extra) (x2) (y2) (range_x) (sp_x) (tick_x) (rang_y) (sp_y) (tick_y) (collision_type) (prev_touching)\nif <(exit) = [next]> then\n    replace item (id#) of [game_info v] with [0]\n    stop [this script v]\nend\nif <(item (((id#) * (9)) - (3)) of [game_info v]) = []> then\n    replace item (((id#) * (9)) - (8)) of [game_info v] with (length)\n    replace item (((id#) * (9)) - (7)) of [game_info v] with (height)\n    replace item (((id#) * (9)) - (6)) of [game_info v] with (color)\n    replace item (((id#) * (9)) - (3)) of [game_info v] with (size)\n    replace item (((id#) * (9)) - (2)) of [game_info v] with (extra)\n    replace item (((id#) * (9)) - (1)) of [game_info v] with (x2)\n    replace item ((id#) * (9)) of [game_info v] with (y2)\nend\nif <<(extra) = [coin]> or <(extra) = [portal]>> then\n    if <(extra) = [coin]> then\n        if <(exit) = [die]> then\n            replace item (((id#) * (9)) - (2)) of [game_info v] with (extra)\n        end\n        Detect circle ((x) * (-1)) ((y) * (-1)) (size) (id#)\n        if <(item (id#) of [touching v]) = [1]> then\n            replace item (id#) of [touching v] with [0]\n            if <not <(item (((id#) * (9)) - (2)) of [game_info v]) = [collected]>> then\n                change [score v] by (1)\n                start sound [Coin Collect v]\n                replace item (((id#) * (9)) - (2)) of [game_info v] with [collected]\n            end\n        end\n    else\n        Detect circle ((x) * (-1)) ((y) * (-1)) (size) (id#)\n        if <(item (id#) of [touching v]) = [1]> then\n            replace item (id#) of [touching v] with [0]\n            if <(score) = (join (letter (((level) * (2)) - (1)) of (max_score)) (letter ((level) * (2)) of (max_score)))> then\n                set [exit v] to [next]\n            end\n        end\n    end\nelse\n    if <(hitbox) = [1]> then\n        replace item (id#) of [touching v] with [0]\n        if <(x2) > []> then\n            Detect slope (x) (y) (x2) (y2) (size) (id#)\n            if <(item (id#) of [touching v]) = [1]> then\n                Return state [collision] (id#) (collision_type) (extra) (sp_x) (tick_x) [] [] (item (((id#) * (9)) - (5)) of [game_info v]) (prev_y) ((x) - ([abs v] of (item (((id#) * (2)) - (1)) of [move v]) )) (y) (prev_touching)\n            end\n        else\n            Move (range_x) (sp_x) (tick_x) (rangey) (sp_y) (tick_y) (collision_type) (id#)\n            if <<(delta_x) = (id#)> and <(collision_type) = [tx2]>> then\n                set [xs v] to ((item (((id#) * (9)) - (5)) of [game_info v]) - ((x) - ([abs v] of (item (((id#) * (2)) - (1)) of [move v]) )))\n            end\n            if <<((size) + (1)) = (length)> and <((size) + (1)) = (height)>> then\n                Detect circle (([abs v] of (item (((id#) * (2)) - (1)) of [move v]) ) - (x)) ((y) * (-1)) (size) (id#)\n                if <(item (id#) of [touching v]) = [1]> then\n                    Return state [collision] (id#) (collision_type) (extra) (sp_x) (tick_x) [] [] (item (((id#) * (9)) - (5)) of [game_info v]) (prev_y) ((x) - ([abs v] of (item (((id#) * (2)) - (1)) of [move v]) )) (y) (prev_touching)\n                end\n            else\n                if <<<((((x) - ([abs v] of (item (((id#) * (2)) - (1)) of [move v]) )) + (x)) + ((length) / (2))) > ((0) - ((player_size) / (2)))> and <((((x) - ([abs v] of (item (((id#) * (2)) - (1)) of [move v]) )) + (x)) - ((length) / (2))) < ((0) + ((player_size) / (2)))>> and <<(((y) + (y)) + ((height) / (2))) > ((0) - ((player_size) / (2)))> and <(((y) + (y)) - ((height) / (2))) < ((0) + ((player_size) / (2)))>>> then\n                    Return state [collision] (id#) (collision_type) (extra) (sp_x) (tick_x) [] [] (item (((id#) * (9)) - (5)) of [game_info v]) (prev_y) ((x) - ([abs v] of (item (((id#) * (2)) - (1)) of [move v]) )) (y) (prev_touching)\n                end\n            end\n        end\n    end\nend\nif <not <((item (((id#) * (9)) - (5)) of [game_info v]) + (item (((id#) * (9)) - (4)) of [game_info v])) = (((x) - ([abs v] of (item (((id#) * (2)) - (1)) of [move v]) )) + ((y) - ([abs v] of (item ((id#) * (2)) of [move v]) )))>> then\n    replace item (((id#) * (9)) - (5)) of [game_info v] with ((x) - ([abs v] of (item (((id#) * (2)) - (1)) of [move v]) ))\n    replace item (((id#) * (9)) - (4)) of [game_info v] with (y)\nend\nchange [id# v] by (1)\n\ndefine Draw all (loop#) to (end#) (start#)\nif <(loop#) = (end#)> then\n    stop [this script v]\nend\nif <(loop#) = (start#)> then\n    go to x: (0) y: (0)\n    erase all\n    Render BG\n    render rectangle (player_size) (player_size) [15] ((x) * (-1)) ((y) * (-1)) (join [040100075] (exit)) [player]\n    render rectangle [10] [10] [9] (((x) + (7)) * (-1)) (((y) + (7)) * (-1)) (join [000000100] (exit)) []\n    render rectangle [10] [10] [9] (((x) + (-7)) * (-1)) (((y) + (7)) * (-1)) (join [000000100] (exit)) []\n    render rectangle [5] [5] [4] ((((x) + (-7)) + ((<(round (xs)) > [0]> * (2)) + (<(round (xs)) < [0]> * (-2)))) * (-1)) (((((y) + (7)) + (<(round (ys)) > [0]> * (2))) + (<(round (ys)) < [0]> * (-2))) * (-1)) (join [000000000] (exit)) []\n    render rectangle [5] [5] [4] ((((x) + (7)) + ((<(round (xs)) > [0]> * (2)) + (<(round (xs)) < [0]> * (-2)))) * (-1)) (((((y) + (7)) + (<(round (ys)) > [0]> * (2))) + (<(round (ys)) < [0]> * (-2))) * (-1)) (join [000000000] (exit)) []\nend\nRender level (((loop#) * (9)) - (8)) (((loop#) * (9)) - (7)) (((loop#) * (9)) - (6)) (((loop#) * (9)) - (5)) (((loop#) * (9)) - (4)) (((loop#) * (9)) - (3)) (((loop#) * (9)) - (2)) (((loop#) * (9)) - (1)) ((loop#) * (9))\nDraw all ((loop#) + (1)) to (end#) (start#)\n\ndefine render rectangle (height) (length) (size) (x) (y) (color) (extra)\nif <<<(((x) + (scroll_x)) + ((length) / (2))) > [-240]> and <(((x) + (scroll_x)) - ((length) / (2))) < [240]>> and <<(((y) + (scroll_y)) + ((height) / (2))) > [-180]> and <(((y) + (scroll_y)) - ((height) / (2))) < [180]>>> then\n    go to x: ((((x) + (scroll_x)) * (-1)) - (((length) / (2)) - ((size) / (2)))) y: ((((y) + (scroll_y)) * (-1)) - (((height) / (2)) - ((size) / (2))))\n    set pen size to (size)\n    set color (color)\n    if <<not <<<(extra) = [coin]> or <(extra) = [portal]>> or <(extra) = [collected]>>> or <(extra) = [player]>> then\n        if <<(lag) = [0]> or <(extra) = [player]>> then\n            if <(length) > (height)> then\n                repeat ((height) - (size))\n                    pen down\n                    set x to ((x position) + ((length) - (size)))\n                    pen up\n                    set x to ((x position) - ((length) - (size)))\n                    set y to ((y position) + (1))\n                end\n            else\n                repeat ((length) - (size))\n                    pen down\n                    set y to ((y position) + ((height) - (size)))\n                    pen up\n                    set y to ((y position) - ((height) - (size)))\n                    set x to ((x position) + (1))\n                end\n            end\n        else\n            pen down\n            set x to ((((x) + (scroll_x)) * (-1)) + (((length) / (2)) - ((size) / (2))))\n            set y to ((((y) + (scroll_y)) * (-1)) + (((height) / (2)) - ((size) / (2))))\n            set x to ((((x) + (scroll_x)) * (-1)) - (((length) / (2)) - ((size) / (2))))\n            set y to ((((y) + (scroll_y)) * (-1)) - (((height) / (2)) - ((size) / (2))))\n            pen up\n        end\n    else\n        if <(extra) = [coin]> then\n            pen down\n            set pen (transparency v) to (95)\n            repeat (25)\n                change pen size by (1)\n                pen down\n            end\n            pen up\n        else\n            if <(extra) = [portal]> then\n                if <(score) < (join (letter (((level) * (2)) - (1)) of (max_score)) (letter ((level) * (2)) of (max_score)))> then\n                    set pen (saturation v) to (0)\n                end\n                change pen size by ((([cos v] of ((special_effects) * (20)) ) * (20)) - (150))\n                pen down\n                set pen (transparency v) to (97)\n                repeat ((([cos v] of ((special_effects) * (12)) ) * (20)) - ((([cos v] of ((special_effects) * (20)) ) * (20)) - (150)))\n                    change pen size by (1)\n                    change pen (color v) by (0.1)\n                    pen down\n                end\n                pen up\n                set pen size to (size)\n                change pen size by ((([acos v] of ((special_effects) * (20)) ) * (20)) - (150))\n                pen down\n                set pen (transparency v) to (97)\n                repeat ((([sin v] of ((special_effects) * (20)) ) * (20)) - ((([sqrt v] of ((special_effects) * (20)) ) * (20)) - (150)))\n                    change pen size by (1)\n                    change pen (color v) by (0.1)\n                    pen down\n                end\n                pen up\n            end\n        end\n    end\nend\n\ndefine render saw blades (loop) (x) (y) (distance)\nif <(loop) = [15]> then\n    stop [this script v]\nend\nif <[] = [1]> then\n    point in direction ((-77.25) + (((loop) - (1)) * (25.5)))\nelse\n    point in direction ((-90) + (((loop) - (1)) * (25.5)))\nend\npen down\nmove (distance) steps\npen up\ngo to x: ((x) + (x)) y: ((y) + (y))\nrender saw blades ((loop) + (1)) (x) (y) (distance)\n\ndefine render line (x) (x2) (y) (y2) (size) (color)\nset pen (transparency v) to (0)\nset pen (brightness v) to (100)\nset pen (saturation v) to (100)\npen up\nset pen size to (size)\nset color (color)\ngo to x: (((x) + (scroll_x)) * (-1)) y: (((y) + (scroll_y)) * (-1))\npen down\ngo to x: (((x2) + (scroll_x)) * (-1)) y: (((y2) + (scroll_y)) * (-1))\npen down\npen up\n\ndefine set color (color)\nset pen (color v) to (join (join (letter (1) of (color)) (letter (2) of (color))) (letter (3) of (color)))\nset pen (saturation v) to (join (join (letter (4) of (color)) (letter (5) of (color))) (letter (6) of (color)))\nset pen (brightness v) to (join (join (letter (7) of (color)) (letter (8) of (color))) (letter (9) of (color)))\nset pen (transparency v) to (join (join (letter (10) of (color)) (letter (11) of (color))) (letter (12) of (color)))\n\ndefine Render level (length) (height) (color) (x) (y) (size) (extra) (x2) (y2)\nif <(item (x2) of [game_info v]) > []> then\n    render line (item (x) of [game_info v]) (item (x2) of [game_info v]) (item (y) of [game_info v]) (item (y2) of [game_info v]) (item (size) of [game_info v]) (item (color) of [game_info v])\nelse\n    render rectangle (item (height) of [game_info v]) (item (length) of [game_info v]) (item (size) of [game_info v]) (item (x) of [game_info v]) (item (y) of [game_info v]) (item (color) of [game_info v]) (item (extra) of [game_info v])\nend\n\ndefine Tick\nSet subtitle\nchange [special_effects v] by (1)\nif <(ys) > [-35]> then\n    change [ys v] by (-1)\nelse\n    set [ys v] to [-50]\nend\nif <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > [30]>>> and <(ground) = [1]>> then\n    set [ys v] to [14]\nend\nset [ground v] to [0]\nchange [y v] by (round (ys))\nProcess levels [ty1]\nCollide Y <[touching v] contains [3]?>\nif <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > [30]>>> then\n    change [xs v] by (2)\nend\nif <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < [-30]>>> then\n    change [xs v] by (-2)\nend\nif <([abs v] of (xs) ) > [12]> then\n    set [xs v] to (((xs) / ([abs v] of (xs) )) * (12))\nend\nchange [xs v] by (((xs) / ([abs v] of (xs) )) * (-1))\nchange [x v] by (xs)\nProcess levels [tx1]\nCollide X (xs) [cx1]\nMove blocks (xs)\nchange [scroll_x v] by (round (((x) - (scroll_x)) / (1)))\nchange [scroll_y v] by (round (((y) - (scroll_y)) / (10)))\nif <((y) - (scroll_y)) > [100]> then\n    change [scroll_y v] by (((y) - (scroll_y)) - (100))\nend\nif <<((y) - (scroll_y)) < [-100]> and <(y) > [-400]>> then\n    change [scroll_y v] by (((y) - (scroll_y)) - (-100))\nend\nDeath?\nNext?\nDraw all (item (level) of [item1 v]) to (id#) (item (level) of [item1 v])\nset [exit v] to []\n\ndefine Collide X (xs) (collision_type)\nif <<[touching v] contains [1]?> or <[touching v] contains [3]?>> then\n    repeat (10)\n        change [y v] by (1)\n        Process levels [slope]\n        if <not <<[touching v] contains [1]?> or <[touching v] contains [3]?>>> then\n            set [block_sp v] to [0]\n            stop [this script v]\n        end\n    end\n    change [y v] by (-10)\n    change [xs v] by (block_sp)\n    repeat until <not <<[touching v] contains [1]?> or <[touching v] contains [3]?>>>\n        change [x v] by ((((xs) + (block_sp)) / ([abs v] of ((xs) + (block_sp)) )) * (-1))\n        Process levels (collision_type)\n        if <[touching v] contains [2]?> then\n            stop [this script v]\n        end\n    end\n    if <<(ground) = [0]> and <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > [30]>>>> then\n        set [xs v] to (((xs) / ([abs v] of (xs) )) * (-13))\n        set [ys v] to [15]\n    else\n        set [xs v] to [0]\n    end\nend\nif <(ground) = [1]> then\n    repeat (10)\n        change [y v] by (-1)\n        Process levels [downslope]\n        if <<[touching v] contains [1]?> or <[touching v] contains [3]?>> then\n            change [y v] by (1)\n            stop [this script v]\n        end\n    end\n    change [y v] by (10)\nend\nset [block_sp v] to [0]\n\ndefine Collide Y <bounce>\nif <<[touching v] contains [1]?> or <[touching v] contains [3]?>> then\n    repeat until <not <<[touching v] contains [1]?> or <[touching v] contains [3]?>>>\n        change [y v] by (((ys) / ([abs v] of (ys) )) * (-1))\n        Process levels [cy]\n    end\n    if <<bounce> and <(ys) < [0]>> then\n        set [ys v] to [22]\n    else\n        if <(ys) < [0]> then\n            set [ground v] to [1]\n        end\n        set [ys v] to [0]\n    end\nend\n\ndefine Process levels (collision)\nset [id# v] to (item (level) of [item1 v])\nif <(level) = [1]> then\n    Event listener [collision] Length [151] Height [151] Color [030100100090] X [-900] Y [-100] Pen size [150] Hitbox [] Extra info [portal] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [1000] Height [50] Color [070100100000] X [-450] Y [0] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    repeat (5)\n        Event listener [collision] Length [50] Height [25] Color [100100100000] X ((-50) - (((id#) - (2)) * (150))) Y [-37] Pen size [5] Hitbox [1] Extra info [lava] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    end\n    repeat (4)\n        Event listener [collision] Length [] Height [] Color [016070100000] X ((-270) - (((id#) - (8)) * (150))) Y [-40] Pen size [15] Hitbox [] Extra info [coin] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    end\nend\nif <(level) = [2]> then\n    Event listener [collision] Length [1000] Height [50] Color [017085100000] X [-450] Y [0] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [151] Height [151] Color [030100100090] X [-1650] Y [-100] Pen size [150] Hitbox [] Extra info [portal] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [1000] Height [50] Color [017085100000] X [-450] Y [-250] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    repeat (7)\n        Event listener [collision] Length [50] Height [25] Color [100100100000] X ((50) - (((id#) - (14)) * (115))) Y [-213] Pen size [5] Hitbox [1] Extra info [lava] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    end\n    repeat (7)\n        Event listener [collision] Length [50] Height [25] Color [080100100000] X ((50) - (((id#) - (21)) * (115))) Y [-37] Pen size [5] Hitbox [1] Extra info [bounce] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    end\n    Event listener [collision] Length [25] Height [50] Color [017085100000] X [-1075] Y [0] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [50] SpX [5] Tick X [50] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [25] Height [50] Color [017085100000] X [-1500] Y [0] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [] Height [] Color [016070100000] X [-1067.5] Y [-40] Pen size [15] Hitbox [] Extra info [coin] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\nend\nif <(level) = [3]> then\n    Event listener [collision] Length [50] Height [50] Color [043100100000] X [0] Y [0] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [] Height [] Color [012100100000] X [0] Y [100] Pen size [11] Hitbox [0] Extra info [] X2 [0] Y2 [32] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [] Height [] Color [012100100000] X [0] Y [100] Pen size [11] Hitbox [0] Extra info [] X2 [25] Y2 [75] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [] Height [] Color [012100100000] X [0] Y [100] Pen size [11] Hitbox [0] Extra info [] X2 [-25] Y2 [75] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [75] Height [50] Color [043100100000] X [0] Y [200] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [250] Height [50] Color [043100100000] X [-525] Y [200] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [] Height [] Color [012100100000] X [-100] Y [200] Pen size [11] Hitbox [] Extra info [] X2 [-168] Y2 [200] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [] Height [] Color [012100100000] X [-168] Y [200] Pen size [11] Hitbox [] Extra info [] X2 [-143] Y2 [225] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [] Height [] Color [012100100000] X [-168] Y [200] Pen size [11] Hitbox [] Extra info [] X2 [-143] Y2 [175] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [250] Color [043100100000] X [-625] Y [50] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [100] Color [043100100000] X [-425] Y [-25] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [10] SpX [15] Tick X [5] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [] Height [] Color [043100100000] X [-750] Y [-150] Pen size [100] Hitbox [1] Extra info [] X2 [-1500] Y2 [-300] Range X [10] SpX [15] Tick X [8] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    repeat (3)\n        Event listener [collision] Length [251] Height [251] Color [043100100000] X ((-1500) - (((id#) - (43)) * (300))) Y [-300] Pen size [250] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    end\n    repeat (3)\n        Event listener [collision] Length [] Height [] Color [016070100000] X ((-1492.5) - (((id#) - (46)) * (300))) Y [-500] Pen size [15] Hitbox [] Extra info [coin] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    end\n    Event listener [collision] Length [151] Height [151] Color [030100100090] X [-2600] Y [-550] Pen size [150] Hitbox [] Extra info [portal] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\nend\nif <(level) = [4]> then\n    Event listener [collision] Length [2000] Height [50] Color [056070100000] X [-950] Y [0] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [1700] Color [056070100000] X [25] Y [-950] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [2000] Height [50] Color [056070100000] X [-950] Y [-1825] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [1775] Color [056070100000] X [-1925] Y [-912.5] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [750] Height [50] Color [056070100000] X [-375] Y [-500] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [600] Height [50] Color [056070100000] X [-450] Y [-200] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [250] Color [056070100000] X [-725] Y [-350] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [150] Color [056070100000] X [-400] Y [-300] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [500] Color [056070100000] X [-950] Y [-275] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [950] Color [056070100000] X [-950] Y [-1175] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [950] Color [056070100000] X [-725] Y [-1175] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [600] Height [50] Color [056070100000] X [-400] Y [-725] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [200] Color [056070100000] X [-125] Y [-850] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [350] Color [056070100000] X [-400] Y [-1000] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [600] Height [50] Color [056070100000] X [-300] Y [-1300] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [350] Color [056070100000] X [-150] Y [-1625] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [350] Color [056070100000] X [-300] Y [-1625] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [350] Color [056070100000] X [-450] Y [-1625] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [600] Color [056070100000] X [-1175] Y [-1350] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [300] Height [50] Color [056070100000] X [-1125] Y [-500] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [600] Color [056070100000] X [-1300] Y [-425] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [350] Height [50] Color [056070100000] X [-1500] Y [-700] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [1200] Color [056070100000] X [-1700] Y [-725] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [150] Height [50] Color [056070100000] X [-1400] Y [-150] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [400] Color [056070100000] X [-1500] Y [-325] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [475] Height [50] Color [056070100000] X [-1437.5] Y [-1300] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [225] Height [50] Color [056070100000] X [-1087.5] Y [-1025] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [500] Height [50] Color [056070100000] X [-1650] Y [-1600] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [500] Height [50] Color [056070100000] X [-1650] Y [-1400] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [] Height [] Color [016070100000] X [-1492] Y [-550] Pen size [15] Hitbox [] Extra info [coin] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [100] Height [25] Color [100100100000] X [-1810] Y [-37] Pen size [5] Hitbox [1] Extra info [lava] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [151] Height [151] Color [030100100090] X [-62.5] Y [-1700] Pen size [150] Hitbox [] Extra info [portal] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\nend\nif <(level) = [5]> then\n    Event listener [collision] Length [50] Height [50] Color [009070100000] X [0] Y [0] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [250] Height [50] Color [009070100000] X [-775] Y [-100] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [250] Color [009070100000] X [-875] Y [-250] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [50] Height [100] Color [009070100000] X [-675] Y [-325] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [10] SpX [15] Tick X [5] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [250] Height [50] Color [009070100000] X [-150] Y [0] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [75] SpX [5] Tick X [35] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [100] Height [25] Color [080100100000] X [-150] Y [-37] Pen size [5] Hitbox [1] Extra info [bounce] X2 [] Y2 [] Range X [75] SpX [5] Tick X [35] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [700] Height [50] Color [100100100000] X [-275] Y [-330] Pen size [9] Hitbox [1] Extra info [lava] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [] Height [] Color [016070100000] X [-668.2] Y [-450] Pen size [15] Hitbox [] Extra info [coin] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [] Height [] Color [016070100000] X [-867.5] Y [-450] Pen size [15] Hitbox [] Extra info [coin] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\n    Event listener [collision] Length [151] Height [151] Color [030100100090] X [-950] Y [-500] Pen size [150] Hitbox [] Extra info [portal] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\nend\nif <(level) = [6]> then\n    Event listener [collision] Length [50] Height [50] Color [059060090000] X [0] Y [0] Pen size [9] Hitbox [1] Extra info [] X2 [] Y2 [] Range X [] SpX [] Tick X [] Range Y [] SpY [] Tick Y [] Collision type (collision)\nend\n\nwhen [l v] key pressed\nset [lag v] to (<(lag) = [0]> * (1))\nwait until <not <key (l v) pressed?>>\n\ndefine Death?\nif <<<((y) - (scroll_y)) < [-160]> or <[touching v] contains [2]?>> or <key (r v) pressed?>> then\n    broadcast (Death v)\nend\n\nwhen I receive [death v]\nstop [other scripts in sprite v]\nset [xs v] to (((xs) / ([abs v] of (xs) )) * (-4))\nset [ys v] to [14]\nset [exit v] to [0]\nrepeat until <(exit) > [100]>\n    change [exit v] by (5)\n    change [ys v] by (-1)\n    change [y v] by (ys)\n    change [x v] by (xs)\n    Draw all (item (level) of [item1 v]) to (id#) (item (level) of [item1 v])\nend\nwait (0.5) seconds\nSet position\nrepeat until <([abs v] of (((x) - (scroll_x)) / (10)) ) < [0.1]>\n    change [scroll_x v] by (((x) - (scroll_x)) / (10))\n    change [scroll_y v] by (((y) - (scroll_y)) / (10))\n    Draw all (item (level) of [item1 v]) to (id#) (item (level) of [item1 v])\nend\nrepeat until <(exit) < [0]>\n    change [exit v] by (-5)\n    Draw all (item (level) of [item1 v]) to (id#) (item (level) of [item1 v])\nend\nset [exit v] to [die]\nbroadcast (Initiate  Physics  v)\n\nwhen I receive [initiate  physics  v]\nforever\n    broadcast (Tick v) and wait\nend\n\ndefine Render BG\nset pen size to (1000)\nset pen color to (#000000)\nset pen (transparency v) to (0)\npen down\npen up\n\nwhen I receive [begin v]\nSetup\n\ndefine Detect circle (x) (y) (size) (id#)\nFind distance (x) (y) (x) (y) (((size) / (2)) + ((player_size) / (2))) (id#)\nif <(y) < ((y) - ((player_size) / (2)))> then\n    if <<(x) > ((x) + ((player_size) / (2)))> or <(x) < ((x) - ((player_size) / (2)))>> then\n        Find distance (x) (y) ((<(x) > ((x) + ((player_size) / (2)))> * ((x) + ((player_size) / (2)))) + (<(x) < ((x) - ((player_size) / (2)))> * ((x) - ((player_size) / (2))))) ((y) - ((player_size) / (2))) ((size) / (2)) (id#)\n    else\n        Find distance (x) (y) (x) ((y) - ((player_size) / (2))) ((size) / (2)) (id#)\n    end\nelse\n    if <(y) > ((y) + ((player_size) / (2)))> then\n        if <<(x) > ((x) + ((player_size) / (2)))> or <(x) < ((x) - ((player_size) / (2)))>> then\n            Find distance (x) (y) ((<(x) > ((x) + ((player_size) / (2)))> * ((x) + ((player_size) / (2)))) + (<(x) < ((x) - ((player_size) / (2)))> * ((x) - ((player_size) / (2))))) ((y) + ((player_size) / (2))) ((size) / (2)) (id#)\n        else\n            Find distance (x) (y) (x) ((y) + ((player_size) / (2))) ((size) / (2)) (id#)\n        end\n    else\n        if <(x) < ((x) - ((player_size) / (2)))> then\n            if <<(y) > ((y) + ((player_size) / (2)))> or <(y) < ((y) - ((player_size) / (2)))>> then\n                Find distance (x) (y) ((x) - ((player_size) / (2))) ((<(y) > ((y) + ((player_size) / (2)))> * ((y) + ((player_size) / (2)))) + (<(y) < ((y) - ((player_size) / (2)))> * ((y) - ((player_size) / (2))))) ((size) / (2)) (id#)\n            else\n                Find distance (x) (y) ((x) - ((player_size) / (2))) (y) ((size) / (2)) (id#)\n            end\n        else\n            if <(x) > ((x) + ((player_size) / (2)))> then\n                if <<(y) > ((y) + ((player_size) / (2)))> or <(y) < ((y) - ((player_size) / (2)))>> then\n                    Find distance (x) (y) ((x) + ((player_size) / (2))) ((<(y) > ((y) + ((player_size) / (2)))> * ((y) + ((player_size) / (2)))) + (<(y) < ((y) - ((player_size) / (2)))> * ((y) - ((player_size) / (2))))) ((size) / (2)) (id#)\n                else\n                    Find distance (x) (y) ((x) + ((player_size) / (2))) (y) ((size) / (2)) (id#)\n                end\n            end\n        end\n    end\nend\n\ndefine Find distance (x) (y) (clampedx) (clampedy) (max_dist) (id#)\nif <not <((((clampedx) - (x)) * ((clampedx) - (x))) + (((clampedy) - (y)) * ((clampedy) - (y)))) > ((max_dist) * (max_dist))>> then\n    replace item (id#) of [touching v] with [1]\nend\n\ndefine Move (rangex) (spx) (tickx) (rangey) (spy) (ticky) (collision_type) (id#)\nif <<(collision_type) = [tx2]> and <not <(collision_type) = [tx3]>>> then\n    if <(rangex) > []> then\n        replace item (((id#) * (2)) - (1)) of [tick v] with ((item (((id#) * (2)) - (1)) of [tick v]) + (1))\n        if <(item (((id#) * (2)) - (1)) of [tick v]) > (tickx)> then\n            replace item (((id#) * (2)) - (1)) of [move v] with ((item (((id#) * (2)) - (1)) of [move v]) + (spx))\n        end\n        if <<<(item (((id#) * (2)) - (1)) of [move v]) = ((spx) * (rangex))> or <(item (((id#) * (2)) - (1)) of [move v]) = [0]>> and <(item (((id#) * (2)) - (1)) of [tick v]) > (tickx)>> then\n            if <(item (((id#) * (2)) - (1)) of [move v]) = ((spx) * (rangex))> then\n                replace item (((id#) * (2)) - (1)) of [move v] with (((spx) * (rangex)) * (-1))\n            end\n            replace item (((id#) * (2)) - (1)) of [tick v] with [0]\n        end\n    else\n        if <(spx) > []> then\n            replace item (((id#) * (2)) - (1)) of [tick v] with ((item (((id#) * (2)) - (1)) of [tick v]) + (1))\n            replace item (((id#) * (2)) - (1)) of [move v] with ((item (((id#) * (2)) - (1)) of [move v]) + (spx))\n        end\n    end\nend\n\ndefine Return state [collision] (id#) (collision_type) (extra) (sp_x) (tick_x) (sp_y) (tick_y) (prev_x) (prev_y) (x) (y) (prev_touching)\nreplace item (id#) of [touching v] with [0]\nif <<<(collision_type) = [cx2]> and <(prev_touching) = [0]>> or <((block_sp) * ((x) - (prev_x))) < [0]>> then\n    replace item (id#) of [touching v] with [2]\n    stop [this script v]\nend\nif <<(collision_type) = [ty1]> and <(sp_x) > [0]>> then\n    set [delta_x v] to (id#)\nend\nif <<(collision_type) = [tx2]> and <(sp_x) > []>> then\n    change [block_sp v] by ((x) - (prev_x))\nend\nif <(extra) = [bounce]> then\n    replace item (id#) of [touching v] with [3]\nelse\n    if <(extra) = [lava]> then\n        replace item (id#) of [touching v] with [2]\n    else\n        replace item (id#) of [touching v] with [1]\n    end\nend\n\ndefine Setup\nset [max_score v] to []\nset max score to [4]\nset max score to [1]\nset max score to [3]\nset max score to [1]\nset max score to [2]\nset [special_effects v] to [0]\nset [delta_x v] to [0]\nset [block_sp v] to [0]\nset [exit v] to []\nset [id# v] to [0]\nset [player_size v] to [28]\nset [lag v] to [1]\nSet position\nset [scroll_x v] to [0]\nset [scroll_y v] to [0]\ndelete all of [game_info v]\ndelete all of [touching v]\ndelete all of [move v]\ndelete all of [tick v]\ndelete all of [item1 v]\nSetup ID info for [6] levels\nrepeat ((id#) - (1))\n    add [0] to [touching v]\n    repeat (2)\n        add [0] to [move v]\n        add [0] to [tick v]\n    end\n    repeat (9)\n        add [] to [game_info v]\n    end\nend\nbroadcast (Initiate  Physics  v)\nshow variable [timer v]\nshow variable [. v]\nset [timer v] to [0]\nset [skipped_level v] to [0]\nstop [this script v]\n\nwhen I receive [tick v]\nTick\n\ndefine Detect slope (x) (y) (x2) (y2) (size) (id#)\nDetect circle ((x) * (-1)) ((y) * (-1)) (size) (id#)\nDetect circle ((x2) * (-1)) ((y2) * (-1)) (size) (id#)\nif <<(((x) - ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (90)))) < ((x2) * (-1))> and <(((x) - ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (90)))) > ((x) * (-1))>> then\n    Detect circle (((x) - ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (90)))) ((((((y) - (y2)) / ((x) - (x2))) * (((((x) - ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (90)))) * (-1)) - (x))) + (y)) * (-1)) (size) (id#)\nend\nif <<(((x) + ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (90)))) < ((x2) * (-1))> and <(((x) + ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (90)))) > ((x) * (-1))>> then\n    Detect circle (((x) + ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (90)))) ((((((y) - (y2)) / ((x) - (x2))) * (((((x) + ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (90)))) * (-1)) - (x))) + (y)) * (-1)) (size) (id#)\nend\nif <<(((x) - ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (-90)))) < ((x2) * (-1))> and <(((x) - ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (-90)))) > ((x) * (-1))>> then\n    Detect circle (((x) - ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (-90)))) ((((((y) - (y2)) / ((x) - (x2))) * (((((x) - ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (-90)))) * (-1)) - (x))) + (y)) * (-1)) (size) (id#)\nend\nif <<(((x) + ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (-90)))) < ((x2) * (-1))> and <(((x) + ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (-90)))) > ((x) * (-1))>> then\n    Detect circle (((x) + ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (-90)))) ((((((y) - (y2)) / ((x) - (x2))) * (((((x) + ((player_size) / (2))) + (((size) / (2)) * (([atan v] of (((y) - (y2)) / ((x) - (x2))) ) / (-90)))) * (-1)) - (x))) + (y)) * (-1)) (size) (id#)\nend\n\ndefine Event listener [collision] Length (length) Height (height) Color (color) X (x) Y (y) Pen size (size) Hitbox (hitbox) Extra info (extra) X2 (x2) Y2 (y2) Range X (range_x) SpX (sp_x) Tick X (tick_x) Range Y (range_y) SpY (sp_y) Tick Y (tick_y) Collision type (collision_type)\nCollide (length) (height) (color) (x) (y) (size) (id#) (hitbox) (extra) (x2) (y2) (range_x) (sp_x) (tick_x) (range_y) (sp_y) (tick_y) (collision_type) (item (id#) of [touching v])\n\ndefine Move blocks (xs)\nif <[touching v] contains [2]?> then\n    stop [this script v]\nend\nProcess levels [tx2]\nCollide X [0] [cx2]\nif <[touching v] contains [2]?> then\n    stop [this script v]\nend\nif <(delta_x) = [0]> then\n    set [xs v] to [0]\nend\nchange [x v] by (xs)\nProcess levels [tx1]\nCollide X (xs) [cx1]\nset [xs v] to (xs)\nset [delta_x v] to [0]\n\ndefine Setup ID info for (level#) levels\nset [level v] to [1]\nadd [1] to [item1 v]\nrepeat (level#)\n    Process levels []\n    add (id#) to [item1 v]\n    change [level v] by (1)\nend\nset [level v] to [1]\n\ndefine Next?\nif <<(exit) = [next]> or <key (s v) pressed?>> then\n    if <key (s v) pressed?> then\n        set [skipped_level v] to [1]\n    end\n    broadcast (Next v)\nend\n\ndefine Set position\nset [score v] to [0]\nset [xs v] to [0]\nset [ys v] to [0]\nset [x v] to [0]\nset [y v] to [50]\n\ndefine Set subtitle\nif <(level) = [6]> then\n    set [. v] to (join (join (join [Level: ] (level)) [  ]) (join (join [Score: ] (score)) (join [/] [infinity])))\nelse\n    set [. v] to (join (join (join [Level: ] (level)) [  ]) (join (join [Score: ] (score)) (join [/] ((join (letter (((level) * (2)) - (1)) of (max_score)) (letter ((level) * (2)) of (max_score))) * (1)))))\nend\nif <(level) = [1]> then\n    set [. v] to (join [The easy beginning   ] (.))\nend\nif <(level) = [2]> then\n    set [. v] to (join [That got hard quickly! \(press s to skip\)  ] (.))\nend\nif <(level) = [3]> then\n    set [. v] to (join [Persistence is key  ] (.))\nend\nif <(level) = [4]> then\n    set [. v] to (join [Ooh, a maze!  Find the portal + coin  ] (.))\nend\nif <(level) = [5]> then\n    set [. v] to (join [Last level!  ] (.))\nend\nif <(level) = [6]> then\n    set [. v] to (join [You win!  ] (.))\nend\n\ndefine set max score to (max_score)\nif <(length of (max_score)) < [2]> then\n    set [max_score v] to (join (max_score) (join [0] (max_score)))\nelse\n    set [max_score v] to (join (max_score) (max_score))\nend\n\nwhen I receive [next v]\nstop [other scripts in sprite v]\nwait until <not <key (s v) pressed?>>\nProcess levels []\nSet position\nchange [level v] by (1)\nset [exit v] to []\nbroadcast (Initiate  Physics  v)\n\n@Intro\n\ndefine draw logo color (color) saturation (sat) brightness (intensity) transparency (opacity) X (x) Y (y) pen size (size)\ngo to x: (x) y: (y)\nset pen (color v) to (color)\nset pen (saturation v) to (sat)\nset pen (brightness v) to (intensity)\nset pen (transparency v) to (opacity)\nset pen size to (12)\npen down\nrepeat (100)\n    change y by (2)\n    change x by (0.675)\nend\nrepeat (12)\n    change y by (2)\n    change x by (1)\nend\nrepeat (12)\n    change y by (2)\n    change x by (1.5)\nend\nrepeat (12)\n    change y by (2)\n    change x by (2)\nend\nrepeat (12)\n    change y by (1.5)\n    change x by (2.5)\nend\nrepeat (12)\n    change y by (1)\n    change x by (3)\nend\nrepeat (3)\n    change y by (0.5)\n    change x by (4)\nend\nrepeat (12)\n    change x by (3)\nend\nrepeat (3)\n    change y by (-0.5)\n    change x by (4)\nend\nrepeat (12)\n    change y by (-1)\n    change x by (2.5)\nend\nrepeat (12)\n    change y by (-0.8)\n    change x by (1)\nend\nrepeat (12)\n    change y by (-1.3)\n    change x by (0.7)\nend\nrepeat (5)\n    change y by (-1.3)\n    change x by (0.7)\nend\nrepeat (5)\n    change y by (-2)\n    change x by (0.5)\nend\nrepeat (5)\n    change y by (-1.5)\n    change x by (0.1)\nend\nrepeat (12)\n    change y by (-1.5)\n    change x by (-0.27)\nend\nrepeat (113)\n    change y by (-2)\n    change x by (-0.675)\nend\nrepeat (45)\n    change x by (-2)\nend\nrepeat (95)\n    change y by (2)\n    change x by (0.675)\nend\nrepeat (23)\n    change y by (1)\n    change x by (-0.1)\nend\nrepeat (15)\n    change x by (-2)\nend\nrepeat (23)\n    change y by (-1)\n    change x by (-0.7)\nend\nrepeat (21)\n    change y by (-2)\n    change x by (-0.675)\nend\nrepeat (11)\n    change x by (2)\nend\nrepeat (43)\n    change y by (-2)\n    change x by (-0.675)\nend\nrepeat (11)\n    change x by (-2)\nend\nrepeat (30)\n    change y by (-2)\n    change x by (-0.675)\nend\nrepeat (42)\n    change x by (-2)\nend\npen up\n\nwhen flag clicked\nhide variable [. v]\nbroadcast (Skip v)\nset volume to (100) %\nstart sound [Epiphany v]\nreset timer\nerase all\nset [special_effects v] to [-300]\nrepeat until <(round (special_effects)) = [0]>\n    set [special_effects v] to ((special_effects) * (0.8))\n    erase all\n    draw bg\n    draw logo color [35] saturation [75] brightness [100] transparency [0] X ((-159) + (special_effects)) Y [-149] pen size [10]\nend\nset [special_effects v] to [150]\nwait (1) seconds\nrepeat (50)\n    change [special_effects v] by (-10)\n    erase all\n    intro effect 2 X (special_effects) Y [0]\n    intro effect 1\n    draw logo color [35] saturation [75] brightness [100] transparency [0] X [-159] Y [-149] pen size [10]\nend\nwait (4) seconds\nrepeat (50)\n    change [special_effects v] by (-10)\n    erase all\n    intro effect 2 X (special_effects) Y [0]\n    intro effect 1\n    draw logo color [35] saturation [75] brightness [100] transparency [0] X [-159] Y [-149] pen size [10]\nend\nwait (1) seconds\nset [special_effects v] to [100]\nrepeat (100)\n    change [special_effects v] by (-1)\n    erase all\n    draw bg\n    draw logo color [35] saturation [75] brightness (special_effects) transparency [0] X [-159] Y [-149] pen size [10]\nend\nwait (1) seconds\nset [special_effects v] to [0]\nrepeat (100)\n    change [special_effects v] by (1)\n    create clone of (_myself_ v)\n    Write name [50] [100] (special_effects) [0]\nend\nset [special_effects v] to [boom!]\nset [timer v] to [0]\nrepeat until <(timer) > [2]>\n    erase all\n    draw bg\n    Write name [50] [100] [100] [0]\nend\nset [special_effects v] to [100]\nrepeat (100)\n    change [special_effects v] by (-1)\n    erase all\n    Write name [50] [100] (special_effects) [0]\n    change volume by (-1)\nend\nbroadcast (Begin v)\nbroadcast (Music v)\n\ndefine draw bg\nset x to (0)\nset pen color to (#000000)\nset pen size to (1000000000000000000)\npen down\npen up\n\ndefine intro effect 1\nset pen color to (#000000)\nset pen size to (250)\ngo to x: (-290) y: (-150)\npen down\ngo to x: (-205) y: (100)\ngo to x: (-195) y: (120)\ngo to x: (-185) y: (135)\ngo to x: (-175) y: (150)\ngo to x: (-165) y: (165)\ngo to x: (-155) y: (180)\ngo to x: (-145) y: (190)\ngo to x: (-135) y: (200)\ngo to x: (-35) y: (275)\nset x to (100)\ngo to x: (155) y: (265)\ngo to x: (190) y: (245)\ngo to x: (215) y: (220)\ngo to x: (225) y: (205)\ngo to x: (240) y: (180)\ngo to x: (295) y: (150)\ngo to x: (155) y: (-275)\nset x to (-150)\npen up\nset x to (-95)\nset pen size to (45)\npen down\ngo to x: (-32) y: (-110)\nset pen size to (20)\nset x to (-25)\ngo to x: (12) y: (0)\npen up\nset pen size to (45)\ngo to x: (5) y: (10)\npen down\ngo to x: (18) y: (40)\npen up\n\ndefine intro effect 2 X (x) Y (y)\ndraw bg\nset pen size to (5)\nset pen (color v) to (35)\nset pen (brightness v) to (0)\nset pen (saturation v) to (75)\ngo to x: (x) y: ((y) - (150))\nrepeat (100)\n    change pen (brightness v) by (1)\n    change x by (2)\n    set y to ((y) - (150))\n    pen down\n    set y to ((y) + (150))\n    pen up\nend\nrepeat (150)\n    change x by (2)\n    set y to ((y) - (150))\n    pen down\n    set y to ((y) + (150))\n    pen up\nend\nrepeat (100)\n    change pen (brightness v) by (-1)\n    change x by (2)\n    set y to ((y) - (150))\n    pen down\n    set y to ((y) + (150))\n    pen up\nend\n\ndefine Write name (color) (sat) (intensity) (opacity)\nerase all\ndraw bg\nset pen (color v) to (color)\nset pen (saturation v) to (sat)\nset pen (brightness v) to (intensity)\nset pen (transparency v) to (opacity)\nset pen size to (10)\ngo to x: (-205) y: (15)\npoint in direction (90)\npen down\nmove (30) steps\nrepeat (2)\n    turn right (90) degrees\n    move (30) steps\nend\nturn left (90) degrees\nmove (30) steps\npoint in direction (90)\nmove (30) steps\npen up\nchange x by (15)\npoint in direction (15)\npen down\nmove (60) steps\npoint in direction (165)\nmove (60) steps\nmove (-10) steps\npoint in direction (-90)\nchange x by (-20)\npen up\ngo to x: (-110) y: (15)\npoint in direction (180)\npen down\nmove (60) steps\ngo to x: (-110) y: (15)\npoint in direction (165)\nmove (60) steps\npoint in direction (15)\nmove (60) steps\npoint in direction (180)\nmove (60) steps\npen up\nchange x by (15)\npoint in direction (15)\npen down\nmove (60) steps\npoint in direction (165)\nmove (60) steps\nmove (-10) steps\npoint in direction (-90)\nchange x by (-20)\npen up\ngo to x: (-10) y: (-45)\npoint in direction (0)\npen down\nmove (60) steps\nturn right (90) degrees\nmove (15) steps\nmove (-30) steps\npen up\ngo to x: (20) y: (-45)\npoint in direction (0)\npen down\nmove (60) steps\nturn right (90) degrees\nmove (30) steps\nrepeat (2)\n    set x to (20)\n    change y by (-30)\n    move (30) steps\nend\npen up\ngo to x: (75) y: (15)\npoint in direction (180)\npen down\nmove (60) steps\nturn left (90) degrees\nmove (30) steps\nturn left (90) degrees\nmove (60) steps\npen up\ngo to x: (125) y: (-45)\npoint in direction (0)\npen down\nmove (60) steps\nrepeat (3)\n    turn right (90) degrees\n    move (30) steps\nend\npoint in direction (140)\nmove (38) steps\npen up\ngo to x: (205) y: (15)\npoint in direction (-90)\npen down\nmove (30) steps\nrepeat (2)\n    turn left (90) degrees\n    move (30) steps\nend\nturn right (90) degrees\nmove (30) steps\npoint in direction (-90)\nmove (30) steps\npen up\n\nwhen I receive [skip v]\nwait until <mouse down?>\nstop [other scripts in sprite v]\nbroadcast (Begin v)\nbroadcast (Music v)\n\ndefine boom (xs) (ys) (size) (loop#)\nif <(loop#) = [0]> then\n    go to x: (pick random (-180) to (180)) y: (-300)\nelse\n    change x by (xs)\n    change y by (ys)\n    if <<(pick random (1) to (50)) = [1]> and <(special_effects) = [boom!]>> then\n        create clone of (_myself_ v)\n    end\nend\ndraw particle (size)\nif <(loop#) > [75]> then\n    delete this clone\nelse\n    boom (xs) ((ys) - (1)) (size) ((loop#) + (1))\nend\n\nwhen I start as a clone\nif <(pick random (1) to (2)) = [1]> then\n    delete this clone\nend\nwait until <(special_effects) = [boom!]>\nwait (0.5) seconds\nboom (pick random (-7) to (7)) (pick random (20) to (30)) (pick random (10) to (15)) [0]\n\ndefine draw particle (size)\nset pen (transparency v) to (0)\nset pen color to (#3fff00)\nset pen size to (1)\npen down\nrepeat (size)\n    change pen size by (1)\n    change pen (transparency v) by (3)\n    pen down\nend\npen up\n\nwhen I receive [begin v]\ndelete this clone\n\nwhen I receive [music v]\nstop all sounds\nwait (1) seconds\nset volume to (100) %\nforever\n    play sound [Furious Freak v] until done\nend\n\n@Thumnbail\n\nwhen flag clicked\nhide\nset [level v] to [1]\nhide variable [timer v]\nset [timer v] to [0]\nrepeat until <(level) = [6]>\n    change [timer v] by (timer)\n    reset timer\nend\nif <<<(round (timer)) < (☁ Highscore)> and <(skipped_level) = [0]>> and <not <<(username) = [2Amateurs]> or <(username) = [Amateur-Testing]>>>> then\n    set [☁ highscore v] to (round (timer))\nend\nif <(timer) = (☁ Highscore)> then\n    set [timer v] to (join (join (join [Time: ] (timer)) [s]) [  Wow, a new world record!!!])\nelse\n    set [timer v] to (join (join [Time: ] (timer)) [s])\n    if <(skipped_level) = [1]> then\n        set [timer v] to (join (timer) [  Your time is not official since you skipped a level])\n    end\nend\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.1)\nhide variable [. v]\nhide variable [timer v]\nset size to [100] %\nshow\nset x to (0)\nset y to (415)\nsmooth glide [-37]\n\ndefine smooth glide (ys)\nswitch costume to (sizer v)\nchange y by (ys)\nswitch costume to (thumbnail v)\nif <not <(round ((ys) * (5))) = [0]>> then\n    go to [front v] layer\n    smooth glide ((ys) * (0.8))\nend\n\ndefine set size to (size) %\nswitch costume to (sizer v)\nset size to (size) %\n\n
~READ ALL BELOW~\n\n*Instructions*\n-Arrow or mouse to move\n-S to skip level (Your time won't count if you do)\n\nI named this "unfinished" because I made it with my unfinished pen engine.  Expect that soon.\n\nCurrent world record holder: @al-al with a time of 75.636s\n\nI set up the high score code in such a way that neither my main or test account can get a high score (how nice of me) \n\nYou can, however, try to beat my personal record of 70.223s :D