Halloween: a 100% pen platformer - 1k Special

Instructions: NOTE: I AM @IAMNOTSCRATCHCAT! I MADE THIS MYSELF!       \n\n\nHalloween is coming! \nSo I decided to make a one of a kind 100% Platformer!\n\n__________________Instruction___________________\n-Arrow keys to move\n-Get to the flag\n-Avoid Slime\n__________________Updates____________________\n- Shared - October 29th 2020\n- 15 mins in and 51 views and 27 faves, wow!\nAbout 30 minutes in and wow 100 views.\n_______________famous loves/faves?______________\n@k0stya Nice Job.\n@-SuperWooper-\n@Scratching--post\n_________________Credits______________________\n-@Bobojoeho for Making the fastest triangle filler, yes faster than @TheLogFather's.\n- @k0stya made everything else, collisions, rendering, platformer engine, UI and so on.\n__________________Other_______________________\n-Feel free to ask questions about how I made this :) \nTags:\n#Pen #Games #k0stya #Bobojoeho #100 #Percent #Platformer #Original #Inverse #Kinematics #Stickman #Run #Walk #Moons #HAlloween #October #Spooky #Scary #Skeletons #Sans #undertale #31 #Fun #All\n

@Stage\n\n@Game\n\ndefine LIGHTNING\npen up\ngo to x: (pick random (-235) to (235)) y: (175)\npen down\nrepeat until <(y position) < [-170]>\n    go to x: ((x position) + (pick random (-40) to (40))) y: ((y position) - (pick random (10) to (45)))\n    if <(pick random (1) to (3)) = [3]> then\n        pen up\n        pen down\n        repeat (pick random (1) to (5))\n            go to x: ((x position) + (pick random (-20) to (-3))) y: ((y position) + (pick random (-15) to (5)))\n        end\n        pen up\n        pen down\n        repeat (pick random (1) to (5))\n            go to x: ((x position) - (pick random (-20) to (-3))) y: ((y position) + (pick random (-15) to (5)))\n        end\n    end\nend\n\ndefine Tri Fill (x1) (y1) (x2) (y2) (x3) (y3) (outline)\nset [_tri2 v] to ([sqrt v] of ((((x2) - (x3)) * ((x2) - (x3))) + (((y2) - (y3)) * ((y2) - (y3)))) )\nset [_tri3 v] to ([sqrt v] of ((((x1) - (x3)) * ((x1) - (x3))) + (((y1) - (y3)) * ((y1) - (y3)))) )\nset [_tri4 v] to ([sqrt v] of ((((x1) - (x2)) * ((x1) - (x2))) + (((y1) - (y2)) * ((y1) - (y2)))) )\nset [_tri1 v] to (((_tri2) + ((_tri3) + (_tri4))) / (2))\nset [_tri0 v] to ((2) * ([sqrt v] of ((((_tri1) - (_tri2)) * (((_tri1) - (_tri3)) * ((_tri1) - (_tri4)))) / (_tri1)) ))\nchange [_tri1 v] by (_tri1)\ngo to x: (((((_tri2) * (x1)) + ((_tri3) * (x2))) + ((_tri4) * (x3))) / (_tri1)) y: (((((_tri2) * (y1)) + ((_tri3) * (y2))) + ((_tri4) * (y3))) / (_tri1))\nset pen size to (_tri0)\npen down\nif <(_tri0) > [0]> then\n    if <<(_tri3) < (_tri2)> or <(_tri4) < (_tri2)>> then\n        if <<(_tri2) < (_tri3)> or <(_tri4) < (_tri3)>> then\n            set [_tri1 v] to ((x position) - (x3))\n            set [_tri2 v] to ((y position) - (y3))\n        else\n            set [_tri1 v] to ((x position) - (x2))\n            set [_tri2 v] to ((y position) - (y2))\n        end\n    else\n        set [_tri1 v] to ((x position) - (x1))\n        set [_tri2 v] to ((y position) - (y1))\n    end\n    set [_tri1 v] to (([sqrt v] of (((_tri1) * (_tri1)) + ((_tri2) * (_tri2))) ) / ((_tri0) / (2)))\n    set [_tri8 v] to (((_tri1) * (outline)) / ((_tri1) - (1)))\n    set [_tri1 v] to ((0.5) - ((0.5) / (_tri1)))\n    set [_tri2 v] to (((x position) - (x1)) / (_tri0))\n    set [_tri3 v] to (((y position) - (y1)) / (_tri0))\n    set [_tri4 v] to (((x position) - (x2)) / (_tri0))\n    set [_tri5 v] to (((y position) - (y2)) / (_tri0))\n    set [_tri6 v] to (((x position) - (x3)) / (_tri0))\n    set [_tri7 v] to (((y position) - (y3)) / (_tri0))\n    repeat ([floor v] of (([log v] of ((1) / (_tri0)) ) / ([log v] of (_tri1) )) )\n        set [_tri0 v] to ((_tri1) * (_tri0))\n        set pen size to ((_tri0) + (.5))\n        go to x: ((x1) + ((_tri0) * (_tri2))) y: ((y1) + ((_tri0) * (_tri3)))\n        go to x: ((x2) + ((_tri0) * (_tri4))) y: ((y2) + ((_tri0) * (_tri5)))\n        go to x: ((x3) + ((_tri0) * (_tri6))) y: ((y3) + ((_tri0) * (_tri7)))\n        go to x: ((x1) + ((_tri0) * (_tri2))) y: ((y1) + ((_tri0) * (_tri3)))\n    end\nend\nset pen size to (outline)\ngo to x: (x1) y: (y1)\ngo to x: (x2) y: (y2)\ngo to x: (x3) y: (y3)\ngo to x: (x1) y: (y1)\npen up\n\ndefine Bend Line in half (ax) (ay) (bx) (by) (len) (pos or neg)\nset [half of len v] to ((len) / (2))\ngo to x: (ax) y: (ay)\nset [delta x v] to ((bx) - (x position))\nset [delta y v] to ((by) - (y position))\nset [angle alpha v] to ([atan v] of ((Delta X) / (Delta Y)) )\nset [angle beta v] to ([acos v] of (([sqrt v] of (((Delta X) * (Delta X)) + ((Delta Y) * (Delta Y))) ) / (len)) )\nset [direction v] to ((<(y position) > (by)> * (180)) + ((Angle Alpha) - ((Angle Beta) * (pos or neg))))\nif <not <(Angle Beta) = [NaN]>> then\n    pen down\n    go to x: ((x position) + ((Half of len) * ([sin v] of (Direction) ))) y: ((y position) + ((Half of len) * ([cos v] of (Direction) )))\n    go to x: (bx) y: (by)\n    pen up\nend\n\ndefine Draw Player at: (x) (y) Height (height) Leg Length (len) Swing Radius (swing radius) Head Size (head size) Body Thickness (body thickness) Arm length (arm length) Rotation (rot) Arm Swing (arm swing) Neck Length (neck length) Leg Difference (leg d) Forward or Back (back or forward)\nset pen size to (body thickness)\nif <(back or forward) = [0]> then\n    set [y shift v] to ((y) + (([cos v] of ((timer) * (70)) ) + (2.5)))\n    Bend Line in half (x) (Y shift) ((x) + (swing radius)) ((y) - ((2) * (swing radius))) (len) [1]\n    Bend Line in half (x) (Y shift) ((x) - (swing radius)) ((y) - ((2) * (swing radius))) (len) [-1]\n    Body (x) (Y shift) (height)\n    set [dummy3 v] to (((((180) * <[-1.1] < (Y Vel)>) - (Dummy3)) / (4)) + (Dummy3))\n    set [dummy 2 v] to ((arm length) - (0.1))\n    set [dummy v] to (([cos v] of ((timer) * (100)) ) * (5))\n    Bend Line in half ((x) + ((Dummy 2) * ([sin v] of (((15) + (Dummy3)) + (Dummy)) ))) (((Y shift) + (height)) + ((Dummy 2) * ([cos v] of (((15) + (Dummy3)) + (Dummy)) ))) (x position) (y position) (arm length) [1]\n    Bend Line in half ((x) + ((Dummy 2) * ([sin v] of (((-15) - (Dummy3)) + (Dummy)) ))) (((Y shift) + (height)) + ((Dummy 2) * ([cos v] of (((-15) - (Dummy3)) + (Dummy)) ))) (x position) (y position) (arm length) [-1]\nelse\n    reset timer\n    Bend Line in half (x) (y) ((x) + (((swing radius) * (back or forward)) * ([sin v] of (rot) ))) (((swing radius) * ([cos v] of (rot) )) + ((y) - (leg d))) (len) (back or forward)\n    Bend Line in half (x) (y) ((x) + ((() - ((swing radius) * (back or forward))) * ([sin v] of (rot) ))) (((() - (swing radius)) * ([cos v] of (rot) )) + ((y) - (leg d))) (len) (back or forward)\n    Body (x) (y) (height)\n    Bend Line in half ((x) + ((() - ((arm swing) * (back or forward))) * ([sin v] of ((rot) + (15)) ))) ((y position) - ([abs v] of ((() - (arm swing)) * ([cos v] of (rot) )) )) (x) (y position) (arm length) (back or forward)\n    Bend Line in half ((x) + (((arm swing) * (back or forward)) * ([sin v] of ((rot) + (15)) ))) ((y position) - ([abs v] of ((arm swing) * ([cos v] of (rot) )) )) (x) (y position) (arm length) (back or forward)\nend\npen down\nchange y by (((neck length) / (2)) + ((head size) / (2)))\nchange pen size by (2)\nchange y by ((neck length) / (2))\nset pen size to (head size)\npen down\npen up\n\ndefine Body (x) (y) (len)\ngo to x: (x) y: (y)\npen down\nchange y by ((len) / (2))\nchange pen size by (2)\nchange y by ((len) / (2))\npen up\nchange pen size by (-2)\n\ndefine Triangle Collisions (ax) (ay) (bx) (by) (cx) (cy) And point (dx) (dy)\nset [ay-by v] to ((ay) - (by))\nset [by-cy v] to ((by) - (cy))\nset [cy-ay v] to ((cy) - (ay))\nset [cy-dy v] to ((cy) - (dy))\nset [touching? v] to <([abs v] of ((((ax) * (By-cy)) + ((bx) * (Cy-Ay))) + ((cx) * (Ay-By))) ) = (([abs v] of ((((dx) * (By-cy)) + ((bx) * ((cy) - (dy)))) + ((cx) * ((dy) - (by)))) ) + (([abs v] of ((((ax) * ((dy) - (cy))) + ((dx) * (Cy-Ay))) + ((cx) * ((ay) - (dy)))) ) + ([abs v] of ((((ax) * ((by) - (dy))) + ((bx) * ((dy) - (ay)))) + ((dx) * (Ay-By))) )))>\n\ndefine Line to Rect Collisions( Line (x1) (y1) (x2) (y2) Rect (ax) (ay) (bx) (by) )\nPoint in Rectangle collisions (Rect Point 1 xy and point 2 xy (ax) (ay) (bx) (by) Point (x1) (y1)\nif <(Touching?) = [true]> then\n    stop [this script v]\nend\nPoint in Rectangle collisions (Rect Point 1 xy and point 2 xy (ax) (ay) (bx) (by) Point (x2) (y2)\nif <(Touching?) = [true]> then\n    stop [this script v]\nend\nLine to Line Collisions(Line 1 (x1) (y1) (x2) (y2) Line 2 (ax) (ay) (ax) (by) )\nif <(Touching?) = [true]> then\n    stop [this script v]\nend\nLine to Line Collisions(Line 1 (x1) (y1) (x2) (y2) Line 2 (ax) (by) (bx) (by) )\nif <(Touching?) = [true]> then\n    stop [this script v]\nend\nLine to Line Collisions(Line 1 (x1) (y1) (x2) (y2) Line 2 (bx) (by) (bx) (ay) )\nif <(Touching?) = [true]> then\n    stop [this script v]\nend\nLine to Line Collisions(Line 1 (x1) (y1) (x2) (y2) Line 2 (bx) (ay) (ax) (ay) )\n\ndefine Triangle to Rect Collisions( Tri (x1) (y1) (x2) (y2) (x3) (y3) Rect (ax) (ay) (bx) (by) )\nset [touching? v] to [false]\nTriangle Collisions (x1) (y1) (x2) (y2) (x3) (y3) And point (ax) (ay)\nif <(Touching?) = [true]> then\n    stop [this script v]\nend\nTriangle Collisions (x1) (y1) (x2) (y2) (x3) (y3) And point (ax) (by)\nif <(Touching?) = [true]> then\n    stop [this script v]\nend\nTriangle Collisions (x1) (y1) (x2) (y2) (x3) (y3) And point (bx) (by)\nif <(Touching?) = [true]> then\n    stop [this script v]\nend\nTriangle Collisions (x1) (y1) (x2) (y2) (x3) (y3) And point (bx) (ay)\nif <(Touching?) = [true]> then\n    stop [this script v]\nend\nLine to Rect Collisions( Line (x1) (y1) (x2) (y2) Rect (ax) (ay) (bx) (by) )\nif <(Touching?) = [true]> then\n    stop [this script v]\nend\nLine to Rect Collisions( Line (x2) (y2) (x3) (y3) Rect (ax) (ay) (bx) (by) )\nif <(Touching?) = [true]> then\n    stop [this script v]\nend\nLine to Rect Collisions( Line (x3) (y3) (x1) (y1) Rect (ax) (ay) (bx) (by) )\n\ndefine Point in Rectangle collisions (Rect Point 1 xy and point 2 xy (x1) (y1) (x2) (y2) Point (px) (py)\nset [touching? v] to <<not <([abs v] of ((px) - (((x1) + (x2)) / (2))) ) > (([abs v] of ((x1) - (x2)) ) / (2))>> and <not <([abs v] of ((py) - (((y1) + (y2)) / (2))) ) > (([abs v] of ((y1) - (y2)) ) / (2))>>>\n\ndefine Line to Line Collisions(Line 1 (x1) (y1) (x2) (y2) Line 2 (x3) (y3) (x4) (y4) )\nset [ua v] to (((((x4) - (x3)) * ((y1) - (y3))) - (((y4) - (y3)) * ((x1) - (x3)))) / ((((y4) - (y3)) * ((x2) - (x1))) - (((x4) - (x3)) * ((y2) - (y1)))))\nset [ub v] to (((((x2) - (x1)) * ((y1) - (y3))) - (((y2) - (y1)) * ((x1) - (x3)))) / ((((y4) - (y3)) * ((x2) - (x1))) - (((x4) - (x3)) * ((y2) - (y1)))))\nset [touching? v] to <<<not <(uA) > [1]>> and <not <[0] > (uA)>>> and <<not <(uB) > [1]>> and <not <[0] > (uB)>>>>\n\ndefine Create Triangle (x1) (y1) (x2) (y2) (x3) (y3) Type (type) Filled? 1 for fill and 0 wireframe (fill?)\nadd (x1) to [triangle x point 1 v]\nadd (x2) to [triangle x point 2 v]\nadd (x3) to [triangle x point 3 v]\nadd (y1) to [triangle y point 1 v]\nadd (y2) to [triangle y point 2 v]\nadd (y3) to [triangle y point 3 v]\nadd (join (type) (item (item # of (type) in [type names v]) of [platform type v])) to [type v]\nadd (fill?) to [fill? v]\nadd (item (item # of (type) in [type names v]) of [color type v]) to [color v]\n\ndefine Collisions and movement: Player Speed (player speed) Friction (friction) Jump Height (jump height) Slope (slope)\nchange [y vel v] by (-1)\nchange [y v] by (Y Vel)\nCollisions\nif <(Touching?) = [true]> then\n    repeat until <(Touching?) = [false]>\n        change [y v] by ((0) - (([abs v] of (Y Vel) ) / (Y Vel)))\n        Collisions\n    end\n    set [y vel v] to (<<key (up arrow v) pressed?> and <(Y Vel) < [0]>> * (jump height))\nend\nset [x vel v] to (((X Vel) + ((<key (right arrow v) pressed?> - <key (left arrow v) pressed?>) * (player speed))) * (friction))\nchange [x v] by (X Vel)\nif <[0.5] < (X Vel)> then\n    set [looking right or left v] to [1]\nelse\n    if <(X Vel) < [-0.5]> then\n        set [looking right or left v] to [-1]\n    else\n        set [looking right or left v] to [0]\n    end\nend\nchange [rot v] by (X Vel)\nset [slope v] to [0]\nset [dumdum v] to ((0) - (([abs v] of (X Vel) ) / (X Vel)))\nCollisions\nrepeat until <<(Slope) = (slope)> or <(Touching?) = [false]>>\n    change [slope v] by (1)\n    change [y v] by (1)\n    Collisions\nend\nCollisions\nif <(Touching?) = [true]> then\n    change [y v] by ((0) - (Slope))\n    repeat until <(Touching?) = [false]>\n        change [x v] by (DumDUm)\n        Collisions\n    end\nend\nif <(Y) < [-240]> then\n    Reset(respawn X Y (RespawnX) (RespawnY) Respawn vel [0] [0]\nend\n\ndefine Comment: (yeet)\n\ndefine Clear Levels\nComment: [Clears all triangles]\ndelete all of [triangle x point 1 v]\ndelete all of [triangle x point 2 v]\ndelete all of [triangle x point 3 v]\ndelete all of [triangle y point 1 v]\ndelete all of [triangle y point 2 v]\ndelete all of [triangle y point 3 v]\ndelete all of [type v]\ndelete all of [fill? v]\ndelete all of [color v]\n\ndefine Collisions\nset [counter v] to [0]\nrepeat (length of [triangle x point 1 v])\n    change [counter v] by (1)\n    Triangle to Rect Collisions( Tri (item (Counter) of [triangle x point 1 v]) (item (Counter) of [triangle y point 1 v]) (item (Counter) of [triangle x point 2 v]) (item (Counter) of [triangle y point 2 v]) (item (Counter) of [triangle x point 3 v]) (item (Counter) of [triangle y point 3 v]) Rect ((X) - (10)) ((Y) - (20)) ((X) + (10)) ((Y) + (40)) )\n    if <(Touching?) = [true]> then\n        Check Type\n        stop [this script v]\n    end\nend\nset [counter v] to [0]\n\ndefine Render\nset pen size to (10)\nset [counter v] to [0]\nrepeat (length of [triangle x point 1 v])\n    change [counter v] by (1)\n    set pen color to (item (Counter) of [color v])\n    if <(item (Counter) of [fill? v]) = [0]> then\n        go to x: (item (Counter) of [triangle x point 1 v]) y: (item (Counter) of [triangle y point 1 v])\n        pen down\n        go to x: (item (Counter) of [triangle x point 2 v]) y: (item (Counter) of [triangle y point 2 v])\n        go to x: (item (Counter) of [triangle x point 3 v]) y: (item (Counter) of [triangle y point 3 v])\n        go to x: (item (Counter) of [triangle x point 1 v]) y: (item (Counter) of [triangle y point 1 v])\n        pen up\n    else\n        Tri Fill (item (Counter) of [triangle x point 1 v]) (item (Counter) of [triangle y point 1 v]) (item (Counter) of [triangle x point 2 v]) (item (Counter) of [triangle y point 2 v]) (item (Counter) of [triangle x point 3 v]) (item (Counter) of [triangle y point 3 v]) [10]\n    end\nend\n\ndefine Reset(respawn X Y (rx) (ry) Respawn vel (xv) (yv)\nset [x v] to (rx)\nset [y v] to (ry)\nset [x vel v] to (xv)\nset [y vel v] to (yv)\n\ndefine Launch( X vel (xv) Y vel (yv) )\nset [x vel v] to (xv)\nset [dumdum v] to (yv)\n\ndefine Load Type(Name (type) Color:RGBA (r) (g) (b) (a) Safe, Danger, Bounce or End else no collisions (yeet) )\nadd ((b) + ((256) * ((g) + ((256) * ((r) + ((256) * (a))))))) to [color type v]\nadd (type) to [type names v]\nadd (yeet) to [platform type v]\n\ndefine Clear all lists\ndelete all of [triangle x point 1 v]\ndelete all of [triangle x point 2 v]\ndelete all of [triangle x point 3 v]\ndelete all of [triangle y point 1 v]\ndelete all of [triangle y point 2 v]\ndelete all of [triangle y point 3 v]\ndelete all of [type v]\ndelete all of [color v]\ndelete all of [fill? v]\ndelete all of [platform type v]\ndelete all of [color type v]\ndelete all of [type names v]\n\ndefine Load all types of platforms\nLoad Type(Name [Purple Grass] Color:RGBA [200] [10] [225] [0] Safe, Danger, Bounce or End else no collisions [Safe] )\nLoad Type(Name [Purple Dirt] Color:RGBA [150] [5] [175] [0] Safe, Danger, Bounce or End else no collisions [Safe] )\nLoad Type(Name [Orange Flag] Color:RGBA [255] [140] [0] [0] Safe, Danger, Bounce or End else no collisions [End] )\nLoad Type(Name [Flag Pole] Color:RGBA [125] [50] [0] [0] Safe, Danger, Bounce or End else no collisions [Uhh, No collisions] )\nLoad Type(Name [Fly Agaric Cap] Color:RGBA [255] [50] [0] [0] Safe, Danger, Bounce or End else no collisions [Bounce] )\nLoad Type(Name [Fly Agaric Stem] Color:RGBA [255] [200] [150] [0] Safe, Danger, Bounce or End else no collisions [Uhh, No collisions] )\nLoad Type(Name [Slime] Color:RGBA [146] [255] [71] [0] Safe, Danger, Bounce or End else no collisions [Danger] )\n\ndefine Set Level (level)\ndelete all of [x v]\ndelete all of [y v]\nrepeat (15)\n    add (pick random (-240) to (240)) to [x v]\n    add (pick random (-180) to (180)) to [y v]\nend\nClear Levels\nReset(respawn X Y (RespawnX) (RespawnY) Respawn vel [0] [0]\nif <(Level) = [1]> then\n    Create Triangle [-200] [-25] [200] [-25] [0] [-160] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n    Create Triangle [-200] [-25] [200] [-25] [0] [-26] Type [Purple Grass] Filled? 1 for fill and 0 wireframe [0]\n    Create Triangle [150] [20] [150] [50] [180] [35] Type [Orange Flag] Filled? 1 for fill and 0 wireframe [1]\n    Create Triangle [150] [20] [150] [50] [150.01] [-25] Type [Flag Pole] Filled? 1 for fill and 0 wireframe [0]\nelse\n    if <(Level) = [2]> then\n        Create Triangle [-200] [-25] [200] [-25] [0] [-160] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n        Create Triangle [-200] [-25] [200] [-25] [0] [-26] Type [Purple Grass] Filled? 1 for fill and 0 wireframe [0]\n        Create Triangle [100] [-25] [100] [70] [150] [70] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n        Create Triangle [100] [-25] [150] [-25] [150] [70] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n        Create Triangle [80] [-25] [80] [-25] [80.01] [0] Type [Fly Agaric Stem] Filled? 1 for fill and 0 wireframe [0]\n        Create Triangle [70] [0] [80] [10] [90] [0] Type [Fly Agaric Cap] Filled? 1 for fill and 0 wireframe [0]\n        Create Triangle [125] [120] [125] [150] [155] [135] Type [Orange Flag] Filled? 1 for fill and 0 wireframe [1]\n        Create Triangle [125] [90] [125] [150] [125.01] [70] Type [Flag Pole] Filled? 1 for fill and 0 wireframe [0]\n        Create Triangle [150] [70] [125] [69.99] [100] [70] Type [Purple Grass] Filled? 1 for fill and 0 wireframe [0]\n    else\n        if <(Level) = [3]> then\n            Create Triangle [-200] [-125] [200] [-125] [0] [-210] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n            Create Triangle [-200] [-125] [150] [-125] [0] [-125] Type [Purple Grass] Filled? 1 for fill and 0 wireframe [0]\n            Create Triangle [150] [-125] [200] [-125] [150] [100] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n            Create Triangle [150] [100] [200] [-125] [200] [100] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n            Create Triangle [110] [-125] [110] [-125] [110.01] [-100] Type [Fly Agaric Stem] Filled? 1 for fill and 0 wireframe [0]\n            Create Triangle [100] [-100] [110] [-90] [120] [-100] Type [Fly Agaric Cap] Filled? 1 for fill and 0 wireframe [0]\n            Create Triangle [50] [-20] [55] [50] [90] [-20] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n            Create Triangle [10] [50] [55] [50] [50] [-20] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n            Create Triangle [130] [100] [150] [100] [150] [80] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n            Create Triangle [130] [100] [150] [100] [200] [100.01] Type [Purple Grass] Filled? 1 for fill and 0 wireframe [0]\n            Create Triangle [10] [50] [55] [50] [50] [50.01] Type [Purple Grass] Filled? 1 for fill and 0 wireframe [0]\n            Create Triangle [175] [170] [175] [140] [200] [155] Type [Orange Flag] Filled? 1 for fill and 0 wireframe [1]\n            Create Triangle [175] [150] [175] [170] [175.01] [100] Type [Flag Pole] Filled? 1 for fill and 0 wireframe [0]\n        else\n            if <(Level) = [4]> then\n                Create Triangle [-200] [-100] [200] [-100] [0] [-175] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n                Create Triangle [-200] [-100] [200] [-100] [0] [-100] Type [Purple Grass] Filled? 1 for fill and 0 wireframe [0]\n                Create Triangle [110] [-100] [110] [-100] [110.01] [-75] Type [Fly Agaric Stem] Filled? 1 for fill and 0 wireframe [0]\n                Create Triangle [100] [-75] [110] [-65] [120] [-75] Type [Fly Agaric Cap] Filled? 1 for fill and 0 wireframe [0]\n                Create Triangle [80] [81] [110] [61] [140] [81] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n                Create Triangle [80] [80] [110] [60] [140] [80] Type [Slime] Filled? 1 for fill and 0 wireframe [1]\n                Create Triangle [280] [50] [240] [40] [200] [50] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n                Create Triangle [110] [160] [110] [130] [135] [145] Type [Orange Flag] Filled? 1 for fill and 0 wireframe [1]\n                Create Triangle [110] [140] [110] [160] [110.01] [90] Type [Flag Pole] Filled? 1 for fill and 0 wireframe [0]\n            else\n                if <(Level) = [5]> then\n                    Create Triangle [-200] [140] [-175] [120] [-150] [140] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n                    Create Triangle [-200] [140] [-175] [140.01] [-150] [140] Type [Purple Grass] Filled? 1 for fill and 0 wireframe [0]\n                    Create Triangle [-100] [250] [0] [250] [-50] [-80] Type [Slime] Filled? 1 for fill and 0 wireframe [1]\n                    Create Triangle [-50] [-160] [-25] [-180] [0] [-160.01] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n                    Create Triangle [50] [-140] [75] [-160] [100] [-140] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n                    Create Triangle [50] [-140] [75] [-140.01] [100] [-140] Type [Purple Grass] Filled? 1 for fill and 0 wireframe [0]\n                    Create Triangle [75] [-140] [75] [-140] [75.01] [-120] Type [Fly Agaric Stem] Filled? 1 for fill and 0 wireframe [0]\n                    Create Triangle [60] [-120] [75] [-100] [90] [-120] Type [Fly Agaric Cap] Filled? 1 for fill and 0 wireframe [1]\n                    Create Triangle [100] [0] [125] [-20] [150] [0] Type [Purple Dirt] Filled? 1 for fill and 0 wireframe [1]\n                    Create Triangle [100] [0] [125] [0.01] [150] [0] Type [Purple Grass] Filled? 1 for fill and 0 wireframe [0]\n                    Create Triangle [125] [70] [125] [40] [160] [55] Type [Orange Flag] Filled? 1 for fill and 0 wireframe [1]\n                    Create Triangle [125] [50] [125] [70] [125.01] [0] Type [Flag Pole] Filled? 1 for fill and 0 wireframe [0]\n                else\n                    stop [other scripts in sprite v]\n                    broadcast (message1 v)\n                    broadcast (Yoot v)\n                end\n            end\n        end\n    end\nend\n\ndefine Main Loop\nCollisions and movement: Player Speed [1.5] Friction [0.8] Jump Height [10] Slope [5]\ngo to x: (0) y: (0)\nset pen size to (650)\nset pen color to (join [1703962] [])\npen down\npen up\nset [counter v] to [0]\nrepeat (length of [x v])\n    change [counter v] by (1)\n    go to x: (item (Counter) of [x v]) y: (item (Counter) of [y v])\n    set pen size to ((20) + ((([cos v] of (((Tick) * (Counter)) * (34)) ) * ([sin v] of ((Tick) * (48)) )) * (5)))\n    set pen color to (join [2016448210] [])\n    pen down\n    set pen size to (10)\n    set pen color to (join [16775066] [])\n    pen down\n    pen up\nend\nif <(((Tick) * (30)) mod (150)) < [7]> then\n    set pen color to (join [20310569890] [])\n    set pen size to (650)\n    go to x: (0) y: (0)\n    pen down\n    pen up\n    if <(((Tick) * (30)) mod (150)) < [5]> then\n        set pen color to (join [16775066] [])\n        set pen size to (8)\n        LIGHTNING\n        pen up\n    end\nend\ngo to x: (-180) y: (120)\nset pen size to ((80) + ((([cos v] of (((Tick) * (Counter)) * (10)) ) * ([sin v] of ((Tick) * (76)) )) * (12)))\nset pen color to (join [25310569890] [])\npen down\nset pen size to ((60) + ((([cos v] of (((Tick) * (Counter)) * (13)) ) * ([sin v] of ((Tick) * (67)) )) * (7)))\nset pen color to (join [2531056987598] [])\npen down\npen up\nRender\nset pen color to (join [15527148] [])\nDraw Player at: (X) (Y) Height [20] Leg Length [20] Swing Radius [7.5] Head Size [10] Body Thickness [3] Arm length [20] Rotation (((Rot) * (6)) * (<[0] < (X Vel)> - (0.5))) Arm Swing [17] Neck Length [4] Leg Difference [10] Forward or Back (Looking right or left)\n\ndefine Check Type\nif < (item (Counter) of [type v]) contains [Safe]?> then\n\nwhen flag clicked\nset rotation style [don't rotate v]\nset [level v] to [1]\nset [respawnx v] to [-175]\nset [respawny v] to [160]\nset size to (Infinity) %\nClear all lists\nLoad all types of platforms\nSet Level [1]\nReset(respawn X Y (RespawnX) (RespawnY) Respawn vel [0] [0]\nhide\nforever\n    erase all\n    switch costume to (costume1 v)\n    set size to (Infinity) %\n    Main Loop\n    change [tick v] by ((1) / (20))\nend\n\ndefine Rgba (r) (g) (b) (a)\nset pen color to ((b) + ((256) * ((g) + ((256) * ((r) + ((256) * (a)))))))\n\nwhen flag clicked\nrepeat (100)\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\nend\n\nwhen I receive [message1 v]\nrepeat (100)\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\n    play sound [Spooky Scary Skeletons \(Remix\) - Extended Mix.mp3 v] until done\nend\n\nwhen I receive [yoot v]\nswitch costume to (costume2 v)\nset size to (100) %\ngo to x: (0) y: (0)\nshow\nchange [color v] effect by (25)\nset rotation style [all around v]\nforever\n    change [color v] effect by ((([sin v] of ((timer) * (21)) ) * ([sin v] of ((timer) * (4)) )) * (20))\n    point in direction ((90) + ((([sin v] of ((timer) * (61)) ) * ([cos v] of ((timer) * (43)) )) * (20)))\n    set size to ((100) + (([sin v] of ((timer) * (234)) ) * (15))) %\nend\n\n@download (8)\n\nwhen flag clicked\nhide\n\nshow\n\n