Ball Physics Platformer? | Part 2
@Stage\n\nwhen flag clicked\nerase all\nhide list [lag link v]\nwait until <key (any v) pressed?>\nshow list [lag link v]\nbroadcast (\[ Setup \] Start Game Loop v)\n\nwhen I receive [\[ setup \] reset v]\nstop [other scripts in sprite v]\nbroadcast (\[ Setup \] Start Game Loop v)\n\nwhen I receive [\[ setup \] start game loop v]\nforever\n    broadcast (\[ Tick \] Game Loop v)\nend\n\nwhen I receive [\[ setup \] next level v]\nstop [other scripts in sprite v]\nchange [level # v] by (1)\nbroadcast (\[ Setup \] Start Game Loop v)\n\n@Engine\n\ndefine [ Tool ] Normalize Vector\nset [cos v] to ((vector x) / (distance))\nset [sin v] to ((vector y) / (distance))\n\ndefine [ Tool ] Projection between Vector (x1) (y1) (x2) (y2) Point (x3) (y3)\n[ Tool ] Get Distance between (x1) (y1) to (x2) (y2)\n[ Tool ] Normalize Vector\nset [slope v] to ((vector y) / (vector x))\nset [projection length v] to (distance)\n[ Tool ] Get Distance between (x1) (y1) to (x3) (y3)\n[ Tool ] Dot Product (vector x) (vector y) to (cos) (sin)\nset [projection v] to (dot product)\nif <(projection) < [0]> then\n    set [projection v] to [0]\nend\nif <(projection) > (projection length)> then\n    set [projection v] to (projection length)\nend\nset [projection x v] to ((projection) * (cos))\nset [projection y v] to ((projection) * (sin))\n\ndefine [ Model ] Point to Point Collision\nset [#other point v] to [0]\nrepeat ((length of [points v]) / (length of [\(point information\) v]))\n    if <not <(#point) = (#other point)>> then\n        [ Physic ] Collied Point1 (item ((#point) + (1)) of [points v]) (item ((#point) + (2)) of [points v]) (item ((#point) + (5)) of [points v]) to Point2 (item ((#other point) + (1)) of [points v]) (item ((#other point) + (2)) of [points v]) (item ((#other point) + (5)) of [points v])\n    end\n    change [#other point v] by (length of [\(point information\) v])\nend\n\ndefine [ Model ] Update Link\nset [#link v] to [0]\nrepeat ((length of [links v]) / (length of [\(link information\) v]))\n    set [#link start point v] to (item ((#link) + (1)) of [links v])\n    set [#link end point v] to (item ((#link) + (2)) of [links v])\n    [ Tool ] Get Distance between (item ((#link start point) + (1)) of [points v]) (item ((#link start point) + (2)) of [points v]) to (item ((#link end point) + (1)) of [points v]) (item ((#link end point) + (2)) of [points v])\n    set [distance v] to ((((distance) - (item ((#link) + (3)) of [links v])) / (distance)) / (item ((#link) + (6)) of [links v]))\n    if (item ((#link start point) + (6)) of [points v]) then\n        [ Tool ] Change Point ((#link start point) + (1)) By ((vector x) * (distance))\n        [ Tool ] Change Point ((#link start point) + (2)) By ((vector y) * (distance))\n    end\n    if (item ((#link end point) + (6)) of [points v]) then\n        [ Tool ] Change Point ((#link end point) + (1)) By ((0) - ((vector x) * (distance)))\n        [ Tool ] Change Point ((#link end point) + (2)) By ((0) - ((vector y) * (distance)))\n    end\n    change [#link v] by (length of [\(link information\) v])\nend\n\ndefine [ Model ] Render\nset [#link v] to [0]\nrepeat ((length of [links v]) / (length of [\(link information\) v]))\n    set pen color to (join [0x] [7B7B7B])\n    if <(item ((#link) + (5)) of [links v]) = [lava]> then\n        set pen color to (join [0x] [EA0000])\n    end\n    if <(item ((#link) + (5)) of [links v]) = [finish]> then\n        set pen color to (join [0x] [00EC00])\n    end\n    if < (item ((#link) + (5)) of [links v]) contains [gravity]?> then\n        set pen color to (join [0x] [8600FF])\n    end\n    set [#link start point v] to (item ((#link) + (1)) of [links v])\n    set [#link end point v] to (item ((#link) + (2)) of [links v])\n    set pen size to (((item ((#link) + (4)) of [links v]) / (_zoom)) * (2))\n    [ Tool ] Convert (item ((#link start point) + (1)) of [points v]) (item ((#link start point) + (2)) of [points v]) to Draw Position\n    pen down\n    [ Tool ] Convert (item ((#link end point) + (1)) of [points v]) (item ((#link end point) + (2)) of [points v]) to Draw Position\n    pen up\n    change [#link v] by (length of [\(link information\) v])\nend\nset [#point v] to [0]\nrepeat ((length of [points v]) / (length of [\(point information\) v]))\n    set pen color to (join [0x] [ADADAD])\n    if <(#point) = [0]> then\n        if <(@fire) = [0]> then\n            set pen color to (join [0x] [0080FF])\n        else\n            set pen color to (join [0x] [FF8000])\n        end\n    end\n    if <(item ((#point) + (7)) of [points v]) = [small]> then\n        set pen color to (join [0x] [28FF28])\n    end\n    if <(item ((#point) + (7)) of [points v]) = [fire]> then\n        set pen color to (join [0x] [FF8000])\n    end\n    [ Tool ] Convert (item ((#point) + (1)) of [points v]) (item ((#point) + (2)) of [points v]) to Draw Position\n    set pen size to (((item ((#point) + (5)) of [points v]) / (_zoom)) * (2))\n    pen down\n    pen up\n    change [#point v] by (length of [\(point information\) v])\nend\n\ndefine [ Physic ] Collied Point1 (x1) (y1) (r1) to Point2 (x2) (y2) (r2)\n[ Tool ] Get Distance between (x1) (y1) to (x2) (y2)\nif <(distance) < ((r1) + (r2))> then\n    set [collided v] to [1]\n    [ Model ] Add Mode\n    [ Tool ] Normalize Vector\n    set [depth v] to (((distance) - ((r1) + (r2))) / (2))\n    if (item ((#point) + (6)) of [points v]) then\n        [ Tool ] Change Point ((#point) + (1)) By ((depth) * (cos))\n        [ Tool ] Change Point ((#point) + (2)) By ((depth) * (sin))\n    end\nelse\n    set [collided v] to [0]\nend\n\ndefine [ Tool ] Dot Product (u1) (u2) to (v1) (v2)\nset [dot product v] to (((u1) * (v1)) + ((u2) * (v2)))\n\ndefine [ Model ] Rotation Collision\nif <(collided) = [1]> then\n    set [half of length v] to ((item ((#link) + (3)) of [links v]) / (2))\n    set [torque v] to (((projection) - (half of length)) * (depth))\n    set [angular velocity v] to ((torque) / (half of length))\n    if (item ((#link start point) + (6)) of [points v]) then\n        [ Tool ] Change Point ((#link start point) + (1)) By ((((0) - (depth)) + (angular velocity)) * (cos))\n        [ Tool ] Change Point ((#link start point) + (2)) By ((((0) - (depth)) + (angular velocity)) * (sin))\n    end\n    if (item ((#link end point) + (6)) of [points v]) then\n        [ Tool ] Change Point ((#link end point) + (1)) By ((((0) - (depth)) - (angular velocity)) * (cos))\n        [ Tool ] Change Point ((#link end point) + (2)) By ((((0) - (depth)) - (angular velocity)) * (sin))\n    end\nend\n\ndefine [ Model ] Update Points Velocity\nset [#point v] to [0]\nrepeat ((length of [points v]) / (length of [\(point information\) v]))\n    if (item ((#point) + (6)) of [points v]) then\n        [ Tool ] Get Distance between (item ((#point) + (3)) of [points v]) (item ((#point) + (4)) of [points v]) to (item ((#point) + (1)) of [points v]) (item ((#point) + (2)) of [points v])\n        replace item ((#point) + (3)) of [points v] with (item ((#point) + (1)) of [points v])\n        replace item ((#point) + (4)) of [points v] with (item ((#point) + (2)) of [points v])\n        [ Model ] Player\n        [ Tool ] Change Point ((#point) + (1)) By (vector x)\n        [ Tool ] Change Point ((#point) + (2)) By ((vector y) + (_gravity))\n    end\n    change [#point v] by (length of [\(point information\) v])\nend\n\ndefine [ Model ] Point to Link Collision\nset [#link v] to [0]\nrepeat ((length of [links v]) / (length of [\(link information\) v]))\n    if <not <<(#point) = (item ((#link) + (1)) of [links v])> or <(#point) = (item ((#link) + (2)) of [links v])>>> then\n        set [#link start point v] to (item ((#link) + (1)) of [links v])\n        set [#link end point v] to (item ((#link) + (2)) of [links v])\n        [ Tool ] Projection between Vector (item ((#link start point) + (1)) of [points v]) (item ((#link start point) + (2)) of [points v]) (item ((#link end point) + (1)) of [points v]) (item ((#link end point) + (2)) of [points v]) Point (item ((#point) + (1)) of [points v]) (item ((#point) + (2)) of [points v])\n        [ Physic ] Collied Point1 (item ((#point) + (1)) of [points v]) (item ((#point) + (2)) of [points v]) (item ((#point) + (5)) of [points v]) to Point2 ((item ((#link start point) + (1)) of [points v]) + (projection x)) ((item ((#link start point) + (2)) of [points v]) + (projection y)) (item ((#link) + (4)) of [links v])\n        [ Model ] Rotation Collision\n    end\n    change [#link v] by (length of [\(link information\) v])\nend\n\ndefine [ Add ] Point with Position (x) (y) Radius (r) Pin (p) Type (type)\nadd (x) to [points v]\nadd (y) to [points v]\nadd (x) to [points v]\nadd (y) to [points v]\nadd (r) to [points v]\nadd (p) to [points v]\nadd (type) to [points v]\n\ndefine [ Add ] Platform From (start x) (start y) To (end x) (end y) Radius: (radiius) Pin: (start) (end) Type: (type)\nset [#object v] to ((length of [points v]) / (length of [\(point information\) v]))\n[ Add ] Point with Position (start x) (start y) Radius (radiius) Pin (start) Type []\n[ Add ] Point with Position (end x) (end y) Radius (radiius) Pin (end) Type []\n[ Add ] Link from (#object) to ((#object) + (1)) Radius (radiius) Type (type) Elastic [2]\n\ndefine [ Tool ] Convert (x) (y) to Draw Position\nset [camera x v] to (((x) - (target x)) / (_zoom))\nset [camera y v] to (((y) - (target y)) / (_zoom))\nswitch costume to (position v)\ngo to x: (CAMERA X) y: (CAMERA Y)\nswitch costume to (blank v)\n\ndefine [ Model ] Auto Zoom\nset [target x v] to (((target x) * (0.8)) + ((item (1) of [points v]) * (0.2)))\nset [target y v] to (((target y) * (0.8)) + ((item (2) of [points v]) * (0.2)))\nset [_zoom v] to (((_zoom) * (0.9)) + (0.05))\nif <key (z v) pressed?> then\n    set [_zoom v] to (((_zoom) * (0.9)) + (0.15))\nend\nif <<key (r v) pressed?> or <([abs v] of (item (2) of [points v]) ) > [700]>> then\n    broadcast (\[ Setup \] Reset v)\nend\n\ndefine [ Tool ] Control\nset [~left v] to <<key (left arrow v) pressed?> or <key (a v) pressed?>>\nset [~right v] to <<key (right arrow v) pressed?> or <key (d v) pressed?>>\nset [~up v] to <<key (up arrow v) pressed?> or <key (w v) pressed?>>\nset [~down v] to <<key (down arrow v) pressed?> or <key (s v) pressed?>>\nset [~x axis v] to ((~right) - (~left))\nset [~y axis v] to ((~up) - (~down))\n\ndefine [ Add ] Triangle at (x) (y) Radius: (radius) Size: (size) Elastic: (elastic)\nset [#object v] to ((length of [points v]) / (length of [\(point information\) v]))\n[ Add ] Point with Position ((x) - (size)) ((y) - ((size) / ([sqrt v] of (3) ))) Radius (radius) Pin [1] Type []\n[ Add ] Point with Position ((x) + (size)) ((y) - ((size) / ([sqrt v] of (3) ))) Radius (radius) Pin [1] Type []\n[ Add ] Point with Position (x) ((y) + ((size) * ((2) / ([sqrt v] of (3) )))) Radius (radius) Pin [1] Type []\n[ Add ] Link from (#object) to ((#object) + (1)) Radius (radius) Type [] Elastic (elastic)\n[ Add ] Link from ((#object) + (1)) to ((#object) + (2)) Radius (radius) Type [] Elastic (elastic)\n[ Add ] Link from ((#object) + (2)) to (#object) Radius (radius) Type [] Elastic (elastic)\n\ndefine [ Add ] Link from (p1) to (p2) Radius (r) Type (type) Elastic (e)\nset [#link start point v] to ((p1) * (length of [\(point information\) v]))\nset [#link end point v] to ((p2) * (length of [\(point information\) v]))\n[ Tool ] Get Distance between (item ((#link start point) + (1)) of [points v]) (item ((#link start point) + (2)) of [points v]) to (item ((#link end point) + (1)) of [points v]) (item ((#link end point) + (2)) of [points v])\n[ Tool ] Normalize Vector\nadd (#link start point) to [links v]\nadd (#link end point) to [links v]\nadd (distance) to [links v]\nadd (r) to [links v]\nadd (type) to [links v]\nadd (e) to [links v]\n\ndefine [ Tool ] Change Point (index) By (value)\nreplace item (index) of [points v] with ((item (index) of [points v]) + (value))\n\ndefine [ Model ] Player\n[ Tool ] Control\nif <(item ((#point) + (7)) of [points v]) = [player]> then\n    replace item (5) of [points v] with (((item (5) of [points v]) * (0.8)) + ((@size) * (0.2)))\n    change [vector x v] by ((~x axis) * (_player speed))\n    if <([abs v] of (vector x) ) > [4]> then\n        set [vector x v] to (((vector x) / ([abs v] of (vector x) )) * (4))\n    end\n    change [@falling v] by (1)\n    if <(~y axis) > [0]> then\n        if <<(@falling) < [2]> or <(@jumping) > [0]>> then\n            change [@jumping v] by (1)\n            if <(@jumping) < [11]> then\n                set [vector y v] to (((_gravity) / ([abs v] of (_gravity) )) * (-4))\n            end\n        end\n    else\n        set [@jumping v] to [0]\n    end\nend\n\nwhen flag clicked\n[ Setup ] Setup Data\n\ndefine [ Tool ] Get Distance between (x1) (y1) to (x2) (y2)\nset [vector x v] to ((x2) - (x1))\nset [vector y v] to ((y2) - (y1))\nset [distance v] to ([sqrt v] of (((vector x) * (vector x)) + ((vector y) * (vector y))) )\n\ndefine [ Tick ] Update Points with Quality (q)\n[ Model ] Update Points Velocity\nrepeat (q)\n    [ Model ] Point Collision\n    [ Model ] Update Link\nend\n\ndefine [ Setup ] Reset\ndelete all of [links v]\ndelete all of [points v]\nset [_gravity v] to [-0.3]\nset [@size v] to [10]\nset [@falling v] to [99]\nset [@jumping v] to [0]\nset [@fire v] to [0]\nif <(LEVEL #) = [1]> then\n    [ Setup ] Level 1\nend\nif <(LEVEL #) = [2]> then\n    [ Setup ] Level 2\nend\nif <(LEVEL #) = [3]> then\n    [ Setup ] Level 3\nend\nif <(LEVEL #) = [4]> then\n    [ Setup ] Level 4\nend\nif <(LEVEL #) = [5]> then\n    [ Setup ] Level 5\nend\nif <(LEVEL #) = [6]> then\n    [ Setup ] Stage Clear\nend\n\ndefine [ Tool ] Eat Point (index)\nreplace item ((index) + (7)) of [points v] with []\n\ndefine [ Model ] Add Mode\nif <(item ((#point) + (7)) of [points v]) = [player]> then\n    if <([abs v] of (slope) ) < [3]> then\n        set [@falling v] to [0]\n    end\nend\nif <(#point) = [0]> then\n    if <(item ((#other point) + (7)) of [points v]) = [small]> then\n        [ Tool ] Eat Point (#other point)\n        set [@size v] to [5]\n    end\n    if <(item ((#other point) + (7)) of [points v]) = [fire]> then\n        [ Tool ] Eat Point (#other point)\n        set [@fire v] to [1]\n    end\n    if <(item ((#link) + (5)) of [links v]) = [gravity up]> then\n        set [_gravity v] to [0.3]\n    end\n    if <(item ((#link) + (5)) of [links v]) = [gravity down]> then\n        set [_gravity v] to [-0.3]\n    end\n    if <<(item ((#link) + (5)) of [links v]) = [lava]> and <(@fire) = [0]>> then\n        broadcast (\[ Setup \] Reset v)\n    end\n    if <(item ((#link) + (5)) of [links v]) = [finish]> then\n        broadcast (\[ Setup \] Next Level v)\n    end\nend\n\ndefine [ Setup ] Level 1\n[ Add ] Point with Position [0] [0] Radius [10] Pin [1] Type [player]\n[ Add ] Platform From [-100] [100] To [-100] [-15] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [100] [-15] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [300] [-60] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [700] [-60] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [700] [20] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [900] [20] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [900] [200] Radius [5] Elastic [2] Pin: [1] Type []\n[ Add ] Platform From [1050] [70] To [1300] [70] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [1500] [30] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [1800] [30] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] Platform From [1300] [90] To [1300] [300] Radius: [5] Pin: [] [] Type: []\n[ Add ] Platform From [1150] [170] To [1270] [160] Radius: [5] Pin: [] [] Type: []\n[ Add ] Platform From [1130] [170] To [1150] [170] Radius: [5] Pin: [] [] Type: []\n[ Add ] Point with Position [1140] [180] Radius [5] Pin [1] Type [small]\n[ Add ] Point with Position [1110] [160] Radius [2] Pin [] Type []\n[ Add ] Platform From [1130] [120] To [1110] [170] Radius: [2] Pin: [] [1] Type: []\n[ Add ] String to [1130] [178] Radius [2] Elastic [2] Pin: [1] Type []\n[ Add ] Platform From [1500] [30] To [1800] [30] Radius: [5] Pin: [] [] Type: []\n[ Add ] Platform From [1300] [90] To [1500] [50] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [1520] [40] Radius [2] Elastic [2] Pin: [1] Type []\n[ Add ] String to [1540] [40] Radius [3] Elastic [2] Pin: [1] Type []\n[ Add ] String to [1560] [40] Radius [2] Elastic [2] Pin: [1] Type []\n[ Add ] String to [1580] [40] Radius [3] Elastic [2] Pin: [1] Type []\n[ Add ] String to [1600] [40] Radius [2] Elastic [2] Pin: [1] Type []\n[ Add ] Triangle at [400] [-20] Radius: [2] Size: [10] Elastic: [2]\n[ Add ] Cube at [450] [-20] Size [15] Radius [2] Elastic [10] Type []\n[ Add ] Platform From [1800] [30] To [1800] [100] Radius: [5] Pin: [] [] Type: [finish]\n\ndefine [ Add ] String to (x) (y) Radius (radius) Elastic (elastic) Pin: (pin) Type (type)\nset [#object v] to ((length of [points v]) / (length of [\(point information\) v]))\n[ Add ] Point with Position (x) (y) Radius (radius) Pin (pin) Type (type)\n[ Add ] Link from ((#object) - (1)) to (#object) Radius (radius) Type (type) Elastic (elastic)\n\ndefine [ Setup ] Level 2\n[ Add ] Point with Position [0] [0] Radius [10] Pin [1] Type [player]\n[ Add ] Platform From [-100] [100] To [-100] [-15] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [150] [-15] Radius [5] Elastic [10] Pin: [] Type []\n[ Add ] String to [350] [15] Radius [5] Elastic [10] Pin: [] Type [lava]\n[ Add ] String to [600] [15] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] Cube at [100] [1] Size [10] Radius [2] Elastic [2] Type []\n[ Add ] Triangle at [480] [30] Radius: [2] Size: [10] Elastic: [2]\n[ Add ] String to [480] [60] Radius [2] Elastic [2] Pin: [1] Type []\n[ Add ] String to [480] [80] Radius [2] Elastic [2] Pin: [1] Type []\n[ Add ] String to [480] [100] Radius [2] Elastic [2] Pin: [] Type []\n[ Add ] Platform From [350] [15] To [600] [15] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [620] [30] Radius [3] Elastic [10] Pin: [1] Type []\n[ Add ] String to [640] [30] Radius [3] Elastic [10] Pin: [1] Type []\n[ Add ] String to [660] [30] Radius [3] Elastic [10] Pin: [1] Type []\n[ Add ] String to [680] [30] Radius [3] Elastic [10] Pin: [1] Type []\n[ Add ] String to [700] [30] Radius [3] Elastic [10] Pin: [1] Type []\n[ Add ] String to [720] [30] Radius [3] Elastic [10] Pin: [1] Type []\n[ Add ] String to [740] [15] Radius [3] Elastic [10] Pin: [] Type []\n[ Add ] String to [900] [15] Radius [5] Elastic [10] Pin: [] Type []\n[ Add ] String to [950] [15] Radius [5] Elastic [10] Pin: [] Type [gravity up]\n[ Add ] Triangle at [1000] [15] Radius: [3] Size: [10] Elastic: [2]\n[ Add ] String to [1000] [45] Radius [3] Elastic [2] Pin: [1] Type []\n[ Add ] String to [1000] [65] Radius [3] Elastic [2] Pin: [] Type []\n[ Add ] Platform From [900] [120] To [1150] [120] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [1200] [120] Radius [5] Elastic [2] Pin: [] Type [gravity down]\n[ Add ] Platform From [1150] [30] To [1400] [30] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [1400] [130] Radius [5] Elastic [2] Pin: [] Type [finish]\n\ndefine [ Setup ] Setup Data\nset [level # v] to [1]\nset [_player speed v] to [0.4]\nset [_zoom v] to [0.5]\n\nwhen I receive [\[ tick \] game loop v]\nerase all\n[ Tick ] Update Points with Quality [3]\n[ Model ] Auto Zoom\n[ Model ] Render\n\nwhen I receive [\[ setup \] start game loop v]\n[ Setup ] Reset\n\ndefine [ Setup ] Level 3\n[ Add ] Point with Position [0] [0] Radius [10] Pin [1] Type [player]\n[ Add ] Platform From [-100] [100] To [-100] [-15] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [150] [-15] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [200] [15] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [275] [15] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] Platform From [100] [-7] To [100] [20] Radius: [3] Pin: [1] [1] Type: []\n[ Add ] Platform From [80] [25] To [120] [25] Radius: [3] Pin: [1] [1] Type: []\n[ Add ] Point with Position [100] [35] Radius [7] Pin [1] Type []\n[ Add ] Triangle at [300] [15] Radius: [3] Size: [8] Elastic: [2]\n[ Add ] Point with Position [300] [15] Radius [3] Pin [] Type []\n[ Add ] Triangle at [325] [15] Radius: [3] Size: [8] Elastic: [2]\n[ Add ] Point with Position [325] [15] Radius [3] Pin [] Type []\n[ Add ] Triangle at [350] [15] Radius: [3] Size: [8] Elastic: [2]\n[ Add ] Point with Position [350] [15] Radius [3] Pin [] Type []\n[ Add ] Triangle at [375] [15] Radius: [3] Size: [8] Elastic: [2]\n[ Add ] Point with Position [375] [15] Radius [3] Pin [] Type []\n[ Add ] Triangle at [400] [15] Radius: [3] Size: [8] Elastic: [2]\n[ Add ] Point with Position [400] [15] Radius [3] Pin [] Type []\n[ Add ] Platform From [425] [15] To [500] [15] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [580] [-10] Radius [5] Elastic [] Pin: [] Type [lava]\n[ Add ] String to [650] [-10] Radius [5] Elastic [2] Pin: [] Type [lava]\n[ Add ] Platform From [593] [10] To [593] [100] Radius: [2] Pin: [1] [1] Type: []\n[ Add ] String to [583] [100] Radius [3] Elastic [2] Pin: [1] Type []\n[ Add ] Point with Position [575] [95] Radius [5] Pin [1] Type [fire]\n[ Add ] Platform From [505] [80] To [520] [300] Radius: [3] Pin: [] [] Type: []\n[ Add ] Platform From [520] [70] To [570] [85] Radius: [3] Pin: [] [] Type: []\n[ Add ] String to [598] [85] Radius [3] Elastic [2] Pin: [] Type []\n[ Add ] String to [598] [200] Radius [3] Elastic [2] Pin: [] Type []\n[ Add ] Platform From [650] [-10] To [850] [-10] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [850] [-70] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [1070] [-70] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [1070] [0] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [1250] [0] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [1250] [100] Radius [5] Elastic [2] Pin: [] Type [finish]\n[ Add ] Cube at [893] [-35] Size [30] Radius [3] Elastic [50] Type []\n[ Add ] Cube at [960] [-35] Size [30] Radius [3] Elastic [50] Type []\n[ Add ] Cube at [1026] [-35] Size [30] Radius [3] Elastic [50] Type []\n\ndefine [ Setup ] Level 4\n[ Add ] Point with Position [0] [0] Radius [10] Pin [1] Type [player]\n[ Add ] Point with Position [50] [0] Radius [10] Pin [1] Type [player]\n[ Add ] Link from [0] to [1] Radius [5] Type [] Elastic [2]\n[ Add ] Platform From [-100] [100] To [-100] [-15] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [150] [-15] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [300] [-30] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [500] [-30] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [500] [30] Radius [5] Elastic [2] Pin: [1] Type []\n[ Add ] Point with Position [550] [-30] Radius [5] Pin [] Type []\n[ Add ] String to [550] [30] Radius [5] Elastic [2] Pin: [1] Type []\n[ Add ] Point with Position [600] [-30] Radius [5] Pin [] Type []\n[ Add ] String to [600] [30] Radius [5] Elastic [2] Pin: [1] Type []\n[ Add ] Platform From [650] [-30] To [1000] [-30] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [1200] [-50] Radius [5] Elastic [2] Pin: [] Type [lava]\n[ Add ] String to [1500] [-50] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [1500] [50] Radius [5] Elastic [2] Pin: [] Type [finish]\n[ Add ] Platform From [750] [60] To [750] [30] Radius: [3] Pin: [] [1] Type: []\n[ Add ] String to [750] [0] Radius [3] Elastic [2] Pin: [] Type []\n[ Add ] Platform From [800] [-30] To [800] [0] Radius: [3] Pin: [] [1] Type: []\n[ Add ] String to [800] [30] Radius [3] Elastic [2] Pin: [] Type []\n[ Add ] Platform From [850] [60] To [850] [30] Radius: [3] Pin: [] [1] Type: []\n[ Add ] String to [850] [0] Radius [3] Elastic [2] Pin: [] Type []\n[ Add ] Platform From [900] [-30] To [900] [0] Radius: [3] Pin: [] [1] Type: []\n[ Add ] String to [900] [30] Radius [3] Elastic [2] Pin: [] Type []\n[ Add ] Cube at [350] [-10] Size [12] Radius [3] Elastic [2] Type []\n[ Add ] Triangle at [1100] [-10] Radius: [2] Size: [10] Elastic: [2]\n\ndefine [ Setup ] Level 5\n[ Add ] Point with Position [0] [0] Radius [10] Pin [1] Type [player]\n[ Add ] Platform From [-100] [100] To [-100] [-15] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [150] [-15] Radius [5] Elastic [5] Pin: [] Type []\n[ Add ] String to [300] [20] Radius [5] Elastic [5] Pin: [] Type []\n[ Add ] Point with Position [135] [21] Radius [5] Pin [1] Type [small]\n[ Add ] Platform From [150] [100] To [150] [5] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [130] [20] Radius [5] Elastic [2] Pin: [1] Type []\n[ Add ] String to [280] [20] Radius [2] Elastic [2] Pin: [1] Type []\n[ Add ] Point with Position [360] [0] Radius [5] Pin [] Type []\n[ Add ] Triangle at [360] [0] Radius: [3] Size: [8] Elastic: [2]\n[ Add ] Point with Position [440] [0] Radius [5] Pin [] Type []\n[ Add ] Triangle at [440] [0] Radius: [3] Size: [8] Elastic: [2]\n[ Add ] Platform From [340] [15] To [370] [15] Radius: [5] Pin: [1] [1] Type: []\n[ Add ] String to [400] [15] Radius [5] Elastic [2] Pin: [1] Type []\n[ Add ] String to [430] [15] Radius [5] Elastic [2] Pin: [1] Type []\n[ Add ] String to [460] [15] Radius [5] Elastic [2] Pin: [1] Type []\n[ Add ] String to [460] [-15] Radius [5] Elastic [2] Pin: [1] Type []\n[ Add ] String to [430] [-15] Radius [5] Elastic [2] Pin: [1] Type []\n[ Add ] String to [400] [-15] Radius [5] Elastic [2] Pin: [1] Type []\n[ Add ] String to [370] [-15] Radius [5] Elastic [2] Pin: [1] Type []\n[ Add ] String to [340] [-15] Radius [5] Elastic [2] Pin: [1] Type []\n[ Add ] Link from [18] to [27] Radius [5] Type [] Elastic [2]\n[ Add ] Platform From [500] [15] To [700] [15] Radius: [5] Pin: [] [] Type: []\n[ Add ] Platform From [700] [10] To [900] [10] Radius: [10] Pin: [] [] Type: [gravity up]\n[ Add ] String to [900] [150] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [1100] [150] Radius [3] Elastic [2] Pin: [] Type []\n[ Add ] Platform From [900] [175] To [700] [175] Radius: [10] Pin: [] [] Type: [gravity down]\n[ Add ] String to [700] [35] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] Point with Position [720] [30] Radius [8] Pin [1] Type []\n[ Add ] Point with Position [830] [70] Radius [5] Pin [1] Type []\n[ Add ] Point with Position [850] [50] Radius [10] Pin [1] Type []\n[ Add ] Cube at [730] [70] Size [15] Radius [6] Elastic [2] Type []\n[ Add ] Cube at [770] [50] Size [10] Radius [5] Elastic [2] Type []\n[ Add ] Triangle at [750] [100] Radius: [3] Size: [8] Elastic: [2]\n[ Add ] Platform From [1150] [250] To [1150] [150] Radius: [3] Pin: [] [] Type: []\n[ Add ] String to [1000] [100] Radius [3] Elastic [2] Pin: [] Type []\n[ Add ] Platform From [900] [75] To [1150] [75] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [1300] [30] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [1500] [30] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] String to [1500] [130] Radius [5] Elastic [2] Pin: [] Type [finish]\n[ Add ] Triangle at [1000] [115] Radius: [3] Size: [10] Elastic: [2]\n[ Add ] String to [1000] [150] Radius [2] Elastic [2] Pin: [] Type []\n\ndefine [ Setup ] Stage Clear\n[ Add ] Point with Position [0] [0] Radius [10] Pin [1] Type [player]\n[ Add ] Platform From [-100] [100] To [-100] [-15] Radius: [5] Pin: [] [] Type: []\n[ Add ] String to [400] [-15] Radius [5] Elastic [2] Pin: [] Type []\n[ Add ] Point with Position [-10] [60] Radius [3] Pin [] Type []\n[ Add ] Point with Position [0] [50] Radius [3] Pin [1] Type []\n[ Add ] Point with Position [0] [40] Radius [3] Pin [1] Type []\n[ Add ] Point with Position [10] [60] Radius [3] Pin [] Type []\n[ Add ] Link from [4] to [5] Radius [3] Type [] Elastic [10]\n[ Add ] Link from [5] to [6] Radius [3] Type [] Elastic [10]\n[ Add ] Link from [5] to [7] Radius [3] Type [] Elastic [10]\n[ Add ] Platform From [20] [60] To [35] [60] Radius: [3] Pin: [] [] Type: []\n[ Add ] String to [35] [40] Radius [3] Elastic [10] Pin: [1] Type []\n[ Add ] String to [20] [40] Radius [3] Elastic [10] Pin: [1] Type []\n[ Add ] Link from [8] to [11] Radius [3] Type [] Elastic [10]\n[ Add ] Point with Position [45] [60] Radius [3] Pin [] Type []\n[ Add ] String to [45] [40] Radius [3] Elastic [10] Pin: [1] Type []\n[ Add ] String to [60] [40] Radius [3] Elastic [10] Pin: [1] Type []\n[ Add ] String to [60] [60] Radius [3] Elastic [10] Pin: [] Type []\n[ Add ] Point with Position [85] [60] Radius [3] Pin [] Type []\n[ Add ] String to [90] [40] Radius [3] Elastic [10] Pin: [1] Type []\n[ Add ] String to [95] [60] Radius [3] Elastic [10] Pin: [] Type []\n[ Add ] String to [100] [40] Radius [3] Elastic [10] Pin: [1] Type []\n[ Add ] String to [105] [60] Radius [3] Elastic [10] Pin: [] Type []\n[ Add ] Point with Position [115] [60] Radius [3] Pin [] Type []\n[ Add ] String to [115] [40] Radius [3] Elastic [10] Pin: [1] Type []\n[ Add ] Point with Position [125] [60] Radius [3] Pin [] Type []\n[ Add ] String to [125] [40] Radius [3] Elastic [10] Pin: [1] Type []\n[ Add ] Point with Position [140] [40] Radius [3] Pin [1] Type []\n[ Add ] Link from [23] to [25] Radius [3] Type [] Elastic [10]\n[ Add ] String to [140] [60] Radius [3] Elastic [10] Pin: [] Type []\n[ Add ] Platform From [400] [-15] To [400] [100] Radius: [5] Pin: [] [] Type: []\n[ Add ] Triangle at [250] [30] Radius: [3] Size: [8] Elastic: [20]\n[ Add ] Cube at [250] [5] Size [15] Radius [3] Elastic [2] Type []\n[ Add ] Cube at [300] [0] Size [10] Radius [3] Elastic [20] Type []\n[ Add ] Triangle at [300] [25] Radius: [3] Size: [15] Elastic: [2]\n\ndefine [ Model ] Point Collision\nset [#point v] to [0]\nrepeat ((length of [points v]) / (length of [\(point information\) v]))\n    [ Model ] Point to Point Collision\n    [ Model ] Point to Link Collision\n    change [#point v] by (length of [\(point information\) v])\nend\n\ndefine [ Add ] Cube at (x) (y) Size (size) Radius (radius) Elastic (elastic) Type (type)\nset [#object v] to ((length of [points v]) / (length of [\(point information\) v]))\n[ Add ] Point with Position ((x) - (size)) ((y) - (size)) Radius (radius) Pin [1] Type (type)\n[ Add ] Point with Position ((x) - (size)) ((y) + (size)) Radius (radius) Pin [1] Type (type)\n[ Add ] Point with Position ((x) + (size)) ((y) + (size)) Radius (radius) Pin [1] Type (type)\n[ Add ] Point with Position ((x) + (size)) ((y) - (size)) Radius (radius) Pin [1] Type (type)\n[ Add ] Link from (#object) to ((#object) + (1)) Radius (radius) Type [] Elastic (elastic)\n[ Add ] Link from ((#object) + (1)) to ((#object) + (2)) Radius (radius) Type [] Elastic (elastic)\n[ Add ] Link from ((#object) + (2)) to ((#object) + (3)) Radius (radius) Type [] Elastic (elastic)\n[ Add ] Link from ((#object) + (3)) to (#object) Radius (radius) Type [] Elastic (elastic)\n[ Add ] Link from (#object) to ((#object) + (2)) Radius (radius) Type [] Elastic (elastic)\n[ Add ] Link from ((#object) + (1)) to ((#object) + (3)) Radius (radius) Type [] Elastic (elastic)\n\n@Appearance\n\nwhen flag clicked\nhide\nforever\n    set [timer v] to (timer)\nend\n\nwhen [timer v] > (timer)\nshow list [lag link v]\nshow\n\n