1 sprite scrolling platformer

Instructions: Instructions are in the game.\n\nIt is stamped

@Stage\n\n@game\n\nwhen flag clicked\nreplace item (3) of [checkpoints v] with [flag1]\nreplace item (6) of [checkpoints v] with [flag1]\nshow\nset [x start v] to [0]\nset [y start v] to [100]\nset [y_less v] to [-300]\nset [change y v] to [0]\nset [camera x v] to [0]\nset [camera y v] to [0]\nset [my x v] to [0]\nset [my y v] to [100]\nforever\n    stamp\n    player\n    reset timer\nend\n\ndefine go to (x) (y)\ngo to x: ((x) - (CAMERA X)) y: ((y) - (CAMERA Y))\n\ndefine player\nswitch costume to (player v)\ngo to (my x) (my y)\nDying?\nsides\ngravity\nDying?\nCAM\ncheckpoints\nBounce\nDying?\n\ndefine gravity\nchange [my y v] by (-1)\ngo to (my x) (my y)\nif <not <touching color (#008eff)?>> then\n    change [change y v] by (-1)\nend\nchange [my y v] by (change y)\ngo to (my x) (my y)\nif <(change y) > [0]> then\n    if <touching color (#008eff)?> then\n        change [my y v] by ((-1.5) * (change y))\n        go to (my x) (my y)\n        if <not <touching color (#008eff)?>> then\n            change [my y v] by ((1.5) * (change y))\n            go to (my x) (my y)\n            repeat until <not <touching color (#008eff)?>>\n                change [my y v] by (-1)\n                go to (my x) (my y)\n                set [change y v] to [0]\n            end\n        else\n            change [my y v] by ((1.5) * (change y))\n            go to (my x) (my y)\n        end\n    end\nend\ngo to (my x) (my y)\nif <touching color (#008eff)?> then\n    set [change y v] to [0]\n    repeat until <not <touching color (#008eff)?>>\n        go to (my x) (my y)\n        change [my y v] by (1)\n    end\n    if <key (up arrow v) pressed?> then\n        set [change y v] to [17]\n    end\n    set [y_less v] to ((my y) - (300))\nend\nchange [my y v] by (-1)\n\ndefine CAM\nchange [camera x v] by (((my x) - (CAMERA X)) / (10))\nchange [camera y v] by (((my y) - (CAMERA Y)) / (10))\nif <(CAMERA Y) < [0]> then\n    set [camera y v] to [0]\nend\nset [camera x v] to ((round ((CAMERA X) * (10))) / (10))\nset [camera y v] to ((round ((CAMERA Y) * (10))) / (10))\n\ndefine sides\nif <key (right arrow v) pressed?> then\n    change [change x v] by (1)\nend\nif <key (left arrow v) pressed?> then\n    change [change x v] by (-1)\nend\nif <touching color (#ff00fe)?> then\n    change [change x v] by (15)\nend\nset [change x v] to ((round ((change x) * (9))) / (10))\nif <([abs v] of (change x) ) > [0.5]> then\n    change [my x v] by (change x)\nend\nside collision\n\ndefine side collision\ngo to (my x) (my y)\nif <touching color (#008eff)?> then\n    change [my y v] by (1)\n    go to (my x) (my y)\n    if <touching color (#008eff)?> then\n        change [my y v] by (1)\n        go to (my x) (my y)\n        if <touching color (#008eff)?> then\n            change [my y v] by (1)\n            go to (my x) (my y)\n            if <touching color (#008eff)?> then\n                change [my y v] by (1)\n                go to (my x) (my y)\n                if <touching color (#008eff)?> then\n                    change [my y v] by (1)\n                    go to (my x) (my y)\n                    if <touching color (#008eff)?> then\n                        change [my y v] by (-5)\n                        change [my x v] by ((change x) * (-1.5))\n                        go to (my x) (my y)\n                        if <key (up arrow v) pressed?> then\n                            set [change y v] to [15]\n                            if <(change x) > [0]> then\n                                set [change x v] to [-7]\n                            else\n                                set [change x v] to [7]\n                            end\n                        else\n                            set [change x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Dying?\nif <<touching color (#ff0000)?> or <(my y) < [-80]>> then\n    set [change x v] to [0]\n    set [change y v] to [0]\n    set [camera x v] to (x start)\n    set [camera y v] to (y start)\n    set [my x v] to (x start)\n    set [my y v] to (y start)\nend\n\ndefine stamp\nswitch costume to (1 v)\nerase all\nset [counter v] to [1]\nrepeat ((length of [world v]) / (2))\n    set size to (999999) %\n    go to (item (counter) of [world v]) (item ((counter) + (1)) of [world v])\n    set size to (100) %\n    if <<(item (counter) of [world v]) = ((x position) + (CAMERA X))> and <(item ((counter) + (1)) of [world v]) = ((y position) + (CAMERA Y))>> then\n        stamp\n    end\n    change [counter v] by (2)\n    next costume\nend\nset [counter v] to [1]\nrepeat ((length of [checkpoints v]) / (3))\n    switch costume to (item ((counter) + (2)) of [checkpoints v])\n    set size to (999999) %\n    go to (item (counter) of [checkpoints v]) (item ((counter) + (1)) of [checkpoints v])\n    set size to (100) %\n    stamp\n    change [counter v] by (3)\nend\n\ndefine Bounce\nif <touching color (#feff00)?> then\n    set [change y v] to [25]\nend\n\ndefine checkpoints\nif <touching color (#ffae00)?> then\n    if <(my x) < [8000]> then\n        replace item (3) of [checkpoints v] with [flag2]\n        set [x start v] to [5150]\n        set [y start v] to [250]\n    else\n        replace item (6) of [checkpoints v] with [flag2]\n        set [x start v] to [9625]\n        set [y start v] to [500]\n    end\nend\n\n