3D Platformer Engine! 100% Pen! Make your own 3D Platformer Games! Version 2.1 #All #Games #Art
@Stage\n\nwhen flag clicked\nset volume to (50) %\nforever\n    play sound (pick random (1) to (10)) until done\nend\n\nwhen flag clicked\nset [background v] to [1]\nforever\n    if <key (b v) pressed?> then\n        if <(background) = [1]> then\n            set [background v] to [2]\n        else\n            set [background v] to [1]\n        end\n    end\n    wait until <not <key (b v) pressed?>>\nend\n\nwhen flag clicked\nforever\n    if <(background) = [2]> then\n        set [brightness v] effect to (100)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\n@Blank\n\n@Engine\n\ndefine Set Point 1: (x1) (y1) (z1)\nset [x1 v] to (x1)\nset [y1 v] to (y1)\nset [z1 v] to (z1)\n\ndefine Check for Solid Hitbox | x: (x) y: (y) z: (z) player height: (height)\nif <<(cam y) > [-20]> and <(cam y) < [0]>> then\n    set [hitbox detected? v] to [1]\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat ((length of [solid hitboxes v]) / (6))\n    if <<(x) > (item ((i) + (1)) of [solid hitboxes v])> and <(x) < (item ((i) + (2)) of [solid hitboxes v])>> then\n        if <<(y) > (item ((i) + (3)) of [solid hitboxes v])> and <((y) - (height)) < (item ((i) + (4)) of [solid hitboxes v])>> then\n            if <<(z) > (item ((i) + (5)) of [solid hitboxes v])> and <(z) < (item ((i) + (6)) of [solid hitboxes v])>> then\n                set [hitbox detected? v] to [1]\n                stop [this script v]\n            end\n        end\n    end\n    change [i v] by (6)\nend\nset [hitbox detected? v] to [0]\n\ndefine Add Hitbox | x: (x1) (x2) y: (y1) (y2) z: (z1) (z2)\nif <(x1) < (x2)> then\n    add (x1) to [solid hitboxes v]\n    add (x2) to [solid hitboxes v]\nelse\n    add (x2) to [solid hitboxes v]\n    add (x1) to [solid hitboxes v]\nend\nif <(y1) < (y2)> then\n    add (y1) to [solid hitboxes v]\n    add (y2) to [solid hitboxes v]\nelse\n    add (y2) to [solid hitboxes v]\n    add (y1) to [solid hitboxes v]\nend\nif <(z1) < (z2)> then\n    add (z1) to [solid hitboxes v]\n    add (z2) to [solid hitboxes v]\nelse\n    add (z2) to [solid hitboxes v]\n    add (z1) to [solid hitboxes v]\nend\n\ndefine Platform at x: (x) y: (y) z: (z)\nset pen color to (#005dff)\nset pen (transparency v) to (0)\n--- [Back of Cube]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) - (50)) ((z) + (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) - (50)) ((z) + (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) + (50)) ((z) + (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) + (50)) ((z) + (50))\n--- [Front of Cube]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) - (50)) to ((x) + (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) - (50)) to ((x) - (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) - (50)) to ((x) - (50)) ((y) + (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) - (50)) to ((x) + (50)) ((y) + (50)) ((z) - (50))\n--- [Lines from Front to Back]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) + (50)) ((z) - (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) + (50)) to ((x) + (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) + (50)) to ((x) - (50)) ((y) + (50)) ((z) - (50))\n--- [Hitbox of Cube]\nAdd Hitbox | x: ((x) - (50)) ((x) + (50)) y: ((y) - (50)) ((y) + (50)) z: ((z) - (50)) ((z) + (50))\n\ndefine Level\nPlatform at x: [0] y: [0] z: [-100]\nif <(difficulty) = [easy]> then\n    if <(Level) = [1]> then\n        Water Platform at x: [-100] y: [0] z: [0]\n        Water Platform at x: [-100] y: [100] z: [0]\n        Water Platform at x: [-100] y: [200] z: [0]\n        Platform at x: [0] y: [0] z: [0]\n        Platform at x: [0] y: [0] z: [100]\n        Trap Platform at x: [100] y: [0] z: [100]\n        Trap Platform at x: [200] y: [0] z: [100]\n        Bounce Platform at x: [100] y: [0] z: [0]\n        End Platform at x: [0] y: [0] z: [200]\n    else\n        if <(Level) = [2]> then\n            Platform at x: [0] y: [100] z: [100]\n            Trap Platform at x: [200] y: [0] z: [100]\n            Bounce Platform at x: [100] y: [0] z: [0]\n            End Platform at x: [0] y: [200] z: [300]\n        else\n            if <(Level) = [3]> then\n                Platform at x: [0] y: [100] z: [100]\n                Trap Platform at x: [0] y: [0] z: [100]\n                Trap Platform at x: [0] y: [200] z: [200]\n                End Platform at x: [0] y: [200] z: [300]\n            else\n                if <(Level) = [4]> then\n                    Platform at x: [50] y: [100] z: [100]\n                    Trap Platform at x: [0] y: [0] z: [100]\n                    Trap Platform at x: [0] y: [200] z: [200]\n                    Bounce Platform at x: [0] y: [200] z: [300]\n                    End Platform at x: [0] y: [500] z: [650]\n                else\n                    if <(Level) = [5]> then\n                        Platform at x: [0] y: [100] z: [-200]\n                        Platform at x: [0] y: [200] z: [-300]\n                        Platform at x: [0] y: [100] z: [0]\n                        Platform at x: [0] y: [200] z: [0]\n                        Trap Platform at x: [0] y: [0] z: [100]\n                        Trap Platform at x: [0] y: [200] z: [200]\n                        Bounce Platform at x: [0] y: [200] z: [300]\n                        End Platform at x: [0] y: [500] z: [650]\n                    end\n                end\n            end\n        end\n    end\nend\nif <(difficulty) = [medium]> then\n    if <(Level) = [1]> then\n        Platform at x: [0] y: [100] z: [100]\n        Platform at x: [0] y: [200] z: [400]\n        Water Platform at x: [0] y: [0] z: [600]\n        Water Platform at x: [0] y: [0] z: [700]\n        Water Platform at x: [0] y: [0] z: [800]\n        Water Platform at x: [0] y: [0] z: [900]\n        Trap Platform at x: [100] y: [0] z: [100]\n        Trap Platform at x: [200] y: [0] z: [100]\n        Bounce Platform at x: [100] y: [0] z: [0]\n        End Platform at x: [0] y: [0] z: [1000]\n    else\n        if <(Level) = [2]> then\n            Trap Platform at x: [0] y: [0] z: [100]\n            Trap Platform at x: [100] y: [0] z: [100]\n            Trap Platform at x: [200] y: [0] z: [100]\n            Bounce Platform at x: [100] y: [0] z: [0]\n            End Platform at x: [0] y: [200] z: [350]\n        else\n            if <(Level) = [3]> then\n                Platform at x: [0] y: [100] z: [100]\n                Bounce Platform at x: [-50] y: [100] z: [100]\n                Bounce Platform at x: [50] y: [100] z: [100]\n                Trap Platform at x: [0] y: [0] z: [0]\n                Trap Platform at x: [0] y: [0] z: [100]\n                Water Platform at x: [0] y: [100] z: [0]\n                Trap Platform at x: [0] y: [200] z: [200]\n                End Platform at x: [0] y: [200] z: [550]\n            else\n                if <(Level) = [4]> then\n                    Platform at x: [50] y: [100] z: [100]\n                    Trap Platform at x: [0] y: [0] z: [100]\n                    Trap Platform at x: [0] y: [200] z: [200]\n                    Bounce Platform at x: [100] y: [200] z: [400]\n                    End Platform at x: [0] y: [500] z: [750]\n                else\n                    if <(Level) = [5]> then\n                        Water Platform at x: [0] y: [100] z: [0]\n                        Water Platform at x: [0] y: [200] z: [0]\n                        Water Platform at x: [0] y: [100] z: [100]\n                        Water Platform at x: [0] y: [200] z: [100]\n                        Water Platform at x: [0] y: [100] z: [200]\n                        Water Platform at x: [0] y: [200] z: [200]\n                        Water Platform at x: [100] y: [100] z: [200]\n                        Water Platform at x: [-100] y: [200] z: [200]\n                        Water Platform at x: [100] y: [100] z: [300]\n                        Water Platform at x: [-100] y: [200] z: [300]\n                        Trap Platform at x: [0] y: [0] z: [100]\n                        Trap Platform at x: [0] y: [200] z: [200]\n                        Bounce Platform at x: [0] y: [200] z: [300]\n                        End Platform at x: [0] y: [500] z: [700]\n                    end\n                end\n            end\n        end\n    end\nend\nif <(difficulty) = [hard]> then\n    if <(Level) = [1]> then\n        Water Platform at x: [0] y: [0] z: [0]\n        Water Platform at x: [0] y: [200] z: [0]\n        Water Platform at x: [0] y: [200] z: [100]\n        Water Platform at x: [0] y: [200] z: [200]\n        Water Platform at x: [0] y: [200] z: [300]\n        Platform at x: [0] y: [0] z: [0]\n        Platform at x: [0] y: [0] z: [100]\n        Trap Platform at x: [100] y: [0] z: [100]\n        Trap Platform at x: [200] y: [0] z: [100]\n        Bounce Platform at x: [0] y: [0] z: [500]\n        End Platform at x: [0] y: [0] z: [1000]\n    else\n        if <(Level) = [2]> then\n            Platform at x: [0] y: [100] z: [100]\n            Platform at x: [0] y: [200] z: [100]\n            Platform at x: [0] y: [300] z: [100]\n            Platform at x: [0] y: [350] z: [100]\n            Trap Platform at x: [200] y: [0] z: [100]\n            Bounce Platform at x: [0] y: [0] z: [0]\n            End Platform at x: [0] y: [200] z: [575]\n        else\n            if <(Level) = [3]> then\n                Platform at x: [0] y: [100] z: [50]\n                Platform at x: [0] y: [100] z: [100]\n                Trap Platform at x: [0] y: [0] z: [100]\n                Trap Platform at x: [0] y: [100] z: [200]\n                End Platform at x: [0] y: [200] z: [500]\n            else\n                if <(Level) = [4]> then\n                    Platform at x: [50] y: [100] z: [100]\n                    Trap Platform at x: [0] y: [120] z: [100]\n                    Trap Platform at x: [0] y: [200] z: [200]\n                    Bounce Platform at x: [0] y: [200] z: [300]\n                    End Platform at x: [0] y: [500] z: [650]\n                else\n                    if <(Level) = [5]> then\n                        Platform at x: [0] y: [100] z: [-200]\n                        Platform at x: [0] y: [200] z: [-300]\n                        Platform at x: [0] y: [100] z: [0]\n                        Platform at x: [0] y: [200] z: [0]\n                        Trap Platform at x: [0] y: [0] z: [100]\n                        Trap Platform at x: [0] y: [200] z: [200]\n                        Bounce Platform at x: [0] y: [200] z: [300]\n                        End Platform at x: [0] y: [500] z: [760]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Set Point 1: (x1) (y1) (z1)\nset [x1 v] to (x1)\nset [y1 v] to (y1)\nset [z1 v] to (z1)\n\ndefine Set Point 2: (x2) (y2) (z2)\nset [x2 v] to (x2)\nset [y2 v] to (y2)\nset [z2 v] to (z2)\n\ndefine Draw Line (x1) (y1) (z1) to (x2) (y2) (z2)\nSet Point 1: ((x1) - (cam x)) ((y1) - (cam y)) ((z1) - (cam z))\nSet Point 2: ((x2) - (cam x)) ((y2) - (cam y)) ((z2) - (cam z))\nSet Point 1: (((z1) * (sin Y)) + ((x1) * (cos Y))) (y1) (((z1) * (cos Y)) - ((x1) * (sin Y)))\nSet Point 2: (((z2) * (sin Y)) + ((x2) * (cos Y))) (y2) (((z2) * (cos Y)) - ((x2) * (sin Y)))\nSet Point 1: (x1) (((y1) * (cos X)) - ((z1) * (sin X))) (((y1) * (sin X)) + ((z1) * (cos X)))\nSet Point 2: (x2) (((y2) * (cos X)) - ((z2) * (sin X))) (((y2) * (sin X)) + ((z2) * (cos X)))\nif <not <<(z1) < [0]> and <(z2) < [0]>>> then\n    Z Clipping\n    Set Screen Point 1: ((FOV) * ((x1) / (z1))) ((FOV) * ((y1) / (z1)))\n    Set Screen Point 2: ((FOV) * ((x2) / (z2))) ((FOV) * ((y2) / (z2)))\n    XY Clipping\n    go to x: (x1) y: (y1)\n    pen down\n    go to x: (x2) y: (y2)\n    pen up\nend\n\ndefine Set Screen Point 1: (x1) (y1)\nset [x1 v] to (x1)\nset [y1 v] to (y1)\n\ndefine Set Screen Point 2: (x2) (y2)\nset [x2 v] to (x2)\nset [y2 v] to (y2)\n\nwhen I receive [c v]\nswitch costume to (vector blank v)\nset pen size to (8)\nshow list [end hitboxes v]\nshow list [solid hitboxes v]\nshow list [bad hitboxes v]\nshow list [bounce hitboxes v]\nset [time : v] to [0]\nset [fov v] to [200]\nset [level v] to [1]\nhide variable [cam x v]\nhide variable [cam y v]\nhide variable [cam z v]\nhide variable [rot x v]\nhide variable [rot y v]\nhide variable [level v]\nshow variable [time : v]\nshow variable [mouse sensivity v]\nReset\nforever\n    set [falling? v] to [0]\n    erase all\n    Render\n    if <<key (w v) pressed?> or <(STICK Y) > [0.5]>> then\n        change [cam z vel v] by ((1) * ((cam speed) * (cos Y)))\n        change [cam x vel v] by ((-1) * ((cam speed) * (sin Y)))\n    end\n    if <<key (s v) pressed?> or <(STICK Y) < [-0.5]>> then\n        change [cam z vel v] by ((-1) * ((cam speed) * (cos Y)))\n        change [cam x vel v] by ((1) * ((cam speed) * (sin Y)))\n    end\n    if <<key (a v) pressed?> or <(STICK X) < [-0.5]>> then\n        change [cam z vel v] by ((-1) * ((cam speed) * (sin Y)))\n        change [cam x vel v] by ((-1) * ((cam speed) * (cos Y)))\n    end\n    if <<key (d v) pressed?> or <(STICK X) > [0.5]>> then\n        change [cam z vel v] by ((1) * ((cam speed) * (sin Y)))\n        change [cam x vel v] by ((1) * ((cam speed) * (cos Y)))\n    end\n    if <(Falling?) = [0]> then\n        change [cam y vel v] by (-1)\n    end\n    set [cam x vel v] to ((cam x vel) * (0.6))\n    set [cam y vel v] to ((cam y vel) * (0.99))\n    set [cam z vel v] to ((cam z vel) * (0.6))\n    change [cam x v] by (cam x vel)\n    Check for Solid Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [1]> then\n        set [falling? v] to [1]\n        change [cam x v] by ((0) - (cam x vel))\n        set [cam x vel v] to ((0.3) * (cam x vel))\n    end\n    Check for Bad Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [2]> then\n        Reset\n    end\n    Check for Bounce Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [3]> then\n        start sound [Jump v]\n        set [cam y vel v] to ((Jump Height) * (1.5))\n    end\n    Check for End Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [4]> then\n        start sound [ding v]\n        change [level v] by (1)\n        Reset\n    end\n    Check for Water Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [5]> then\n        set [falling? v] to [1]\n        set [cam y vel v] to ((cam y vel) * (0.9))\n        set [cam x vel v] to ((cam x vel) * (0.5))\n        set [cam z vel v] to ((cam z vel) * (0.5))\n        if <key (space v) pressed?> then\n            change [cam y vel v] by (1)\n        end\n    end\n    change [cam y v] by (cam y vel)\n    Check for Solid Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [1]> then\n        set [falling? v] to [1]\n        change [cam y v] by ((0) - (cam y vel))\n        set [cam y vel v] to ((0.3) * (cam y vel))\n        if <<<key (space v) pressed?> or <(Jump?) = [1]>> and <(cam y vel) < [0]>> then\n            start sound [Jump v]\n            set [cam y vel v] to (Jump Height)\n        end\n    end\n    Check for Bad Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [2]> then\n        Reset\n    end\n    Check for Bounce Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [3]> then\n        start sound [Jump v]\n        set [cam y vel v] to ((Jump Height) * (1.5))\n    end\n    Check for End Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [4]> then\n        start sound [ding v]\n        change [level v] by (1)\n        Reset\n    end\n    Check for Water Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [5]> then\n        set [falling? v] to [1]\n        set [cam y vel v] to ((cam y vel) * (0.9))\n        set [cam x vel v] to ((cam x vel) * (0.5))\n        set [cam z vel v] to ((cam z vel) * (0.5))\n        if <key (space v) pressed?> then\n            change [cam y vel v] by (1)\n        end\n    end\n    change [cam z v] by (cam z vel)\n    Check for Solid Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [1]> then\n        set [falling? v] to [1]\n        change [cam z v] by ((0) - (cam z vel))\n        set [cam z vel v] to ((0.3) * (cam z vel))\n    end\n    Check for Bad Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [2]> then\n        Reset\n    end\n    Check for Bounce Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [3]> then\n        start sound [Jump v]\n        set [cam y vel v] to ((Jump Height) * (1.5))\n    end\n    Check for End Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [4]> then\n        start sound [ding v]\n        change [level v] by (1)\n        Reset\n    end\n    Check for Water Hitbox | x: (cam x) y: (cam y) z: (cam z) player height: (Player Height)\n    if <(Hitbox Detected?) = [5]> then\n        set [falling? v] to [1]\n        set [cam y vel v] to ((cam y vel) * (0.9))\n        set [cam x vel v] to ((cam x vel) * (0.5))\n        set [cam z vel v] to ((cam z vel) * (0.5))\n        if <key (space v) pressed?> then\n            change [cam y vel v] by (1)\n        end\n    end\n    if <(device) = [PC]> then\n        if <(MODE) = [1]> then\n            set [rot x v] to ((mouse sensivity) * (mouse y))\n            set [rot y v] to (((0) - (mouse sensivity)) * (mouse x))\n        else\n            if <key (up arrow v) pressed?> then\n                change [rot x v] by (3)\n            end\n            if <key (down arrow v) pressed?> then\n                change [rot x v] by (-3)\n            end\n            if <key (right arrow v) pressed?> then\n                change [rot y v] by (-3)\n            end\n            if <key (left arrow v) pressed?> then\n                change [rot y v] by (3)\n            end\n        end\n    end\n    if <(device) = [Mobile]> then\n        if <(STICK X2) > [0.5]> then\n            set [rot y v] to ((rot Y) + (-3))\n        end\n        if <(STICK Y2) > [0.5]> then\n            set [rot x v] to ((rot X) + (3))\n        end\n        if <(STICK X2) < [-0.5]> then\n            set [rot y v] to ((rot Y) + (3))\n        end\n        if <(STICK Y2) < [-0.5]> then\n            set [rot x v] to ((rot X) + (-3))\n        end\n    end\n    if <(cam y) < [50]> then\n        Reset\n    end\nend\n\ndefine Render\nTrig Values\ndelete all of [water hitboxes v]\ndelete all of [solid hitboxes v]\ndelete all of [bad hitboxes v]\ndelete all of [bounce hitboxes v]\ndelete all of [end hitboxes v]\nLevel\n\ndefine Z Clipping\nif <<(z1) < [0]> or <(z2) < [0]>> then\n    set [percent v] to (((0) - (z1)) / ((z2) - (z1)))\n    if <(z1) < [0]> then\n        Set Point 1: ((x1) + (((x2) - (x1)) * (percent))) ((y1) + (((y2) - (y1)) * (percent))) (0)\n    else\n        if <(z2) < [0]> then\n            Set Point 2: ((x1) + (((x2) - (x1)) * (percent))) ((y1) + (((y2) - (y1)) * (percent))) (0)\n        end\n    end\nend\n\ndefine XY Clipping\nset [m v] to (((y2) - (y1)) / ((x2) - (x1)))\nif <(x1) > [240]> then\n    if <(x2) > [240]> then\n        stop [this script v]\n    else\n        Set Screen Point 1: (240) ((y1) + (((240) - (x1)) * (m)))\n    end\nend\nif <(y1) > [180]> then\n    if <(y2) > [180]> then\n        stop [this script v]\n    else\n        Set Screen Point 1: ((x1) + (((180) - (y1)) / (m))) (180)\n    end\nend\nif <(x1) < [-240]> then\n    if <(x2) < [-240]> then\n        stop [this script v]\n    else\n        Set Screen Point 1: (-240) ((y1) + (((-240) - (x1)) * (m)))\n    end\nend\nif <(y1) < [-180]> then\n    if <(y2) < [-180]> then\n        stop [this script v]\n    else\n        Set Screen Point 1: ((x1) + (((-180) - (y1)) / (m))) (-180)\n    end\nend\nif <(x2) > [240]> then\n    Set Screen Point 2: (240) ((y1) + (((240) - (x1)) * (m)))\nend\nif <(y2) > [180]> then\n    Set Screen Point 2: ((x1) + (((180) - (y1)) / (m))) (180)\nend\nif <(x2) < [-240]> then\n    Set Screen Point 2: (-240) ((y1) + (((-240) - (x1)) * (m)))\nend\nif <(y2) < [-180]> then\n    Set Screen Point 2: ((x1) + (((-180) - (y1)) / (m))) (-180)\nend\n\ndefine --- (label)\n\ndefine Trig Values\nset [sin x v] to ([sin v] of (rot X) )\nset [cos x v] to ([cos v] of (rot X) )\nset [sin y v] to ([sin v] of (rot Y) )\nset [cos y v] to ([cos v] of (rot Y) )\n\ndefine Trap Platform at x: (x) y: (y) z: (z)\nset pen color to (#ff0000)\nset pen (transparency v) to (0)\n--- [Back of Cube]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) - (50)) ((z) + (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) - (50)) ((z) + (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) + (50)) ((z) + (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) + (50)) ((z) + (50))\n--- [Front of Cube]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) - (50)) to ((x) + (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) - (50)) to ((x) - (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) - (50)) to ((x) - (50)) ((y) + (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) - (50)) to ((x) + (50)) ((y) + (50)) ((z) - (50))\n--- [Lines from Front to Back]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) + (50)) ((z) - (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) + (50)) to ((x) + (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) + (50)) to ((x) - (50)) ((y) + (50)) ((z) - (50))\n--- [Hitbox of Cube]\nAdd Bad Hitbox | x: ((x) - (50)) ((x) + (50)) y: ((y) - (50)) ((y) + (50)) z: ((z) - (50)) ((z) + (50))\n\ndefine Add Bad Hitbox | x: (x1) (x2) y: (y1) (y2) z: (z1) (z2)\nif <(x1) < (x2)> then\n    add (x1) to [bad hitboxes v]\n    add (x2) to [bad hitboxes v]\nelse\n    add (x2) to [bad hitboxes v]\n    add (x1) to [bad hitboxes v]\nend\nif <(y1) < (y2)> then\n    add (y1) to [bad hitboxes v]\n    add (y2) to [bad hitboxes v]\nelse\n    add (y2) to [bad hitboxes v]\n    add (y1) to [bad hitboxes v]\nend\nif <(z1) < (z2)> then\n    add (z1) to [bad hitboxes v]\n    add (z2) to [bad hitboxes v]\nelse\n    add (z2) to [bad hitboxes v]\n    add (z1) to [bad hitboxes v]\nend\n\ndefine Check for Bad Hitbox | x: (x) y: (y) z: (z) player height: (height)\nif <<(cam y) > [-20]> and <(cam y) < [0]>> then\n    set [hitbox detected? v] to [2]\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat ((length of [bad hitboxes v]) / (6))\n    if <<(x) > (item ((i) + (1)) of [bad hitboxes v])> and <(x) < (item ((i) + (2)) of [bad hitboxes v])>> then\n        if <<(y) > (item ((i) + (3)) of [bad hitboxes v])> and <((y) - (height)) < (item ((i) + (4)) of [bad hitboxes v])>> then\n            if <<(z) > (item ((i) + (5)) of [bad hitboxes v])> and <(z) < (item ((i) + (6)) of [bad hitboxes v])>> then\n                set [hitbox detected? v] to [2]\n                stop [this script v]\n            end\n        end\n    end\n    change [i v] by (6)\nend\nset [hitbox detected? v] to [0]\n\ndefine Reset\nset [cam x v] to [0]\nset [cam y v] to [300]\nset [cam z v] to [-100]\nset [cam x vel v] to [0]\nset [cam y vel v] to [0]\nset [cam z vel v] to [0]\nset [rot x v] to [0]\nset [rot y v] to [0]\nThing you CAN touch\n\ndefine Bounce Platform at x: (x) y: (y) z: (z)\nset pen color to (#faff00)\nset pen (transparency v) to (0)\n--- [Back of Cube]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) - (50)) ((z) + (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) - (50)) ((z) + (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) + (50)) ((z) + (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) + (50)) ((z) + (50))\n--- [Front of Cube]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) - (50)) to ((x) + (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) - (50)) to ((x) - (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) - (50)) to ((x) - (50)) ((y) + (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) - (50)) to ((x) + (50)) ((y) + (50)) ((z) - (50))\n--- [Lines from Front to Back]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) + (50)) ((z) - (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) + (50)) to ((x) + (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) + (50)) to ((x) - (50)) ((y) + (50)) ((z) - (50))\n--- [Hitbox of Cube]\nAdd Bounce Hitbox | x: ((x) - (50)) ((x) + (50)) y: ((y) - (50)) ((y) + (50)) z: ((z) - (50)) ((z) + (50))\n\ndefine Add Bounce Hitbox | x: (x1) (x2) y: (y1) (y2) z: (z1) (z2)\nif <(x1) < (x2)> then\n    add (x1) to [bounce hitboxes v]\n    add (x2) to [bounce hitboxes v]\nelse\n    add (x2) to [bounce hitboxes v]\n    add (x1) to [bounce hitboxes v]\nend\nif <(y1) < (y2)> then\n    add (y1) to [bounce hitboxes v]\n    add (y2) to [bounce hitboxes v]\nelse\n    add (y2) to [bounce hitboxes v]\n    add (y1) to [bounce hitboxes v]\nend\nif <(z1) < (z2)> then\n    add (z1) to [bounce hitboxes v]\n    add (z2) to [bounce hitboxes v]\nelse\n    add (z2) to [bounce hitboxes v]\n    add (z1) to [bounce hitboxes v]\nend\n\ndefine Check for Bounce Hitbox | x: (x) y: (y) z: (z) player height: (height)\nif <<(cam y) > [-20]> and <(cam y) < [0]>> then\n    set [hitbox detected? v] to [3]\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat ((length of [bounce hitboxes v]) / (6))\n    if <<(x) > (item ((i) + (1)) of [bounce hitboxes v])> and <(x) < (item ((i) + (2)) of [bounce hitboxes v])>> then\n        if <<(y) > (item ((i) + (3)) of [bounce hitboxes v])> and <((y) - (height)) < (item ((i) + (4)) of [bounce hitboxes v])>> then\n            if <<(z) > (item ((i) + (5)) of [bounce hitboxes v])> and <(z) < (item ((i) + (6)) of [bounce hitboxes v])>> then\n                set [hitbox detected? v] to [3]\n                stop [this script v]\n            end\n        end\n    end\n    change [i v] by (6)\nend\nset [hitbox detected? v] to [0]\n\ndefine End Platform at x: (x) y: (y) z: (z)\nset pen color to (#00ff2e)\nset pen (transparency v) to (0)\n--- [Back of Cube]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) - (50)) ((z) + (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) - (50)) ((z) + (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) + (50)) ((z) + (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) + (50)) ((z) + (50))\n--- [Front of Cube]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) - (50)) to ((x) + (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) - (50)) to ((x) - (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) - (50)) to ((x) - (50)) ((y) + (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) - (50)) to ((x) + (50)) ((y) + (50)) ((z) - (50))\n--- [Lines from Front to Back]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) + (50)) ((z) - (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) + (50)) to ((x) + (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) + (50)) to ((x) - (50)) ((y) + (50)) ((z) - (50))\n--- [Hitbox of Cube]\nAdd End Hitbox | x: ((x) - (50)) ((x) + (50)) y: ((y) - (50)) ((y) + (50)) z: ((z) - (50)) ((z) + (50))\n\ndefine Add End Hitbox | x: (x1) (x2) y: (y1) (y2) z: (z1) (z2)\nif <(x1) < (x2)> then\n    add (x1) to [end hitboxes v]\n    add (x2) to [end hitboxes v]\nelse\n    add (x2) to [end hitboxes v]\n    add (x1) to [end hitboxes v]\nend\nif <(y1) < (y2)> then\n    add (y1) to [end hitboxes v]\n    add (y2) to [end hitboxes v]\nelse\n    add (y2) to [end hitboxes v]\n    add (y1) to [end hitboxes v]\nend\nif <(z1) < (z2)> then\n    add (z1) to [end hitboxes v]\n    add (z2) to [end hitboxes v]\nelse\n    add (z2) to [end hitboxes v]\n    add (z1) to [end hitboxes v]\nend\n\ndefine Check for End Hitbox | x: (x) y: (y) z: (z) player height: (height)\nif <<(cam y) > [-20]> and <(cam y) < [0]>> then\n    set [hitbox detected? v] to [4]\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat ((length of [end hitboxes v]) / (6))\n    if <<(x) > (item ((i) + (1)) of [end hitboxes v])> and <(x) < (item ((i) + (2)) of [end hitboxes v])>> then\n        if <<(y) > (item ((i) + (3)) of [end hitboxes v])> and <((y) - (height)) < (item ((i) + (4)) of [end hitboxes v])>> then\n            if <<(z) > (item ((i) + (5)) of [end hitboxes v])> and <(z) < (item ((i) + (6)) of [end hitboxes v])>> then\n                set [hitbox detected? v] to [4]\n                stop [this script v]\n            end\n        end\n    end\n    change [i v] by (6)\nend\nset [hitbox detected? v] to [0]\n\ndefine Thing you CAN touch\nset [player height v] to [100]\nset [cam speed v] to [5]\nset [jump height v] to [20]\n\nPlatform at x: [] y: [] z: []\nBounce Platform at x: [] y: [] z: []\nEnd Platform at x: [] y: [] z: []\nTrap Platform at x: [] y: [] z: []\nWater Platform at x: [] y: [] z: []\n\nwhen [e v] key pressed\nif <(username) = [ChaoNoi]> then\n    stop [all v]\nend\n\nwhen I receive [c v]\nset [mode v] to [1]\nforever\n    if <key ((join [m] []) v) pressed?> then\n        if <(MODE) = [1]> then\n            set [mode v] to [2]\n        else\n            set [mode v] to [1]\n        end\n    end\n    wait until <not <key ((join [m] []) v) pressed?>>\nend\n\nwhen I receive [c v]\nforever\n    if <(difficulty) = [easy]> then\n        if <(Level) = [6]> then\n            broadcast (The End v)\n            stop [this script v]\n        end\n    end\n    if <(difficulty) = [medium]> then\n        if <(Level) = [6]> then\n            broadcast (The End v)\n            stop [this script v]\n        end\n    end\n    if <(difficulty) = [hard]> then\n        if <(Level) = [6]> then\n            broadcast (The End v)\n            stop [this script v]\n        end\n    end\nend\n\ndefine Water Platform at x: (x) y: (y) z: (z)\nset pen color to (#609aff)\nset pen (transparency v) to (50)\n--- [Back of Cube]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) - (50)) ((z) + (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) - (50)) ((z) + (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) + (50)) ((z) + (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) + (50)) ((z) + (50))\n--- [Front of Cube]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) - (50)) to ((x) + (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) - (50)) to ((x) - (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) - (50)) to ((x) - (50)) ((y) + (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) - (50)) to ((x) + (50)) ((y) + (50)) ((z) - (50))\n--- [Lines from Front to Back]\nDraw Line ((x) + (50)) ((y) + (50)) ((z) + (50)) to ((x) + (50)) ((y) + (50)) ((z) - (50))\nDraw Line ((x) + (50)) ((y) - (50)) ((z) + (50)) to ((x) + (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) - (50)) ((z) + (50)) to ((x) - (50)) ((y) - (50)) ((z) - (50))\nDraw Line ((x) - (50)) ((y) + (50)) ((z) + (50)) to ((x) - (50)) ((y) + (50)) ((z) - (50))\n--- [Hitbox of Cube]\nAdd Water Hitbox | x: ((x) - (50)) ((x) + (50)) y: ((y) - (50)) ((y) + (50)) z: ((z) - (50)) ((z) + (50))\n\ndefine Add Water Hitbox | x: (x1) (x2) y: (y1) (y2) z: (z1) (z2)\nif <(x1) < (x2)> then\n    add (x1) to [water hitboxes v]\n    add (x2) to [water hitboxes v]\nelse\n    add (x2) to [water hitboxes v]\n    add (x1) to [water hitboxes v]\nend\nif <(y1) < (y2)> then\n    add (y1) to [water hitboxes v]\n    add (y2) to [water hitboxes v]\nelse\n    add (y2) to [water hitboxes v]\n    add (y1) to [water hitboxes v]\nend\nif <(z1) < (z2)> then\n    add (z1) to [water hitboxes v]\n    add (z2) to [water hitboxes v]\nelse\n    add (z2) to [water hitboxes v]\n    add (z1) to [water hitboxes v]\nend\n\ndefine Check for Water Hitbox | x: (x) y: (y) z: (z) player height: (height)\nif <<(cam y) > [-20]> and <(cam y) < [0]>> then\n    set [hitbox detected? v] to [5]\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat ((length of [water hitboxes v]) / (6))\n    if <<(x) > (item ((i) + (1)) of [water hitboxes v])> and <(x) < (item ((i) + (2)) of [water hitboxes v])>> then\n        if <<(y) > (item ((i) + (3)) of [water hitboxes v])> and <((y) - (height)) < (item ((i) + (4)) of [water hitboxes v])>> then\n            if <<(z) > (item ((i) + (5)) of [water hitboxes v])> and <(z) < (item ((i) + (6)) of [water hitboxes v])>> then\n                set [hitbox detected? v] to [5]\n                stop [this script v]\n            end\n        end\n    end\n    change [i v] by (6)\nend\nset [hitbox detected? v] to [0]\n\nwhen I receive [c v]\nwait until <<<key (w v) pressed?> or <(STICK Y) > [0.5]>> or <<<key (s v) pressed?> or <(STICK Y) < [-0.5]>> or <<<key (a v) pressed?> or <(STICK X) < [-0.5]>> or <<key (d v) pressed?> or <(STICK X) > [0.5]>>>>>\nforever\n    if <(timer) < [10]> then\n        set [time : v] to (join (join (letter (1) of (timer)) (letter (2) of (timer))) (letter (3) of (timer)))\n    end\n    if <(timer) > [10]> then\n        set [time : v] to (join (join (join (letter (1) of (timer)) (letter (2) of (timer))) (letter (3) of (timer))) (letter (4) of (timer)))\n    end\n    if <(timer) > [100]> then\n        set [time : v] to (join (join (join (join (letter (1) of (timer)) (letter (2) of (timer))) (letter (3) of (timer))) (letter (4) of (timer))) (letter (5) of (timer)))\n    end\nend\n\nwhen I receive [c v]\nrepeat until <<<key (w v) pressed?> or <(STICK Y) > [0.5]>> or <<<key (s v) pressed?> or <(STICK Y) < [-0.5]>> or <<<key (a v) pressed?> or <(STICK X) < [-0.5]>> or <<key (d v) pressed?> or <(STICK X) > [0.5]>>>>>\n    reset timer\nend\nstop [this script v]\n\nset [level v] to [5]\n\nReset\n\nwhen flag clicked\nforever\n    set size to (join [Infinity] []) %\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@Control Stick\n\nwhen I start as a clone\nswitch costume to (stick v)\ngo [forward v] (1) layers\nset [ghost v] effect to (25)\nforever\n    set [stick power v] to []\n    set [stick x v] to [0]\n    set [stick y v] to [0]\n    repeat until <mouse down?>\n        go to (myself)\n    end\n    if <(distance to [mouse-pointer v]) < ((size) * (0.6))> then\n        Stick Drag\n    else\n        wait until <not <mouse down?>>\n    end\nend\n\ndefine Stick Drag\nrepeat until <not <mouse down?>>\n    go to (mouse-pointer v)\n    point towards (myself)\n    turn right (180) degrees\n    set [stick direction v] to (direction)\n    set [stick power v] to (distance to [(myself) v])\n    if <(STICK POWER) > (max stick)> then\n        move ((max stick) - (STICK POWER)) steps\n        set [stick power v] to (max stick)\n    end\n    set [stick power v] to ((STICK POWER) / (max stick))\n    set [stick x v] to ((STICK POWER) * ([sin v] of (STICK DIRECTION) ))\n    set [stick y v] to ((STICK POWER) * ([cos v] of (STICK DIRECTION) ))\nend\n\nwhen I receive [c v]\nif <(device) = [Mobile]> then\n    go to x: (-176) y: (-116)\n    show\n    set [myself v] to [Control Stick]\n    set [max stick v] to [25]\n    switch costume to (base v)\n    set [ghost v] effect to (60)\n    create clone of (_myself_ v)\nelse\n    hide\nend\n\nwhen flag clicked\nhide\n\n@Jump Button\n\nwhen I receive [c v]\nif <(device) = [Mobile]> then\n    go to x: (-80) y: (-116)\n    show\n    set [ghost v] effect to (60)\n    forever\n        if <touching (mouse-pointer v)?> then\n            if <mouse down?> then\n                set [jump? v] to [1]\n            end\n        end\n        if <not <mouse down?>> then\n            set [jump? v] to [0]\n        end\n    end\nelse\n    hide\nend\n\nwhen flag clicked\nhide\n\n@Detector\n\ndefine detect\nshow\nforever\n    wait until <touching (mouse-pointer v)?>\n    if <mouse down?> then\n        set [device v] to [Mobile]\n    else\n        set [device v] to [PC]\n    end\n    broadcast (c v)\n    hide\n    stop [this script v]\nend\n\nwhen I receive [easy v]\nset [difficulty v] to [easy]\nshow variable [☁ highscore \(easy\) : v]\nshow variable [☁ record holder \(easy\) v]\nwait (1) seconds\ndetect\n\nwhen I receive [medium v]\nset [difficulty v] to [medium]\nshow variable [☁ highscore \(medium\) : v]\nshow variable [☁ record holder \(medium\) v]\nwait (1) seconds\ndetect\n\nwhen I receive [hard v]\nset [difficulty v] to [hard]\nshow variable [☁ highscore \(hard\) : v]\nshow variable [☁ record holder \(hard\) v]\nwait (1) seconds\ndetect\n\n@Control Stick2\n\nwhen I start as a clone\nswitch costume to (stick v)\ngo [forward v] (1) layers\nset [ghost v] effect to (25)\nforever\n    set [stick power v] to []\n    set [stick x2 v] to [0]\n    set [stick y2 v] to [0]\n    repeat until <mouse down?>\n        go to (myself)\n    end\n    if <(distance to [mouse-pointer v]) < ((size) * (0.6))> then\n        Stick Drag\n    else\n        wait until <not <mouse down?>>\n    end\nend\n\ndefine Stick Drag\nrepeat until <not <mouse down?>>\n    go to (mouse-pointer v)\n    point towards (myself)\n    turn right (180) degrees\n    set [stick direction v] to (direction)\n    set [stick power v] to (distance to [(myself) v])\n    if <(STICK POWER) > (max stick)> then\n        move ((max stick) - (STICK POWER)) steps\n        set [stick power v] to (max stick)\n    end\n    set [stick power v] to ((STICK POWER) / (max stick))\n    set [stick x2 v] to ((STICK POWER) * ([sin v] of (STICK DIRECTION) ))\n    set [stick y2 v] to ((STICK POWER) * ([cos v] of (STICK DIRECTION) ))\nend\n\nwhen I receive [c v]\nif <(device) = [Mobile]> then\n    go to x: (176) y: (-116)\n    show\n    set [myself v] to [Control Stick2]\n    set [max stick v] to [25]\n    switch costume to (base v)\n    set [ghost v] effect to (60)\n    create clone of (_myself_ v)\nelse\n    hide\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    if <<mouse down?> and <(distance to [mouse-pointer v]) < ((size) * (0.6))>> then\n        set [can look? v] to [1]\n    end\n    if <not <<mouse down?> and <(distance to [mouse-pointer v]) < ((size) * (0.6))>>> then\n        set [can look? v] to [0]\n    end\nend\n\n@Other thing at the beginning \n\nwhen flag clicked\nerase all\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\nend\n\nwhen I receive [c v]\nhide\n\n@The End\n\nwhen I receive [the end v]\ndelete all of [timer v]\nadd (Time :) to [timer v]\ngo to x: (0) y: (0)\nshow\nforever\n    set [time : v] to (item (1) of [timer v])\n    if <(difficulty) = [easy]> then\n        if <(Time :) < (☁ Highscore \(easy\) :)> then\n            set [☁ highscore \(easy\) : v] to (join (join (join (letter (1) of (Time :)) (letter (2) of (Time :))) (letter (3) of (Time :))) (letter (4) of (Time :)))\n            if <not <[easy holder v] contains (username)?>> then\n                delete all of [easy holder v]\n                add (username) to [easy holder v]\n            end\n        end\n    end\n    if <(difficulty) = [medium]> then\n        if <(Time :) < (☁ Highscore \(medium\) :)> then\n            set [☁ highscore \(medium\) : v] to (join (join (join (letter (1) of (Time :)) (letter (2) of (Time :))) (letter (3) of (Time :))) (letter (4) of (Time :)))\n            if <not <[medium holder v] contains (username)?>> then\n                delete all of [medium holder v]\n                add (username) to [medium holder v]\n            end\n        end\n    end\n    if <(difficulty) = [hard]> then\n        if <(Time :) < (☁ Highscore \(hard\) :)> then\n            set [☁ highscore \(hard\) : v] to (join (join (join (join (letter (1) of (Time :)) (letter (2) of (Time :))) (letter (3) of (Time :))) (letter (4) of (Time :))) (letter (5) of (Time :)))\n            if <not <[hard holder v] contains (username)?>> then\n                delete all of [hard holder v]\n                add (username) to [hard holder v]\n            end\n        end\n    end\n    if <(background) = [1]> then\n        switch costume to (background-1 v)\n    end\n    if <(background) = [2]> then\n        switch costume to (background-2 v)\n    end\nend\n\nwhen flag clicked\nhide\n\nset [☁ highscore \(easy\) : v] to (join (join (letter (2) of (Time :)) (letter (4) of (Time :))) (letter (3) of (Time :)))\n\nwhen flag clicked\nforever\n    set [☁ record holder \(easy\) v] to (item (1) of [easy holder v])\n    set [☁ record holder \(medium\) v] to (item (1) of [medium holder v])\n    set [☁ record holder \(hard\) v] to (item (1) of [hard holder v])\nend\n\n@Thanks!\n\nwhen flag clicked\nhide\nwait until <(Actions \(love/fave\)) = [2]>\nwait (1) seconds\nshow\ngo to x: (0) y: (-3)\nreset timer\ngo to [front v] layer\nswitch costume to (2 v)\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nforever\n    if <(THEME) = [DARK]> then\n        switch costume to (2 v)\n    else\n        switch costume to (3 v)\n    end\nend\n\n@detector\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nset [actions \(love/fave\) v] to [0]\nforever\n    set [touching v] to [none]\n    Detect [love] at [-201] [-220]\n    Detect [fave] at [-201] [-220]\nend\n\ndefine Detect (thing) at (x) (y)\nswitch costume to (empty v)\nset size to (27000) %\ngo to x: (x) y: (y)\nset size to (100) %\nswitch costume to (thing)\nif <touching (mouse-pointer v)?> then\n    set [touching v] to (costume [name v])\nend\n\nwhen flag clicked\nforever\n    wait until <(touching) = [love]>\n    wait (0.2) seconds\n    if <(touching) = [love]> then\n        change [actions \(love/fave\) v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    wait until <(touching) = [fave]>\n    wait (0.2) seconds\n    if <(touching) = [fave]> then\n        change [actions \(love/fave\) v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nwait until <(Actions \(love/fave\)) = [2]>\nchange [clicks v] by (2000)\n\n@updating thing\n\n@Menu\n\nwhen flag clicked\nhide variable [time : v]\nhide variable [☁ record holder \(easy\) v]\nhide variable [☁ record holder \(medium\) v]\nhide variable [☁ record holder \(hard\) v]\nhide variable [☁ highscore \(easy\) : v]\nhide variable [☁ highscore \(medium\) : v]\nhide variable [☁ highscore \(hard\) : v]\nhide variable [mouse sensivity v]\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume3 v)\ncreate clone of (_myself_ v)\nhide\n\nwhen I start as a clone\nset [brightness v] effect to (0)\ngo to [front v] layer\nshow\nforever\n    if <(costume [number v]) = [1]> then\n        go to x: (0) y: (75)\n        forever\n            if <(background) = [1]> then\n                switch costume to (costume1 v)\n            else\n                switch costume to (costume4 v)\n            end\n            if <touching (mouse-pointer v)?> then\n                change size by (((120) - (size)) / (10))\n                if <mouse down?> then\n                    broadcast (easy v)\n                end\n            else\n                change size by (((100) - (size)) / (10))\n            end\n        end\n    end\n    if <(costume [number v]) = [2]> then\n        go to x: (0) y: (0)\n        forever\n            if <(background) = [1]> then\n                switch costume to (costume2 v)\n            else\n                switch costume to (costume5 v)\n            end\n            if <touching (mouse-pointer v)?> then\n                change size by (((120) - (size)) / (10))\n                if <mouse down?> then\n                    broadcast (medium v)\n                end\n            else\n                change size by (((100) - (size)) / (10))\n            end\n        end\n    end\n    if <(costume [number v]) = [3]> then\n        go to x: (0) y: (-75)\n        forever\n            if <(background) = [1]> then\n                switch costume to (costume3 v)\n            else\n                switch costume to (costume6 v)\n            end\n            if <touching (mouse-pointer v)?> then\n                change size by (((120) - (size)) / (10))\n                if <mouse down?> then\n                    broadcast (hard v)\n                end\n            else\n                change size by (((100) - (size)) / (10))\n            end\n        end\n    end\nend\n\nwhen I receive [easy v]\ndelete this clone\n\nwhen I receive [medium v]\ndelete this clone\n\nwhen I receive [hard v]\ndelete this clone\n\n@other things\n\nwhen flag clicked\nset [hitbox detected? v] to [0]\nforever\n    if <(Hitbox Detected?) = [5]> then\n        switch costume to (costume1 v)\n        set [ghost v] effect to (50)\n    end\n    if <not <(Hitbox Detected?) = [5]>> then\n        switch costume to (costume1 v)\n        set [ghost v] effect to (100)\n    end\nend\n\n
Hi everyone! ☺\nI made a *UNIQUE* 3D Platformer Engine.\n-----------------------C O N T R O L S-----------------------\nW - Move forward    A - Move left   S - Move backwards\nD - Move right           -----------------------------------------\n-------------------------    EXTRA M - CAMERA B - BACK\nGROUND\n-----------------------------------------------------------------\nFull title - 3D Platformer Engine! 100% Pen! Make your own 3D Platformer Games! Version 2.1 -------------------------------------------------------------------------------------\nMove Your Mouse to Look around!\nOr use the Arrow Keys!  (press M) -------------------------------------------------------------------------------------------\nIt's really easy to make a 3D platformer with it! ----------------------------------------------------------------  *SCROLL\nDOWN TO SEE HOW TO MAKE IT *\n\nBlue:\nNormal Platform\nRed:\nAVOID IT AVOID IT\nYellow:\nIt's like jumping but 1.5x higher\nGreen:\nNext Level\n-\nJust find the "Level" Custom Block and make your own levels!!\n\nYou can also find other usefull comments inside of the project\n\n\n\n*BONUS*\nThere are also Mobile/PC detector!\nAND YES YOU CAN PLAY IT ON MOBILE!!!!!\nWITH JOYSTICK AND SOME BUTTONS !!!\nISNT THAT AWESOME?!\nYESSS\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#games #engine #3d #trending #art #unique #funny\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nComment:\nEngin'3De\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ngot you :)\n\n\n\n\n\n\n\n\n