Inspiration || A 3D PLATFORMER

Instructions: "Inspiration follows your story, your inspiration is blue, free, and wild. your negativity is purple, dark, and villainous. your negativity follows you, infront of the inspiration, look past the negativity, and you'll find an inspiration."\n\n-UnknownCat_Beans

@Stage\n\nwhen flag clicked\nswitch backdrop to (hi! =\) v)\nset [ghost v] effect to (95)\n\nwhen backdrop switches to [end v]\nclear graphic effects\n\n@3:D\n\nwhen flag clicked\nswitch backdrop to (hi! =\) v)\nset [map # v] to [1]\ninit\ncreate map (map #)\nhide\nrespawn\nlevel 1\nlevel 2\nlevel 3\nforever\n    render\n    smarts\n    touching\n    touching bad?\nend\n\ndefine go to x: (x) y: (y) z: (z)\nset [length v] to ((z) + ((0.075) * ([sqrt v] of ((((x) - (x cam)) * ((x) - (x cam))) + (((y) - (y cam)) * ((y) - (y cam)))) )))\ngo to x: (((Size) * ((x) - (x cam))) / ((length) / (1))) y: (((Size) * ((y) - (y cam))) / ((length) / (1)))\n\ndefine add platform from x: (x) y: (y) to x: (x2) y: (y2)\nadd (x) to [x1 v]\nadd ((y) - (50)) to [y1 v]\nadd (x2) to [x2 v]\nadd ((y2) - (50)) to [y2 v]\n\ndefine add lava from x: (x) y: (y) to x: (x2) y: (y2)\nadd (x) to [hazard x v]\nadd ((y) - (50)) to [hazard y v]\nadd (x2) to [hazard x2 v]\nadd ((y2) - (50)) to [hazard y2 v]\n\ndefine init\ndelete (all) of [x1 v]\ndelete (all) of [x2 v]\ndelete (all) of [y1 v]\ndelete (all) of [y2 v]\ndelete (all) of [hazard x v]\ndelete (all) of [hazard y v]\ndelete (all) of [hazard x2 v]\ndelete (all) of [hazard y2 v]\n\ndefine smarts\nchange [y vel v] by (-0.16)\ntouching\nif <(touching?) = [1]> then\n    set [y vel v] to ((() - (y vel)) / (4))\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [y vel v] to [3.5]\n    end\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x vel v] by (1)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x vel v] by (-1)\nend\nset [x vel v] to ((x vel) * (0.8))\nchange [x v] by (x vel)\nchange [y v] by (y vel)\nslope\n\ndefine render\nerase all\nset [render.run v] to [0]\nset [x cam v] to ((x cam) + (((x) - (x cam)) / (3)))\nset [y cam v] to ((y cam) + (((y) - (y cam)) / (3)))\nset [size v] to ((Size) + (((40) - (Size)) / (15)))\nrepeat (length of [hazard x v])\n    change [render.run v] by (1)\n    pen up\n    set pen size to (1)\n    go to x: (item (render.run) of [hazard x v]) y: (item (render.run) of [hazard y v]) z: (19)\n    set pen color to (#ba84ff)\n    pen down\n    set pen size to (4)\n    go to x: (item (render.run) of [hazard x v]) y: (item (render.run) of [hazard y v]) z: (24)\n    go to x: (item (render.run) of [hazard x2 v]) y: (item (render.run) of [hazard y2 v]) z: (24)\n    go to x: (item (render.run) of [hazard x2 v]) y: (item (render.run) of [hazard y2 v]) z: (19)\n    go to x: (item (render.run) of [hazard x v]) y: (item (render.run) of [hazard y v]) z: (19)\nend\nset [render.run v] to [0]\nrepeat (length of [x1 v])\n    change [render.run v] by (1)\n    pen up\n    set pen size to (1)\n    go to x: (item (render.run) of [x1 v]) y: (item (render.run) of [y1 v]) z: (17)\n    set pen color to (#b3e1e9)\n    pen down\n    set pen size to (4)\n    go to x: (item (render.run) of [x1 v]) y: (item (render.run) of [y1 v]) z: (27)\n    go to x: (item (render.run) of [x2 v]) y: (item (render.run) of [y2 v]) z: (27)\n    go to x: (item (render.run) of [x2 v]) y: (item (render.run) of [y2 v]) z: (17)\n    go to x: (item (render.run) of [x1 v]) y: (item (render.run) of [y1 v]) z: (17)\nend\ncreate player\n\ndefine slope\nchange [y v] by (2)\ntouching\nif <(touching?) = [1]> then\n    change [y v] by (1)\n    touching\n    if <(touching?) = [1]> then\n        change [y v] by (1)\n        touching\n        if <(touching?) = [1]> then\n            change [y v] by (1)\n            touching\n            if <(touching?) = [1]> then\n                change [y v] by (1)\n            end\n        end\n    end\nend\nchange [y v] by (-2)\n\ndefine touching\nset [touching? v] to [0]\nset [touch.run v] to [0]\nrepeat (length of [x1 v])\n    change [touch.run v] by (1)\n    touching part (touch.run) of slope?\nend\n\ndefine level 2\n\ndefine level 1\n\ndefine respawn\nset [size v] to [70]\nset [length v] to [30]\nset [x vel v] to [0]\nset [y vel v] to [0]\nset [x v] to [0]\nset [y v] to [20]\nset [x cam v] to [0]\nset [y cam v] to [60]\nset [size v] to [3]\n\ndefine touching bad?\nset [bad.touch.run v] to [0]\nrepeat (length of [hazard x v])\n    change [bad.touch.run v] by (1)\n    if <<<(((y) + (-6)) + (-13)) < (((x) * (((item (bad.touch.run) of [hazard y v]) - (item (bad.touch.run) of [hazard y2 v])) / ((item (bad.touch.run) of [hazard x v]) - (item (bad.touch.run) of [hazard x2 v])))) + ((item (bad.touch.run) of [hazard y v]) - ((((item (bad.touch.run) of [hazard y v]) - (item (bad.touch.run) of [hazard y2 v])) / ((item (bad.touch.run) of [hazard x v]) - (item (bad.touch.run) of [hazard x2 v]))) * (item (bad.touch.run) of [hazard x v]))))> and <(((x) * (((item (bad.touch.run) of [hazard y v]) - (item (bad.touch.run) of [hazard y2 v])) / ((item (bad.touch.run) of [hazard x v]) - (item (bad.touch.run) of [hazard x2 v])))) + ((item (bad.touch.run) of [hazard y v]) - ((((item (bad.touch.run) of [hazard y2 v]) - (item (bad.touch.run) of [hazard y v])) / ((item (bad.touch.run) of [hazard x v]) - (item (bad.touch.run) of [hazard x2 v]))) * (item (bad.touch.run) of [hazard x v])))) < (((y) + (6)) + (-13))>> and <<(item (bad.touch.run) of [hazard x v]) < (x)> and <(x) < (item (bad.touch.run) of [hazard x2 v])>>> then\n        respawn\n    end\nend\n\ndefine level 3\n\ndefine touching part (slo) of slope?\nif <<<(((y) + (-6)) + (-13)) < (((x) * (((item (slo) of [y1 v]) - (item (slo) of [y2 v])) / ((item (slo) of [x1 v]) - (item (slo) of [x2 v])))) + ((item (slo) of [y1 v]) - ((((item (slo) of [y1 v]) - (item (slo) of [y2 v])) / ((item (slo) of [x1 v]) - (item (slo) of [x2 v]))) * (item (slo) of [x1 v]))))> and <(((x) * (((item (slo) of [y1 v]) - (item (slo) of [y2 v])) / ((item (slo) of [x1 v]) - (item (slo) of [x2 v])))) + ((item (slo) of [y1 v]) - ((((item (slo) of [y1 v]) - (item (slo) of [y2 v])) / ((item (slo) of [x1 v]) - (item (slo) of [x2 v]))) * (item (slo) of [x1 v])))) < (((y) + (6)) + (-13))>> and <<(item (slo) of [x1 v]) < (x)> and <(x) < (item (slo) of [x2 v])>>> then\n    set [touching? v] to [1]\nend\n\ndefine create player\npen up\nset pen size to (1)\ngo to x: (x) y: ((y) - (4)) z: (14)\nset pen color to (#a5ff76)\nset pen size to (20)\npen down\npen up\nif <(y) < [-300]> then\n    respawn\nend\nif <(y) > [490]> then\n    change [map # v] by (1)\n    respawn\n    init\n    create map (map #)\nend\n\ndefine create map (#)\nif <(#) = [1]> then\n    level 1\n    add platform from x: (-20) y: (0) to x: (300) y: (0)\n    add platform from x: (300) y: (50) to x: (350) y: (50)\n    add platform from x: (250) y: (70) to x: (300) y: (70)\n    add platform from x: (150) y: (90) to x: (250) y: (90)\n    add platform from x: (-50) y: (110) to x: (0) y: (110)\n    add platform from x: (50) y: (150) to x: (100) y: (150)\n    add platform from x: (150) y: (170) to x: (200) y: (170)\n    add platform from x: (250) y: (200) to x: (300) y: (200)\n    level 2\n    add platform from x: (-20) y: (250) to x: (300) y: (250)\n    add platform from x: (40) y: (300) to x: (60) y: (300)\n    add platform from x: (10) y: (350) to x: (20) y: (350)\n    add platform from x: (20) y: (400) to x: (40) y: (400)\n    add platform from x: (20) y: (450) to x: (40) y: (450)\n    add platform from x: (40) y: (500) to x: (60) y: (500)\nend\nif <(#) = [2]> then\n    level 3\n    add platform from x: (150) y: (350) to x: (200) y: (350)\n    add platform from x: (-20) y: (0) to x: (80) y: (0)\n    add platform from x: (40) y: (50) to x: (120) y: (50)\n    add platform from x: (80) y: (100) to x: (160) y: (100)\n    add platform from x: (130) y: (150) to x: (210) y: (150)\n    add platform from x: (-20) y: (200) to x: (300) y: (200)\n    level 4\n    add platform from x: (250) y: (220) to x: (300) y: (220)\n    add platform from x: (140) y: (390) to x: (190) y: (390)\n    add platform from x: (140) y: (430) to x: (190) y: (430)\n    add platform from x: (140) y: (470) to x: (190) y: (470)\n    add platform from x: (140) y: (500) to x: (190) y: (500)\n    add platform from x: (50) y: (260) to x: (100) y: (260)\n    add platform from x: (50) y: (240) to x: (100) y: (240)\n    add platform from x: (50) y: (280) to x: (100) y: (280)\n    add platform from x: (50) y: (300) to x: (100) y: (300)\n    add platform from x: (50) y: (320) to x: (100) y: (320)\nend\nif <(#) = [3]> then\n    level 5\n    add platform from x: (-20) y: (0) to x: (300) y: (0)\n    add platform from x: (20) y: (40) to x: (50) y: (40)\n    add platform from x: (70) y: (80) to x: (100) y: (80)\n    add platform from x: (70) y: (100) to x: (120) y: (100)\n    add platform from x: (70) y: (120) to x: (120) y: (120)\n    add platform from x: (170) y: (160) to x: (200) y: (160)\n    add platform from x: (50) y: (200) to x: (260) y: (200)\n    level 6\n    add platform from x: (200) y: (250) to x: (210) y: (250)\n    add platform from x: (200) y: (300) to x: (210) y: (300)\n    add platform from x: (200) y: (350) to x: (210) y: (350)\n    add platform from x: (200) y: (400) to x: (210) y: (400)\n    add platform from x: (150) y: (430) to x: (160) y: (430)\n    add platform from x: (100) y: (460) to x: (110) y: (460)\n    add platform from x: (0) y: (490) to x: (50) y: (490)\n    add lava from x: (-20) y: (370) to x: (170) y: (370)\nend\nif <(#) = [4]> then\n    level 7\n    add platform from x: (-20) y: (0) to x: (300) y: (0)\n    add platform from x: (250) y: (50) to x: (300) y: (50)\n    add platform from x: (100) y: (70) to x: (150) y: (70)\n    add platform from x: (-50) y: (90) to x: (0) y: (90)\n    add platform from x: (100) y: (130) to x: (150) y: (130)\n    add platform from x: (250) y: (150) to x: (270) y: (150)\n    add platform from x: (250) y: (200) to x: (300) y: (200)\n    level 8\n    add platform from x: (-20) y: (250) to x: (300) y: (250)\n    add platform from x: (80) y: (300) to x: (100) y: (300)\n    add platform from x: (80) y: (350) to x: (100) y: (350)\n    add platform from x: (160) y: (400) to x: (180) y: (400)\n    add platform from x: (170) y: (450) to x: (190) y: (450)\n    add platform from x: (190) y: (500) to x: (210) y: (500)\nend\nif <(#) = [5]> then\n    level 9\n    add platform from x: (-40) y: (0) to x: (20) y: (0)\n    add platform from x: (40) y: (20) to x: (60) y: (20)\n    add platform from x: (120) y: (40) to x: (140) y: (40)\n    add platform from x: (240) y: (60) to x: (280) y: (60)\n    level 10\n    add platform from x: (475) y: (-20) to x: (550) y: (-20)\n    add platform from x: (500) y: (20) to x: (550) y: (20)\n    add platform from x: (500) y: (60) to x: (550) y: (60)\n    add platform from x: (500) y: (100) to x: (550) y: (100)\n    add platform from x: (500) y: (140) to x: (550) y: (140)\n    add platform from x: (500) y: (180) to x: (550) y: (180)\n    add platform from x: (500) y: (220) to x: (550) y: (220)\n    add platform from x: (500) y: (260) to x: (550) y: (260)\n    add platform from x: (500) y: (300) to x: (550) y: (300)\n    add platform from x: (500) y: (340) to x: (550) y: (340)\n    add platform from x: (550) y: (380) to x: (600) y: (380)\n    add platform from x: (500) y: (420) to x: (550) y: (420)\n    add platform from x: (225) y: (420) to x: (325) y: (420)\n    add platform from x: (225) y: (455) to x: (325) y: (455)\n    add platform from x: (225) y: (490) to x: (325) y: (490)\nend\nif <(#) = [6]> then\n    GG ez\n    add platform from x: (-20) y: (0) to x: (300) y: (0)\n    switch backdrop to (end v)\nend\n\ndefine level 4\n\ndefine GG ez\n\ndefine level 5\n\ndefine level 6\n\ndefine level 7\n\ndefine level 8\n\ndefine level 9\n\ndefine level 10\n\nwhen flag clicked\nforever\n    play sound [Most Emotional Music Ever Nightsky by Tracey Chattaway v] until done\nend\n\n@detector\n\nwhen flag clicked\nhide\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nshow\ngo to x: (0) y: (50)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\n@Screenshot 2020-04-20 at 12\n\nwhen flag clicked\nhide\n\n