Scrolling Platformer Tutorial!! #tutorials #all

Instructions: The custom blocks are all run without screen refresh\n\nScripts are inside\n\nThis was added to the "Improve your platformer" studio by @--LazerBlitz--  wow!\n\nNo ads except when someone needs help with scripts then yes you can ask and other people will (hopefully) help!\n\nHow is (was) this on trending #11\n\nThere will be a Part 2!\n\n@StratfordJames for some art in the thumbnail.\n\n#tutorials #tutorial #all #scrolling #platformer 

@Stage\n\n@SLides\n\nwhen flag clicked\nReset\nforever\n    if <not <(costume [number v]) = (last costume)>> then\n        if <<key (space v) pressed?> or <<mouse down?> or <key (right arrow v) pressed?>>> then\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            next costume\n            repeat (10)\n                change [ghost v] effect by (-10)\n            end\n        end\n    end\n    if <not <(costume [number v]) = (first costume)>> then\n        if <key (left arrow v) pressed?> then\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            switch costume to ((costume [number v]) - (1))\n            repeat (10)\n                change [ghost v] effect by (-10)\n            end\n        end\n    end\nend\n\ndefine Reset\nclear graphic effects\nswitch costume to (intro v)\nset [first costume v] to (costume [number v])\nswitch costume to ((costume [number v]) - (1))\nset [last costume v] to (costume [number v])\nswitch costume to (intro v)\ngo to x: (0) y: (0)\n\n@Player Scripts\n\nwhen flag clicked\nhide\nbroadcast (Start Game v)\n\ndefine Reset\nset [x v] to [0]\nset [y v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [scroll x v] to (x)\nset [scroll y v] to (y)\nset [sky time v] to [0]\nshow\nclear graphic effects\n\nwhen I receive [start game v]\nReset\nforever\n    Tick\nend\n\ndefine Tick\nGame\nchange [x v] by (sx)\nchange [y v] by (sy)\nset [scroll x v] to (round (x))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(SCROLL Y) > [-150]> then\n    set [scroll y v] to (round ((y) / (4)))\nend\nbroadcast (Tick v)\nPosition\nchange [sky time v] by (1)\nchange y by (-1)\nif <touching (ground scripts v)?> then\n    set [sky time v] to [0]\nend\nchange y by (1)\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Game\nif <(sy) > [-25]> then\n    change [sy v] by (-1)\nend\nSpeed [2] friction [0.7]\nJump hieght [14]\nslope [8]\n\ndefine Speed (speed) friction (friction)\nchange [sx v] by ((<<key (right arrow v) pressed?> or <key (d v) pressed?>> - <<key (a v) pressed?> or <key (left arrow v) pressed?>>) * (speed))\nset [sx v] to ((sx) * (friction))\nchange x by (sx)\n\ndefine Jump hieght (hieght)\nif <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <(sky time) < [2]>> then\n    set [sy v] to (hieght)\nend\n\ndefine slope (slope)\nset [slope v] to [0]\nrepeat until <<(slope) = (slope)> or <not <touching (ground scripts v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <touching (ground scripts v)?> then\n    change y by ((slope) * (-1))\n    repeat until <not <touching (ground scripts v)?>>\n        change x by ((sx) * (-1))\n    end\n    set [sx v] to [0]\nend\nchange y by (sy)\nif <touching (ground scripts v)?> then\n    repeat until <not <touching (ground scripts v)?>>\n        change y by ((sy) * (-1))\n    end\n    set [sy v] to [0]\nend\n\n@Ground Scripts\n\nwhen flag clicked\nset [y v] to [0]\nset [x v] to [0]\nhide\n\nwhen I receive [start game v]\nswitch costume to (1 v)\nclone distance x: [480] y: [0]\nclone distance x: [360] y: [100]\n\ndefine clone distance x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\nif <<((x) - (SCROLL X)) = (x position)> and <((y) - (SCROLL Y)) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [tick v]\nPosition\n\n@NailThumb\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\ngo to [front v] layer\n\n