Sky: A Scrolling Platformer (Not-Generic)
@Stage\n\n@B L A N K\n\n@Player\n\nwhen flag clicked\nhide\nset [x v] to [0]\nset [y v] to [0]\n\ndefine Platformer engine\nchange [y v] by (-1)\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > [1]>>>> then\n    change [x v] by (1)\nend\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [1]>>>> then\n    change [x v] by (-1)\nend\nset [x v] to ((X) * (0.9))\nchange x by (X)\nif <touching color (#000000)?> then\n    change y by (1)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (-5)\n                        change x by ((X) * (-1))\n                        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<key (space v) pressed?> or <<mouse down?> and <(mouse y) > [-40]>>>>> then\n                            set [y v] to [12]\n                            if <(X) > [0]> then\n                                set [x v] to [-10]\n                            else\n                                set [x v] to [10]\n                            end\n                        else\n                            set [x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (Y)\nif <touching color (#000000)?> then\n    change y by ((Y) * (-1))\n    set [y v] to [0]\nend\nchange y by (-1)\nif <<touching color (#000000)?> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<key (space v) pressed?> or <<mouse down?> and <(mouse y) > [40]>>>>>> then\n    set [y v] to [12]\n    start sound [Jump v]\nend\nchange y by (1)\nchange [scrollx v] by ((x position) * (-1))\nchange [scrolly v] by ((y position) * (-1))\ngo to x: (0) y: (0)\nif <touching color (#ff007e)?> then\n    change [level v] by (1)\n    set [scrollx v] to [695]\n    set [scrolly v] to [-100]\nend\nif <(ScrollY) > [700]> then\n    set [scrollx v] to [695]\n    set [scrolly v] to [-100]\nend\nif <<(ScrollY) > [650]> and <(Level) > [2]>> then\n    change [level v] by (-1)\nend\n\nwhen flag clicked\nset [level: v] to [1]\nforever\n    if <(Level) = [2]> then\n        set [level: v] to [1]\n    end\n    if <(Level) = [3]> then\n        set [level: v] to [2]\n    end\n    if <(Level) = [4]> then\n        set [level: v] to [3]\n    end\n    if <(Level) = [5]> then\n        set [level: v] to [4]\n    end\n    if <(Level) = [6]> then\n        set [level: v] to [5]\n        broadcast (fix v)\n        if <(Level) = [7]> then\n            set [level: v] to [6]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > [1]>>>> then\n        switch costume to (right v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [1]>>>> then\n        switch costume to (left v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<key (space v) pressed?> or <<mouse down?> and <(mouse y) > [40]>>>>> then\n        switch costume to (up  v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<key (space v) pressed?> or <<mouse down?> and <(mouse y) > [40]>>>>> and <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > [1]>>>>> then\n        switch costume to (up right v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<key (space v) pressed?> or <<mouse down?> and <(mouse y) > [40]>>>>> and <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [1]>>>>> then\n        switch costume to (up left v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<<key (w v) pressed?> or <<key (left arrow v) pressed?> or <<key (space v) pressed?> or <<mouse down?> and <(mouse y) > [40]>>>>> and <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [1]>>>>> or <<<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<key (space v) pressed?> or <<mouse down?> and <(mouse y) > [40]>>>>> and <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > [1]>>>>> or <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<key (space v) pressed?> or <<mouse down?> and <(mouse y) > [40]>>>>> or <<<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [1]>>>> or <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > [1]>>>>>>>> then\nend\n\nwhen I receive [message1 v]\nshow\nforever\n    Platformer engine\nend\n\nwait (1) seconds\n\nwhen flag clicked\nset [lava v] to [0]\nforever\n    if <<(Level:) = [5]> and <touching color (#ff6300)?>> then\n        broadcast (lava \(lvl 5\) v)\n        set [lava v] to [1]\n    else\n        set [lava v] to [0]\n    end\nend\n\nset [scrollx v] to [695]\nset [scrolly v] to [-100]\n\nwhen I receive [fix v]\nforever\n    if <(Level:) = [5]> then\n        switch backdrop to (backdrop2 v)\n    end\nend\n\nwhen flag clicked\nset [sped fix v] to [0]\nforever\n    if <<(Level:) = [5]> and <touching color (#ff007e)?>> then\n        set [sped fix v] to [1]\n    end\nend\n\n@Platform\n\nwhen flag clicked\nset drag mode [not draggable v]\n\nwhen flag clicked\nswitch costume to (costume v)\nset size to (200) %\nswitch costume to (costume1 v)\nset [scrollx v] to [695]\nset [scrolly v] to [-100]\nset [level v] to [2]\nforever\n    go to x: (ScrollX) y: (ScrollY)\nend\n\nwhen flag clicked\nset [level v] to [2]\nforever\n    switch costume to (Level)\nend\n\nset [level v] to [5]\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        switch backdrop to (backdrop2 v)\n    else\n        switch backdrop to (backdrop1 v)\n    end\nend\n\nwhen I receive [lava \(lvl 5\) v]\nset [scrollx v] to [695]\nset [scrolly v] to [-100]\n\n@Start Screen\n\nwhen I receive [message1 v]\nhide\n\nwhen flag clicked\nshow\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    glide (1.5) secs to x: () y: (-20)\n    glide (1.5) secs to x: () y: (-10)\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        switch backdrop to (backdrop2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) < [5]> then\n        switch costume to (costume1 v)\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to [front v] layer\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (message1 v)\n        set [no more sped v] to [1]\n        hide\n    end\nend\n\nwhen I receive [message1 v]\nhide\nstop [other scripts in sprite v]\nforever\n    if <<(Level) = [7]> and <(No more sped) = [1]>> then\n        set [level v] to [2]\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    glide (1.5) secs to x: () y: (-20)\n    glide (1.5) secs to x: () y: (-10)\nend\n\n@Sprite2\n\nwhen flag clicked\ngo to [front v] layer\nshow\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        if <(No more sped) = [0]> then\n            broadcast (Speedrun v)\n            show variable [☁ wr time v]\n            show variable [time: v]\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nhide variable [☁ wr time v]\nhide variable [time: v]\nset [time: v] to [0]\nhide variable [☁ wr holder: v]\nhide variable [wr player: v]\nset [☁ incomplete v] to [0]\n\nwhen flag clicked\nhide variable [level: v]\n\nwhen I receive [message1 v]\nshow variable [level: v]\nhide\n\nwhen I receive [speedrun v]\nforever\n    if <<(Level:) = [5]> and <(sped fix) = [1]>> then\n        Speedrun\n    else\n        wait (.001) seconds\n        change [time: v] by (0.067)\n    end\nend\n\ndefine Speedrun\nbroadcast (Wr v)\nwait (.3) seconds\nstop [all v]\n\nwhen I receive [speedrun v]\nshow variable [☁ wr time v]\nbroadcast (message1 v)\n\nwhen I receive [wr v]\nforever\n    if <(☁ WR Time) > (Time:)> then\n        set [☁ wr time v] to (Time:)\n    end\nend\n\ndefine To cloud\nset [☁ wr holder: v] to []\nset [wr player: v] to [Username]\nset [score anchor v] to [1]\nrepeat (length of (WR Player:))\n    if <[player v] contains (letter (score anchor) of (WR Player:))?> then\n        set [☁ wr holder: v] to (join (☁ Wr holder:) (item # of (letter (score anchor) of (WR Player:)) in [player v]))\n        change [score anchor v] by (1)\n    else\n        change [score anchor v] by (1)\n    end\nend\n\ndefine From cloud\nset [wr player: v] to []\nset [score anchor v] to [1]\nrepeat ((length of (☁ Wr holder:)) / (2))\n    set [wr player: v] to (join (WR Player:) (item (join (letter (score anchor) of (☁ Wr holder:)) (letter ((score anchor) + (1)) of (☁ Wr holder:))) of [player v]))\n    change [score anchor v] by (2)\nend\n\nwhen flag clicked\nset [time: v] to [0]\nset [score anchor v] to [1]\n\nTo cloud\nFrom cloud\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    hide variable [☁ incomplete v]\n    glide (1.5) secs to x: () y: (-20)\n    glide (1.5) secs to x: () y: (-10)\nend\n\nwhen flag clicked\nset [no more sped v] to [0]\n\nwhen I receive [speedrun v]\nset [☁ incomplete v] to [Incomplete]\n\nset [☁ wr time v] to [40]\n\nwhen flag clicked\nforever\n    \nend\n\n@Sprite3\n\nwhen flag clicked\ngo to [front v] layer\nshow\nforever\n    set [sign \(not important\) v] to [0]\n    if <(sign \(not important\)) = [0]> then\n        change [color v] effect by (1.5)\n    else\n        wait (0.2) seconds\n        stop [this script v]\n    end\nend\n\nwhen I receive [message1 v]\nhide\nset [sign \(not important\) v] to [1]\n\nwhen I receive [speedrun v]\nhide\nset [sign \(not important\) v] to [1]\n\n@Sprite4\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\n\nwhen I receive [message1 v]\nhide\n\nwhen I receive [speedrun v]\nhide\n\n
Arrow keys or WASD (Space also works)\nMobile is now added\nPlay in fullscreen for better graphics\nIf you die then you get set back a level\nREMIX FOR A SHOUTOUT!!!\nLEVEL 5 IS HERE!!!