UNDERTALE　＝Platformer＝

Instructions: RED&BLUE\n      -ADIADI11\n~Instructions:\n  *SPACE TO SWITCH COLOR\n  *If you are red, don't touch blue.\n  *If you are blue, dont touch red.\n  *Green=ENEMY\n  *Yellow:BUMP\n~Credits:\n  *Music:On my own\n~Curated by @wonderlust on 12,21,2016\n~TopLoved 12,22,2016\n~TopRemixed 12,26,2016\n\n\n\n

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop11 v)\nhide variable [dragon: v]\nhide variable [scrolls v]\n\n@lvl\n\nwhen flag clicked\nhide\nswitch backdrop to (backdrop11 v)\n\nswitch costume to (costume1 v)\n\nbroadcast (show v) and wait\nstop [all v]\n\nwhen I receive [go to background 3 v]\nswitch costume to (costume3 v)\nswitch backdrop to (backdrop3 v)\n\ngo to x: (0) y: (0)\n\nwhen I receive [go to back ground 7 v]\nshow\nswitch backdrop to (backdrop7 v)\nswitch costume to (costume6 v)\n\nwhen I receive [get out v]\nswitch costume to (costume2 v)\nswitch backdrop to (backdrop2 v)\nshow\n\nwhen I receive [go to background 4 v]\nshow\nswitch costume to (costume4 v)\nswitch backdrop to (backdrop4 v)\nwait (0.2) seconds\ngo to [front v] layer\n\nwhen I receive [go to 5 v]\nswitch backdrop to (backdrop5 v)\nswitch costume to (costume5 v)\ngo to [back v] layer\n\nwhen I receive [go to 6 v]\nswitch costume to (costume5-2 v)\nswitch backdrop to (backdrop6 v)\n\nwhen I receive [go to 8 v]\nswitch costume to (costume7 v)\nswitch backdrop to (backdrop8 v)\n\nwhen I receive [go to 9 v]\nswitch backdrop to (backdrop9 v)\nswitch costume to (costume8 v)\n\nwhen I receive [go to 10 v]\nswitch backdrop to (backdrop10 v)\nswitch costume to (costume9 v)\n\nwhen I receive [the game is on v]\nshow\nswitch costume to (costume1 v)\nswitch backdrop to (backdrop1 v)\n\nwhen flag clicked\nforever\n    play sound [Wings of Fire - UPDATED Dragonet Prophecy Song \(iTunes quality\) v] until done\nend\n\n@player\n\nwhen flag clicked\nhide\ngo to x: (-208) y: (-111)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    platform gravity: [-1] jump height: [15] side movement speed: [3] friction: [.7] slope: [8]\nend\n\nshow\n\ndefine platform gravity: (gravity) jump height: (jump height) side movement speed: (side movement speed) friction: (friction) slope: (slope)\nchange [y velocity v] by (gravity)\nchange y by (y velocity)\nif <touching (lvl v)?> then\n    repeat until <not <touching (lvl v)?>>\n        change y by ((([abs v] of (y velocity) ) / (y velocity)) * (-1))\n    end\n    set [y velocity v] to [0]\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [y velocity v] to (jump height)\n    end\nend\nset [x velocity v] to (((x velocity) + ((<<key (left arrow v) pressed?> or <key (a v) pressed?>> * ((side movement speed) * (-1))) + (<<key (right arrow v) pressed?> or <key (d v) pressed?>> * (side movement speed)))) * (friction))\nchange x by (x velocity)\nset [slope v] to [0]\nrepeat until <<(slope) = ((slope) * (-1))> or <not <touching (lvl v)?>>>\n    change y by (1)\n    change [slope v] by (-1)\nend\nif <touching (lvl v)?> then\n    change y by (slope)\n    repeat until <not <touching (lvl v)?>>\n        change x by ((([abs v] of (x velocity) ) / (x velocity)) * (-1))\n    end\nend\n\n\n\nchange y by (1)\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen backdrop switches to [backdrop2 v]\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen I receive [go to background 3 v]\ngo to x: (-199) y: (25)\n\ngo to x: (130) y: (15)\n\nshow\n\nwhen flag clicked\nset [dragon: v] to [Clay]\nset size to (250) %\nswitch costume to (costume11 v)\nrepeat until \n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (costume11 v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [go to back ground 7 v]\n\nwhen backdrop switches to [backdrop7 v]\ngo to x: (-211) y: (57)\n\nwait (0.2) seconds\ngo to [front v] layer\n\nwhen backdrop switches to [backdrop5 v]\n\nwhen [4 v] key pressed\nset [dragon: v] to [Glory]\nset size to (250) %\nswitch costume to (costume41 v)\nrepeat until <<key (1 v) pressed?> or <<key (2 v) pressed?> or <<key (3 v) pressed?> or >>>\n    if <key (z v) pressed?> then\n        switch costume to (costume421 v)\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            switch costume to (costume421 v)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (costume42 v)\n        end\n    else\n        switch costume to (costume41 v)\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            switch costume to (costume41 v)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (costume4 v)\n        end\n    end\nend\n\nwhen [3 v] key pressed\nset [dragon: v] to [Sunny]\nset size to (250) %\nswitch costume to (costume31 v)\nrepeat until <<key (1 v) pressed?> or <<key (2 v) pressed?> or >>\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (costume31 v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (costume3 v)\n    end\n    if <key (z v) pressed?> then\n        set size to (150) %\n    else\n        set size to (250) %\n    end\nend\n\nwhen [2 v] key pressed\nset [dragon: v] to [Tsunami]\nset size to (250) %\nswitch costume to (costume21 v)\nrepeat until <<key (1 v) pressed?> or >\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (costume21 v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (costume2 v)\n    end\nend\n\nwhen [1 v] key pressed\nset [dragon: v] to [Clay]\nset size to (250) %\nswitch costume to (costume11 v)\nrepeat until \n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (costume11 v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (costume1 v)\n    end\nend\n\nwhen [5 v] key pressed\nset [dragon: v] to [Starflight]\nset size to (250) %\nswitch costume to (costume51 v)\nrepeat until <<key (1 v) pressed?> or <<key (2 v) pressed?> or <<key (3 v) pressed?> or >>>\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (costume51 v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (costume5 v)\n    end\nend\n\nswitch costume to (costume31 v)\n\n\n    switch costume to (costume42 v)\nend\n\nwhen flag clicked\nforever\n    if <<touching (sprite5 v)?> and <<(dragon:) = [Sunny]> or <<(dragon:) = [Starflight]> or <<(dragon:) = [Tsunami]> or <(dragon:) = [Glory]>>>>> then\n        go to x: (-210) y: (-104)\n        say [AAAH! TO HOT!] for (0.2) seconds\n    end\nend\n\nbroadcast (go to background 4 v)\n\n\n\ngo to x: (-185) y: (96)\n\nwhen I receive [get out v]\ngo to x: (-211) y: (-108)\n\nbroadcast (go to back ground 7 v)\n\nforever\n    if <touching color (#60cfff)?> then\n        broadcast (go to background 4 v)\n        go to x: (-211) y: (-108)\n    end\nend\n\nwait (0.1) seconds\n\nforever\n    if <touching color (#00b3ff)?> then\n        broadcast (message1 v)\n    end\nend\n\nforever\n    if <touching color (#43c7ff)?> then\n        broadcast (go to background 3 v)\n        go to x: (-199) y: (25)\n    end\nend\n\ngo to x: (-183) y: (-106)\ngo to x: (-199) y: (25)\n\nforever\n    if <touching (sprite5 v)?> then\n        go to x: (-130) y: (54)\n    end\nend\n\ngo to x: (-214) y: (-104)\n\nwhen I receive [go to background 4 v]\ngo to x: (-199) y: (25)\n\nwhen I receive [go to 5 v]\ngo to x: (-211) y: (-108)\n\nwhen I receive [go to 6 v]\ngo to x: (-211) y: (-108)\n\nwhen [r v] key pressed\ngo to x: (-186) y: (-89)\n\nwhen flag clicked\n\ngo to [front v] layer\n\nwhen I receive [go to 8 v]\ngo to x: (-206) y: (-66)\n\nwhen backdrop switches to [backdrop7 v]\nforever\n    if <<touching (sprite7 v)?> and <<(dragon:) = [Sunny]> or <<(dragon:) = [Starflight]> or <<(dragon:) = [Clay]> or <(dragon:) = [Glory]>>>>> then\n        go to x: (-210) y: (-104)\n        say [Wow, to cold for me!] for (0.7) seconds\n    end\nend\n\ngo to [front v] layer\n\nwhen I receive [go to 9 v]\ngo to x: (-234) y: (-101)\n\nwhen I receive [i found u v]\ngo to x: (-234) y: (-101)\n\nwhen I receive [go to 10 v]\ngo to x: (-234) y: (-101)\n\nwhen I receive [the game is on v]\nshow\n\n@Sprite1\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (get out v)\n        stop [this script v]\n    end\nend\n\nsay [Hello!] for (2) seconds\n\nwhen backdrop switches to [backdrop2 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to background 3 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\n\nhide\n\nwhen backdrop switches to [backdrop3 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to background 4 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop4 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to 5 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop5 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to 6 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop6 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to back ground 7 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop7 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to 8 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop8 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to 9 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop9 v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (go to 10 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop10 v]\nhide\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop2 v]\n\nshow\n\nwhen backdrop switches to [backdrop3 v]\n\nhide\n\nwhen backdrop switches to [backdrop10 v]\nhide\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop3 v]\n\nshow\n\nwhen backdrop switches to [backdrop4 v]\nhide\n\nrepeat until <<key (1 v) pressed?> or <<key (2 v) pressed?> or <<key (3 v) pressed?> or <<key (4 v) pressed?> or <key (5 v) pressed?>>>>>\n\nwhen backdrop switches to [backdrop10 v]\nhide\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop4 v]\ngo to [front v] layer\nswitch costume to (costume1 v)\nshow\n\nwhen backdrop switches to [backdrop5 v]\n\nwhen backdrop switches to [backdrop5 v]\nhide\nswitch costume to (costume3 v)\n\nwhen backdrop switches to [backdrop7 v]\nhide\n\nswitch costume to (costume2 v)\nshow\n\nwhen backdrop switches to [backdrop8 v]\nhide\n\nshow\n\nif <touching (player v)?> then\n    switch costume to (costume4 v)\n    wait (0.5) seconds\n    switch costume to (costume3 v)\n    forever\n        wait (5) seconds\n    end\nend\n\nwhen backdrop switches to [backdrop10 v]\nhide\n\n@Sprite2\n\nwhen flag clicked\nset [scrolls v] to [0]\nhide\nforever\n    turn left (30) degrees\n    wait (0.3) seconds\n    turn right (30) degrees\n    wait (0.3) seconds\nend\n\nwhen I start as a clone\n\nwhen backdrop switches to [backdrop3 v]\ngo to x: (92) y: (-100)\nshow\nforever\n    if <touching (player v)?> then\n        hide\n        change [scrolls v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\n\ncreate clone of (_myself_ v)\n\nwhen backdrop switches to [backdrop4 v]\ngo to x: (14) y: (102)\nshow\nforever\n    if <touching (player v)?> then\n        hide\n        change [scrolls v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop5 v]\ngo to x: (29) y: (-112)\nshow\ngo to [back v] layer\nforever\n    if <touching (player v)?> then\n        hide\n        change [scrolls v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop6 v]\ngo to x: (92) y: (-100)\nshow\ngo to [front v] layer\nforever\n    if <touching (player v)?> then\n        hide\n        change [scrolls v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop7 v]\ngo to x: (-150) y: (-69)\nshow\ngo to [back v] layer\nforever\n    if <touching (player v)?> then\n        hide\n        change [scrolls v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop8 v]\ngo to x: (-137) y: (106)\nshow\ngo to [front v] layer\nforever\n    if <touching (player v)?> then\n        hide\n        change [scrolls v] by (1)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop9 v]\ngo to x: (171) y: (-18)\nshow\ngo to [front v] layer\nforever\n    if <touching (player v)?> then\n        hide\n        change [scrolls v] by (1)\n        stop [this script v]\n    end\nend\n\n@Sprite6\n\nwhen backdrop switches to [backdrop5 v]\nforever\n    if <(dragon:) = [Starflight]> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [go to 5 v]\n\nwhen backdrop switches to [backdrop6 v]\nforever\n    hide\nend\n\nwhen backdrop switches to [backdrop10 v]\nhide\n\n@Sprite7\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nwhen backdrop switches to [backdrop7 v]\nswitch costume to (costume1 v)\nshow\nwait (0.1) seconds\ngo to [front v] layer\n\nwhen backdrop switches to [backdrop8 v]\nswitch costume to (costume2 v)\ngo to [front v] layer\nshow\n\nwhen backdrop switches to [backdrop9 v]\nhide\n\nwhen backdrop switches to [backdrop10 v]\nhide\n\n@KESTREL\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop9 v]\nshow\ngo to [back v] layer\nforever\n    if <touching color (#000000)?> then\n        broadcast (I FOUND U v)\n        say [I SEE YOU! GET BACK THERE!] for (0.4) seconds\n    end\nend\n\nwhen flag clicked\n\nwhen backdrop switches to [backdrop10 v]\nhide\n\nwhen backdrop switches to [backdrop10 v]\nhide\n\nwhen backdrop switches to [backdrop10 v]\nstop [other scripts in sprite v]\n\n@Sprite8\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop10 v]\nshow\ngo to [back v] layer\n\n@Sprite9\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop7 v]\nshow\nforever\n    if <touching (player v)?> then\n        hide\n    else\n    end\nend\n\nshow\n\n@Sprite10\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop10 v]\nshow\nforever\n    if <(scrolls) = [7]> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\n@Sprite11\n\nwhen flag clicked\ngo to x: (105) y: (-59)\nshow\n\nwhen this sprite clicked\nhide\nbroadcast (the game is on v)\nshow variable [dragon: v]\nshow variable [scrolls v]\n\n