Cube Quest (Platformer) #Games #Cube Quest #Platformer #NolanPH

Instructions:                                    CUBE QUEST\n----------------------------------------------------------------------------\n\nYou can press D to see how many times you have died, and press D again to hide it.\n\nM to toggle music on and off\n\nInstructions are in the levels.\n\nALL LEVELS ARE POSSIBLE!!!\n\nThanks for playing!

@Stage\n\nwhen flag clicked\nforever\n    if <(Level) = [S1]> then\n        switch backdrop to (s1 v)\n    else\n        if <(Level) = [S2]> then\n            switch backdrop to (s2 v)\n        else\n            if <(Level) = [S3]> then\n                switch backdrop to (s3 v)\n            else\n                switch backdrop to (Level)\n            end\n        end\n    end\nend\n\n@Level\n\nwhen I receive [win v]\nchange [level v] by (1)\nif <(Level) = [1]> then\n    switch costume to (1 v)\nend\nif <(Level) = [61]> then\n    broadcast (WIN GAME v)\nend\nif <not <<(Level) = [1]> or <(Level) = [61]>>> then\n    next costume\nend\n\nwhen I receive [secret exit v]\nwait (.1) seconds\nswitch costume to (Level)\n\nwhen flag clicked\nset [skips v] to [0]\n\n@Hazards\n\nwhen I receive [win v]\nwait (.1) seconds\nif <(Level) = [1]> then\n    switch costume to (1 v)\nend\nif <not <(Level) = [1]>> then\n    next costume\nend\n\nwhen I receive [secret exit v]\nwait (.1) seconds\nswitch costume to (Level)\n\n@You\n\nwhen flag clicked\nforever\n    if <<key (right arrow v) pressed?> and <not <key (down arrow v) pressed?>>> then\n        switch costume to (r v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <key (down arrow v) pressed?>>> then\n        switch costume to (f v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (left arrow v) pressed?> and <not <key (down arrow v) pressed?>>> then\n        switch costume to (l v)\n    end\nend\n\nwhen flag clicked\nset [deaths v] to [0]\n\nwhen I receive [bleh v]\nchange [deaths v] by (1)\nset [x motion v] to [0]\nset [y motion v] to [0]\ngo to x: (-210) y: (-89)\nwait (.00001) seconds\nif <(Level) = [43]> then\n    go to x: (160) y: (-89)\nend\n\nwhen I receive [win v]\nset [x motion v] to [0]\nset [y motion v] to [0]\ngo to x: (-210) y: (-89)\nwait (.00001) seconds\nif <(Level) = [43]> then\n    go to x: (160) y: (-89)\nend\n\nwhen [r v] key pressed\nchange [deaths v] by (-1)\nbroadcast (bleh v)\n\nwhen flag clicked\nforever\n    if <key (left arrow v) pressed?> then\n        change [x motion v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        change [x motion v] by (1)\n    end\n    set [x motion v] to ((X motion) * (.85))\n    change x by (X motion)\n    if <<<touching (level v)?> or <touching (wood board v)?>> or <<touching (door v)?> or <touching (button v)?>>> then\n        change y by (1)\n    end\n    if <<<touching (level v)?> or <touching (wood board v)?>> or <<touching (door v)?> or <touching (button v)?>>> then\n        change y by (1)\n    end\n    if <<<touching (level v)?> or <touching (wood board v)?>> or <<touching (door v)?> or <touching (button v)?>>> then\n        change y by (1)\n    end\n    if <<<touching (level v)?> or <touching (wood board v)?>> or <<touching (door v)?> or <touching (button v)?>>> then\n        change y by (1)\n    end\n    if <<<touching (level v)?> or <touching (wood board v)?>> or <<touching (door v)?> or <touching (button v)?>>> then\n        change y by (-4)\n        change x by ((X motion) * (-1))\n        if <key (up arrow v) pressed?> then\n            if <(X motion) > [0]> then\n                set [x motion v] to [-7]\n            else\n                set [x motion v] to [7]\n            end\n            set [y motion v] to [10]\n        else\n            set [x motion v] to [0]\n        end\n    end\n    change [y motion v] by (-.7)\n    change y by (Y motion)\n    if <<not <key (down arrow v) pressed?>> and <<<touching (level v)?> or <touching (wood board v)?>> or <<touching (door v)?> or <touching (button v)?>>>> then\n        change y by ((Y motion) - ((Y motion) * (2)))\n        set [y motion v] to [0]\n    else\n        if <<key (down arrow v) pressed?> and <<touching (level v)?> or <<touching (button v)?> or <touching (door v)?>>>> then\n            change y by ((Y motion) - ((Y motion) * (1.7)))\n            set [y motion v] to [0]\n        end\n    end\n    change y by (-1)\n    if <<<<touching (level v)?> or <touching (wood board v)?>> or <<touching (door v)?> or <touching (button v)?>>> and <key (up arrow v) pressed?>> then\n        set [y motion v] to [10]\n    end\n    if <<not <<<touching (level v)?> or <touching (wood board v)?>> or <<touching (door v)?> or <touching (button v)?>>>> and <key (down arrow v) pressed?>> then\n        set [y motion v] to [-15]\n    end\n    change y by (1)\n    if <<touching color (#ff0000)?> and <not <touching (secret portal v)?>>> then\n        broadcast (bleh v)\n    end\nend\n\nwhen flag clicked\nforever\n    set [x \(you\) v] to (x position)\n    set [y \(you\) v] to (y position)\nend\n\nwhen flag clicked\nforever\n    if <<not <<<touching (level v)?> or <touching (button v)?>> or <<touching (wood board v)?> or <touching (door v)?>>>> and <key (down arrow v) pressed?>> then\n        switch costume to (d v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<touching (level v)?> or <touching (door v)?>> and <key (down arrow v) pressed?>> then\n        switch costume to (f v)\n    end\nend\n\nwhen flag clicked\nset [skips v] to [0]\nforever\n    if <key (s v) pressed?> then\n        if <<(Level) = [S1]> or <(Level) = [S2]>> then\n            if <(Level) = [S1]> then\n                set [level v] to [24]\n            end\n            if <(Level) = [S2]> then\n                set [level v] to [35]\n            end\n            broadcast (Secret Exit v)\n            change [skips v] by (1)\n            show variable [skips v]\n            wait (.5) seconds\n            hide variable [skips v]\n        else\n            broadcast (Win v)\n            change [skips v] by (1)\n            show variable [skips v]\n            wait (.5) seconds\n            hide variable [skips v]\n        end\n    end\nend\n\nwhen I receive [secret exit v]\nset [x motion v] to [0]\nset [y motion v] to [0]\ngo to x: (-210) y: (-89)\n\nwhen flag clicked\nhide variable [deaths v]\nforever\n    wait until <key (d v) pressed?>\n    show variable [deaths v]\n    wait (.5) seconds\n    wait until <key (d v) pressed?>\n    hide variable [deaths v]\n    wait (.5) seconds\nend\n\nwhen flag clicked\nforever\n    set [your score v] to (Deaths)\nend\n\nwhen flag clicked\nhide variable [☁ highscore v]\nhide variable [your score v]\n\nwhen I receive [you won v]\nshow variable [your score v]\nif <<<(Your Score) < (☁ Highscore)> and <(Skips) = [0]>> and <not <(username) = [NolanPH]>>> then\n    set [☁ highscore v] to (Your Score)\n    broadcast (YGTH v)\nend\nif <<<(Your Score) < (☁ Highscore)> and <(Skips) = [0]>> and <(username) = [NolanPH]>> then\n    broadcast (YGTH v)\nend\nshow variable [☁ highscore v]\nshow variable [☁ highscore v]\n\nwhen I receive [you won v]\nif <(Skips) = [0]> then\n    change [true warriors v] by (1)\nend\n\n@Portal\n\nwhen flag clicked\nset [whirl v] effect to (1000)\n\nwhen flag clicked\nforever\n    if <touching (you v)?> then\n        broadcast (Win v)\n        wait (.5) seconds\n    end\nend\n\nwhen I receive [win v]\nwait (.0001) seconds\nswitch costume to (portal v)\nset [whirl v] effect to (1000)\nshow\nif <(Level) = [1]> then\n    go to x: (-161) y: (162)\nend\nif <(Level) = [2]> then\n    go to x: (201) y: (161)\nend\nif <(Level) = [3]> then\n    go to x: (0) y: (76)\nend\nif <(Level) = [4]> then\n    go to x: (-166) y: (88)\nend\nif <(Level) = [5]> then\n    go to x: (208) y: (121)\nend\nif <(Level) = [6]> then\n    go to x: (-217) y: (94)\nend\nif <(Level) = [7]> then\n    go to x: (211) y: (-118)\nend\nif <(Level) = [8]> then\n    go to x: (211) y: (-11)\nend\nif <(Level) = [9]> then\n    go to x: (-133) y: (-25)\nend\nif <(Level) = [10]> then\n    go to x: (183) y: (59)\nend\nif <(Level) = [11]> then\n    go to x: (-216) y: (-141)\nend\nif <(Level) = [12]> then\n    go to x: (120) y: (150)\nend\nif <(Level) = [13]> then\n    go to x: (205) y: (-130)\nend\nif <(Level) = [14]> then\n    go to x: (212) y: (157)\nend\nif <(Level) = [15]> then\n    go to x: (199) y: (-125)\nend\nif <(Level) = [16]> then\n    go to x: (-219) y: (119)\nend\nif <(Level) = [17]> then\n    go to x: (-214) y: (67)\nend\nif <(Level) = [18]> then\n    go to x: (-10) y: (-72)\nend\nif <(Level) = [19]> then\n    go to x: (-217) y: (-139)\nend\nif <(Level) = [20]> then\n    go to x: (-217) y: (-139)\nend\nif <(Level) = [21]> then\n    go to x: (214) y: (-119)\nend\nif <(Level) = [22]> then\n    go to x: (-221) y: (150)\nend\nif <(Level) = [23]> then\n    go to x: (220) y: (-141)\nend\nif <(Level) = [24]> then\n    go to x: (-200) y: (-28)\nend\nif <(Level) = [25]> then\n    go to x: (0) y: (76)\nend\nif <(Level) = [26]> then\n    go to x: (-213) y: (120)\nend\nif <(Level) = [27]> then\n    go to x: (210) y: (-140)\nend\nif <(Level) = [28]> then\n    go to x: (-200) y: (30)\nend\nif <(Level) = [29]> then\n    go to x: (213) y: (-146)\nend\nif <(Level) = [30]> then\n    go to x: (-202) y: (143)\nend\nif <(Level) = [31]> then\n    go to x: (-94) y: (159)\nend\nif <(Level) = [32]> then\n    go to x: (215) y: (-88)\nend\nif <(Level) = [33]> then\n    go to x: (-197) y: (144)\nend\nif <(Level) = [34]> then\n    go to x: (-218) y: (-149)\nend\nif <(Level) = [35]> then\n    go to x: (130) y: (111)\nend\nif <(Level) = [36]> then\n    go to x: (217) y: (123)\nend\nif <(Level) = [37]> then\n    go to x: (-209) y: (-147)\nend\nif <(Level) = [38]> then\n    go to x: (0) y: (-151)\nend\nif <(Level) = [39]> then\n    go to x: (-215) y: (74)\nend\nif <(Level) = [40]> then\n    go to x: (208) y: (-143)\nend\nif <(Level) = [41]> then\n    set [randomizer v] to (pick random (1) to (3))\n    if <(randomizer) = [1]> then\n        go to x: (204) y: (90)\n    end\n    if <(randomizer) = [2]> then\n        go to x: (209) y: (-52)\n    end\n    if <(randomizer) = [3]> then\n        go to x: (208) y: (-145)\n    end\nend\nif <(Level) = [42]> then\n    switch costume to (tent v)\n    go to x: (209) y: (-160)\n    clear graphic effects\nend\nif <(Level) = [43]> then\n    go to x: (-210) y: (-145)\nend\nif <(Level) = [44]> then\n    go to x: (-211) y: (-9)\nend\nif <(Level) = [45]> then\n    go to x: (210) y: (-16)\nend\nif <(Level) = [46]> then\n    go to x: (198) y: (-143)\nend\nif <(Level) = [47]> then\n    go to x: (207) y: (-131)\nend\nif <(Level) = [48]> then\n    go to x: (207) y: (-131)\nend\nif <(Level) = [49]> then\n    go to x: (207) y: (-131)\nend\nif <(Level) = [50]> then\n    go to x: (162) y: (40)\nend\nif <(Level) = [51]> then\n    go to x: (203) y: (72)\nend\nif <(Level) = [52]> then\n    go to x: (209) y: (-67)\nend\nif <(Level) = [53]> then\n    go to x: (214) y: (-134)\nend\nif <(Level) = [54]> then\n    go to x: (214) y: (-134)\nend\nif <(Level) = [55]> then\n    go to x: (-210) y: (13)\nend\nif <(Level) = [56]> then\n    go to x: (204) y: (-22)\nend\nif <(Level) = [57]> then\n    go to x: (204) y: (-22)\nend\nif <(Level) = [58]> then\n    go to x: (211) y: (-126)\nend\nif <(Level) = [59]> then\n    go to x: (162) y: (66)\nend\nif <(Level) = [60]> then\n    go to x: (0) y: (-131)\n    switch costume to (treasure v)\n    clear graphic effects\nend\n\nwhen I receive [secret exit v]\nwait (.1) seconds\nif <(Level) = [S1]> then\n    hide\nend\nif <(Level) = [24]> then\n    go to x: (-200) y: (-28)\n    show\nend\nif <(Level) = [S2]> then\n    hide\nend\nif <(Level) = [35]> then\n    go to x: (130) y: (111)\n    show\nend\nif <(Level) = [S3]> then\n    hide\nend\nif <(Level) = [59]> then\n    go to x: (162) y: (66)\n    show\nend\n\nwhen I receive [bleh v]\nif <(Level) = [41]> then\n    set [randomizer v] to (pick random (1) to (3))\n    if <(randomizer) = [1]> then\n        go to x: (204) y: (90)\n    end\n    if <(randomizer) = [2]> then\n        go to x: (209) y: (-52)\n    end\n    if <(randomizer) = [3]> then\n        go to x: (208) y: (-145)\n    end\nend\n\n@Enemy 1\n\nwhen I receive [bleh v]\nbroadcast (R1 v)\n\nwhen flag clicked\nforever\n    if <(X \(You\)) > (x position)> then\n        switch costume to (r v)\n    end\n    if <(X \(You\)) < (x position)> then\n        switch costume to (l v)\n    end\n    if <(X \(You\)) = (x position)> then\n        switch costume to (f v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(X \(You\)) < (x position)> then\n        change [ex1 v] by (-1)\n    end\n    if <(X \(You\)) > (x position)> then\n        change [ex1 v] by (1)\n    end\n    set [ex1 v] to ((EX1) * (.85))\n    change x by (EX1)\n    if <<<touching (level v)?> or <touching (door v)?>> or <<touching (wood board v)?> or <touching (button v)?>>> then\n        change y by (1)\n    end\n    if <<<touching (level v)?> or <touching (door v)?>> or <<touching (wood board v)?> or <touching (button v)?>>> then\n        change y by (1)\n    end\n    if <<<touching (level v)?> or <touching (door v)?>> or <<touching (wood board v)?> or <touching (button v)?>>> then\n        change y by (1)\n    end\n    if <<<touching (level v)?> or <touching (door v)?>> or <<touching (wood board v)?> or <touching (button v)?>>> then\n        change y by (1)\n    end\n    if <<<touching (level v)?> or <touching (door v)?>> or <<touching (wood board v)?> or <touching (button v)?>>> then\n        change y by (-4)\n        change x by ((EX1) * (-1))\n        if <(Y \(You\)) > (y position)> then\n            if <(EX1) > [0]> then\n                set [ex1 v] to [-7]\n            else\n                set [ex1 v] to [7]\n            end\n            set [ey1 v] to [10]\n        else\n            set [ex1 v] to [0]\n        end\n    end\n    change [ey1 v] by (-.7)\n    change y by (EY1)\n    if <<<touching (level v)?> or <touching (door v)?>> or <<touching (wood board v)?> or <touching (button v)?>>> then\n        change y by ((EY1) - ((EY1) * (2)))\n        set [ey1 v] to [0]\n    end\n    change y by (-1)\n    if <<<<touching (level v)?> or <touching (door v)?>> or <<touching (wood board v)?> or <touching (button v)?>>> and <(Y \(You\)) > (y position)>> then\n        set [ey1 v] to [10]\n    end\n    change y by (1)\n    if <<touching (sword v)?> and <(Swing?) = [1]>> then\n        hide\n    end\nend\n\nwhen I receive [win v]\nwait (.1) seconds\nbroadcast (R1 v)\n\nwhen I receive [r1 v]\nwait (.01) seconds\nif <(Level) = [1]> then\n    hide\nend\nif <(Level) = [5]> then\n    go to x: (-49) y: (-34)\n    show\nend\nif <(Level) = [6]> then\n    go to x: (173) y: (-101)\n    show\nend\nif <(Level) = [7]> then\n    hide\nend\nif <(Level) = [10]> then\n    show\n    go to x: (69) y: (-20)\nend\nif <(Level) = [11]> then\n    hide\nend\nif <(Level) = [20]> then\n    show\n    go to x: (183) y: (-133)\nend\nif <(Level) = [21]> then\n    hide\nend\nif <(Level) = [30]> then\n    show\n    go to x: (183) y: (-133)\nend\nif <(Level) = [31]> then\n    hide\nend\nif <(Level) = [41]> then\n    show\n    go to x: (183) y: (133)\nend\nif <(Level) = [42]> then\n    hide\nend\n\n@Enemy 2\n\nwhen I receive [bleh v]\nbroadcast (R2 v)\n\nwhen flag clicked\nforever\n    if <(X \(You\)) > (x position)> then\n        switch costume to (r v)\n    end\n    if <(X \(You\)) < (x position)> then\n        switch costume to (l v)\n    end\n    if <(X \(You\)) = (x position)> then\n        switch costume to (f v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(X \(You\)) < (x position)> then\n        change [ex2 v] by (-1)\n    end\n    if <(X \(You\)) > (x position)> then\n        change [ex2 v] by (1)\n    end\n    set [ex2 v] to ((EX2) * (.85))\n    change x by (EX2)\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (-4)\n        change x by ((EX2) * (-1))\n        if <(Y \(You\)) > (y position)> then\n            if <(EX2) > [0]> then\n                set [ex2 v] to [-7]\n            else\n                set [ex2 v] to [7]\n            end\n            set [ey2 v] to [10]\n        else\n            set [ex2 v] to [0]\n        end\n    end\n    change [ey2 v] by (-.7)\n    change y by (EY2)\n    if <touching (level v)?> then\n        change y by ((EY2) - ((EY2) * (2)))\n        set [ey2 v] to [0]\n    end\n    change y by (-1)\n    if <<touching (level v)?> and <(Y \(You\)) > (y position)>> then\n        set [ey2 v] to [10]\n    end\n    change y by (1)\n    if <<touching (sword v)?> and <(Swing?) = [1]>> then\n        hide\n    end\nend\n\nwhen I receive [win v]\nwait (.1) seconds\nbroadcast (R2 v)\n\nwhen I receive [r2 v]\nif <(Level) = [1]> then\n    hide\nend\nif <(Level) = [6]> then\n    go to x: (51) y: (-144)\n    show\nend\nif <(Level) = [7]> then\n    hide\nend\nif <(Level) = [8]> then\n    go to x: (192) y: (28)\n    show\nend\nif <(Level) = [9]> then\n    hide\nend\nif <(Level) = [10]> then\n    go to x: (159) y: (-78)\n    show\nend\nif <(Level) = [11]> then\n    go to x: (72) y: (20)\n    show\nend\nif <(Level) = [12]> then\n    hide\nend\nif <(Level) = [30]> then\n    show\n    go to x: (83) y: (-133)\nend\nif <(Level) = [31]> then\n    hide\nend\nif <(Level) = [41]> then\n    show\n    go to x: (-5) y: (104)\nend\nif <(Level) = [42]> then\n    hide\nend\n\n@Enemy 3\n\nwhen I receive [bleh v]\nbroadcast (R3 v)\n\nwhen flag clicked\nforever\n    if <(X \(You\)) > (x position)> then\n        switch costume to (r v)\n    end\n    if <(X \(You\)) < (x position)> then\n        switch costume to (l v)\n    end\n    if <(X \(You\)) = (x position)> then\n        switch costume to (f v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(X \(You\)) < (x position)> then\n        change [ex3 v] by (-1)\n    end\n    if <(X \(You\)) > (x position)> then\n        change [ex3 v] by (1)\n    end\n    set [ex3 v] to ((EX3) * (.85))\n    change x by (EX3)\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (-4)\n        change x by ((EX3) * (-1))\n        if <(Y \(You\)) > (y position)> then\n            if <(EX3) > [0]> then\n                set [ex3 v] to [-7]\n            else\n                set [ex3 v] to [7]\n            end\n            set [ey3 v] to [10]\n        else\n            set [ex3 v] to [0]\n        end\n    end\n    change [ey3 v] by (-.7)\n    change y by (EY3)\n    if <touching (level v)?> then\n        change y by ((EY3) - ((EY3) * (2)))\n        set [ey3 v] to [0]\n    end\n    change y by (-1)\n    if <<touching (level v)?> and <(Y \(You\)) > (y position)>> then\n        set [ey3 v] to [10]\n    end\n    change y by (1)\n    if <<touching (sword v)?> and <(Swing?) = [1]>> then\n        hide\n    end\nend\n\nwhen I receive [win v]\nwait (.1) seconds\nbroadcast (R3 v)\n\nwhen I receive [r3 v]\nif <(Level) = [1]> then\n    hide\nend\nif <(Level) = [6]> then\n    go to x: (-26) y: (-143)\n    show\nend\nif <(Level) = [7]> then\n    hide\nend\nif <(Level) = [8]> then\n    show\n    go to x: (207) y: (-148)\nend\nif <(Level) = [9]> then\n    hide\nend\nif <(Level) = [10]> then\n    show\n    go to x: (28) y: (-159)\nend\nif <(Level) = [11]> then\n    hide\nend\nif <(Level) = [30]> then\n    show\n    go to x: (183) y: (133)\nend\nif <(Level) = [31]> then\n    hide\nend\nif <(Level) = [41]> then\n    show\n    go to x: (135) y: (150)\nend\nif <(Level) = [42]> then\n    hide\nend\n\n@Sword\n\nwhen flag clicked\nset [swing? v] to [0]\ngo to x: (0) y: (-130)\nswitch costume to (collectable v)\nhide\nwait until <(Level) = [3]>\nshow\nwait until <touching (you v)?>\nforever\n    if <<key (left arrow v) pressed?> and <(Swing?) = [0]>> then\n        switch costume to (l v)\n        set [sword direction v] to [-1]\n    end\n    if <<key (right arrow v) pressed?> and <(Swing?) = [0]>> then\n        switch costume to (r v)\n        set [sword direction v] to [1]\n    end\n    if <(Sword Direction) = [1]> then\n        go to x: ((X \(You\)) + (16)) y: ((Y \(You\)) + (9))\n    end\n    if <(Sword Direction) = [-1]> then\n        go to x: ((X \(You\)) - (16)) y: ((Y \(You\)) + (9))\n    end\n    if <<<key (space v) pressed?> and <(Swing?) = [0]>> and <(Sword Direction) = [1]>> then\n        broadcast (Swing v)\n        set [swing? v] to [1]\n    end\n    if <<<key (space v) pressed?> and <(Swing?) = [0]>> and <(Sword Direction) = [-1]>> then\n        broadcast (SL v)\n        set [swing? v] to [1]\n    end\nend\n\nwhen I receive [swing v]\nswitch costume to (rs1 v)\nwait (.03) seconds\nswitch costume to (rs2 v)\nwait (.03) seconds\nswitch costume to (rs3 v)\nwait (.03) seconds\nswitch costume to (rs4 v)\nwait (.03) seconds\nswitch costume to (rs5 v)\nwait (.03) seconds\nswitch costume to (rs6 v)\nwait (.03) seconds\nswitch costume to (rs7 v)\nwait (.03) seconds\nswitch costume to (rs8 v)\nwait (.03) seconds\nswitch costume to (rs9 v)\nwait (.03) seconds\nswitch costume to (rs10 v)\nwait (.03) seconds\nswitch costume to (rs11 v)\nwait (.03) seconds\nswitch costume to (rs12 v)\nwait (.03) seconds\nswitch costume to (rs13 v)\nwait (.03) seconds\nswitch costume to (rs14 v)\nwait (.03) seconds\nswitch costume to (rs15 v)\nwait (.03) seconds\nswitch costume to (rs16 v)\nwait (.03) seconds\nswitch costume to (r v)\nwait (.1) seconds\nset [swing? v] to [0]\n\nwhen I receive [sl v]\nswitch costume to (ls1 v)\nwait (.03) seconds\nswitch costume to (ls2 v)\nwait (.03) seconds\nswitch costume to (ls3 v)\nwait (.03) seconds\nswitch costume to (ls4 v)\nwait (.03) seconds\nswitch costume to (ls5 v)\nwait (.03) seconds\nswitch costume to (ls6 v)\nwait (.03) seconds\nswitch costume to (ls7 v)\nwait (.03) seconds\nswitch costume to (ls8 v)\nwait (.03) seconds\nswitch costume to (ls9 v)\nwait (.03) seconds\nswitch costume to (ls10 v)\nwait (.03) seconds\nswitch costume to (ls11 v)\nwait (.03) seconds\nswitch costume to (ls12 v)\nwait (.03) seconds\nswitch costume to (ls13 v)\nwait (.03) seconds\nswitch costume to (ls14 v)\nwait (.03) seconds\nswitch costume to (ls15 v)\nwait (.03) seconds\nswitch costume to (ls16 v)\nwait (.03) seconds\nswitch costume to (l v)\nwait (.1) seconds\nset [swing? v] to [0]\n\ngo to [back v] layer\n\n@Wood Board\n\nwhen I receive [bleh v]\nbroadcast (Rw v)\n\nwhen I receive [win v]\nwait (.1) seconds\nbroadcast (Rw v)\n\nwhen I receive [rw v]\nhide\nif <(Level) = [7]> then\n    switch costume to (costume1 v)\n    clear graphic effects\n    show\n    go to x: (218) y: (113)\n    set size to (100) %\nend\nif <(Level) = [8]> then\n    switch costume to (costume1 v)\n    clear graphic effects\n    show\n    set size to (200) %\n    go to x: (209) y: (51)\nend\nif <(Level) = [11]> then\n    switch costume to (costume1 v)\n    clear graphic effects\n    show\n    set size to (200) %\n    go to x: (236) y: (96)\nend\nif <(Level) = [12]> then\n    switch costume to (costume1 v)\n    clear graphic effects\n    show\n    set size to (110) %\n    go to x: (49) y: (150)\nend\nif <(Level) = [18]> then\n    switch costume to (costume1 v)\n    clear graphic effects\n    show\n    set size to (190) %\n    go to x: (-190) y: (-31)\nend\nif <(Level) = [24]> then\n    switch costume to (costume1 v)\n    clear graphic effects\n    show\n    set size to (105) %\n    go to x: (-199) y: (56)\nend\n\nwhen flag clicked\nforever\n    wait until <<touching (you v)?> and <key (down arrow v) pressed?>>\n    switch costume to (costume2 v)\n    repeat (5)\n        change [ghost v] effect by (10)\n        wait (.05) seconds\n    end\n    switch costume to (costume3 v)\n    repeat (5)\n        change [ghost v] effect by (10)\n        wait (.05) seconds\n    end\n    hide\nend\n\nwhen I receive [secret exit v]\nwait (.1) seconds\nbroadcast (Rw v)\n\n@Button\n\nwhen I receive [bleh v]\nbroadcast (RB&D v)\n\nwhen I receive [win v]\nwait (.1) seconds\nbroadcast (RB&D v)\n\nwhen I receive [rb&d v]\nhide\nif <(Level) = [15]> then\n    switch costume to (off v)\n    go to x: (-202) y: (73)\n    show\nend\nif <(Level) = [16]> then\n    switch costume to (off v)\n    show\n    go to x: (148) y: (74)\nend\nif <(Level) = [17]> then\n    switch costume to (off v)\n    show\n    go to x: (-84) y: (-62)\nend\nif <(Level) = [18]> then\n    switch costume to (off v)\n    show\n    go to x: (150) y: (-161)\nend\nif <(Level) = [19]> then\n    switch costume to (off v)\n    show\n    go to x: (-72) y: (84)\nend\nif <(Level) = [20]> then\n    switch costume to (off v)\n    show\n    go to x: (14) y: (59)\nend\nif <(Level) = [23]> then\n    switch costume to (off v)\n    show\n    go to x: (215) y: (74)\nend\nif <(Level) = [27]> then\n    switch costume to (off v)\n    show\n    go to x: (-211) y: (74)\nend\nif <(Level) = [28]> then\n    switch costume to (off v)\n    show\n    go to x: (210) y: (-163)\nend\nif <(Level) = [30]> then\n    switch costume to (off v)\n    show\n    go to x: (202) y: (106)\nend\nif <(Level) = [33]> then\n    switch costume to (off v)\n    show\n    go to x: (-25) y: (23)\nend\nif <(Level) = [37]> then\n    switch costume to (off v)\n    show\n    go to x: (-211) y: (85)\nend\nif <(Level) = [49]> then\n    switch costume to (off v)\n    show\n    go to x: (140) y: (20)\nend\nif <(Level) = [50]> then\n    switch costume to (off v)\n    show\n    go to x: (86) y: (-161)\nend\nif <(Level) = [57]> then\n    switch costume to (off v)\n    go to x: (-152) y: (-153)\n    show\nend\n\nwhen flag clicked\nforever\n    wait until <<touching (you v)?> and <<(costume [name v]) = [Off]> and <key (down arrow v) pressed?>>>\n    start sound [pop v]\n    switch costume to (on v)\n    broadcast (on v)\n    wait (.1) seconds\nend\n\nwhen I receive [secret exit v]\nwait (.1) seconds\nbroadcast (RB&D v)\n\n@Door\n\nwhen I receive [on v]\nif <(Level) = [15]> then\n    switch costume to (1 v)\nend\nif <(Level) = [16]> then\n    switch costume to (1 v)\nend\nif <(Level) = [17]> then\n    switch costume to (1 v)\nend\nif <(Level) = [18]> then\n    switch costume to (18-2 v)\nend\nif <(Level) = [19]> then\n    switch costume to (19-2 v)\nend\nif <(Level) = [20]> then\n    switch costume to (1 v)\nend\nif <(Level) = [23]> then\n    switch costume to (1 v)\nend\nif <(Level) = [27]> then\n    switch costume to (27-2 v)\nend\nif <(Level) = [28]> then\n    switch costume to (1 v)\nend\nif <(Level) = [30]> then\n    switch costume to (1 v)\nend\nif <(Level) = [33]> then\n    switch costume to (1 v)\nend\nif <(Level) = [37]> then\n    switch costume to (1 v)\nend\nif <(Level) = [49]> then\n    switch costume to (1 v)\nend\nif <(Level) = [50]> then\n    switch costume to (50-2 v)\nend\nif <(Level) = [57]> then\n    switch costume to (57-2 v)\nend\n\nwhen I receive [rb&d v]\nhide\nif <(Level) = [15]> then\n    switch costume to (15 v)\n    show\nend\nif <(Level) = [16]> then\n    switch costume to (16 v)\n    show\nend\nif <(Level) = [17]> then\n    switch costume to (17 v)\n    show\nend\nif <(Level) = [18]> then\n    switch costume to (18 v)\n    show\nend\nif <(Level) = [19]> then\n    switch costume to (1 v)\n    show\nend\nif <(Level) = [20]> then\n    switch costume to (20 v)\n    show\nend\nif <(Level) = [23]> then\n    switch costume to (23 v)\n    show\nend\nif <(Level) = [27]> then\n    switch costume to (27 v)\n    show\nend\nif <(Level) = [28]> then\n    switch costume to (28 v)\n    show\nend\nif <(Level) = [30]> then\n    switch costume to (30 v)\n    show\nend\nif <(Level) = [33]> then\n    switch costume to (33 v)\n    show\nend\nif <(Level) = [37]> then\n    switch costume to (37 v)\n    show\nend\nif <(Level) = [49]> then\n    switch costume to (49 v)\n    show\nend\nif <(Level) = [50]> then\n    switch costume to (50 v)\n    show\nend\nif <(Level) = [57]> then\n    switch costume to (1 v)\n    show\nend\n\n@Fake Ground\n\nwhen I receive [win v]\nhide\nwait (.0001) seconds\nif <(Level) = [16]> then\n    switch costume to (16 v)\n    show\nend\nif <(Level) = [43]> then\n    switch costume to (tent v)\n    show\nend\nif <(Level) = [50]> then\n    switch costume to (50 v)\n    show\nend\n\nwhen flag clicked\nhide\nwait (20) seconds\ngo to [front v] layer\n\nwhen I receive [secret exit v]\nhide\n\n@Secret Portal\n\nwhen flag clicked\nset [whirl v] effect to (1000)\n\nwhen flag clicked\nforever\n    if <<(Level) = [16]> and <touching (you v)?>> then\n        set [level v] to [S1]\n        broadcast (Secret Exit v)\n        wait (.5) seconds\n    end\n    if <<(Level) = [S1]> and <touching (you v)?>> then\n        set [level v] to [24]\n        broadcast (Secret Exit v)\n        wait (.5) seconds\n    end\n    if <<(Level) = [29]> and <touching (you v)?>> then\n        set [level v] to [S2]\n        broadcast (Secret Exit v)\n        wait (.5) seconds\n    end\n    if <<(Level) = [S2]> and <touching (you v)?>> then\n        set [level v] to [35]\n        broadcast (Secret Exit v)\n        wait (.5) seconds\n    end\n    if <<(Level) = [50]> and <touching (you v)?>> then\n        set [level v] to [S3]\n        broadcast (Secret Exit v)\n        wait (.5) seconds\n    end\n    if <<(Level) = [S3]> and <touching (you v)?>> then\n        set [level v] to [59]\n        broadcast (Secret Exit v)\n        wait (.5) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [16]> then\n        show\n        go to x: (202) y: (-145)\n    else\n        if <(Level) = [S1]> then\n            show\n            go to x: (213) y: (103)\n        else\n            if <(Level) = [29]> then\n                show\n                go to x: (48) y: (-136)\n            else\n                if <(Level) = [S2]> then\n                    show\n                    go to x: (217) y: (-7)\n                else\n                    if <(Level) = [50]> then\n                        show\n                        go to x: (186) y: (-137)\n                    else\n                        if <(Level) = [S3]> then\n                            show\n                            go to x: (152) y: (64)\n                        else\n                            hide\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Intro\n\nwhen flag clicked\nclear graphic effects\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nset [level v] to [0]\nwait (2) seconds\nbroadcast (Story v)\nwait (.1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (.1) seconds\nend\nhide\n\n@Lantern Light\n\nwhen flag clicked\nhide\nclear graphic effects\nwait until <(Level) = [26]>\nswitch costume to (costume1 v)\nset size to (300) %\nswitch costume to (costume3 v)\nshow\ngo to [front v] layer\nrepeat until <(Level) = [43]>\n    go to x: (X \(You\)) y: (Y \(You\))\n    if <(LC) = [1]> then\n        switch costume to (costume2 v)\n    end\nend\nswitch costume to (costume3 v)\nwait (1) seconds\nrepeat (9)\n    change [ghost v] effect by (11)\n    wait (.1) seconds\nend\nhide\n\n@Lantern\n\nwhen flag clicked\nset [lc v] to [0]\nswitch costume to (collectable v)\nhide\ngo to x: (0) y: (-138)\nwait until <(Level) = [25]>\nshow\nwait until <touching (you v)?>\nswitch costume to (holding v)\nset [lc v] to [1]\nrepeat until <(Level) = [44]>\n    if <(Sword Direction) = [1]> then\n        go to x: ((X \(You\)) - (7)) y: ((Y \(You\)) - (3))\n    end\n    if <(Sword Direction) = [-1]> then\n        go to x: ((X \(You\)) + (7)) y: ((Y \(You\)) - (3))\n    end\nend\nhide\n\nwhen flag clicked\nwait until <(Level) = [44]>\nhide\n\n@Story\n\nwhen I receive [story v]\nwait (3.5) seconds\nrepeat (7)\n    wait until <key (space v) pressed?>\n    next costume\n    wait (1.5) seconds\nend\nset [level v] to [0]\nbroadcast (Win v)\nwait (2.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (.1) seconds\nend\nhide\n\nwhen flag clicked\nclear graphic effects\ngo to x: (0) y: (0)\nswitch costume to (1 v)\ngo to [front v] layer\nwait (.0001) seconds\ngo [backward v] (1) layers\nshow\n\n@Button Stuff\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nhide\nif <(Level) = [57]> then\n    show\n    switch costume to (57 v)\nend\n\nwhen I receive [bleh v]\nhide\nif <(Level) = [57]> then\n    show\n    switch costume to (57 v)\nend\n\nwhen I receive [on v]\nif <(Level) = [50]> then\n    switch costume to (50 v)\n    show\nend\nif <(Level) = [57]> then\n    wait (.4) seconds\n    hide\n    wait (.6) seconds\n    switch costume to (57-2 v)\n    show\nend\n\nwhen I receive [secret exit v]\nhide\n\nwhen I receive [on v]\n\n@Outro Story\n\nwhen I receive [win game v]\nswitch costume to (1 v)\nshow\ngo to [front v] layer\nwait (1.5) seconds\nrepeat (2)\n    wait until <key (space v) pressed?>\n    next costume\n    wait (1.5) seconds\nend\nwait (2.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (.1) seconds\nend\nbroadcast (You Won v)\nhide\n\nwhen flag clicked\nhide\n\n@You Won\n\nwhen I receive [win game v]\nwait (1) seconds\nshow\n\nwhen flag clicked\nhide\n\n@Highscore Text\n\nwhen I receive [ygth v]\nshow\n\nwhen flag clicked\nhide\n\n@Highscore Holder\n\nwhen flag clicked\nhide\n\nwhen I receive [you won v]\nwait (1) seconds\nshow\nswitch costume to (37 v)\ngo to x: (80) y: (-75)\nset size to (100) %\ngo to [front v] layer\nset [hsh# v] to [1]\nrepeat (10)\n    wait (.25) seconds\n    create clone of (_myself_ v)\n    change x by (15)\n    change [hsh# v] by (1)\nend\ngo to x: (80) y: (-100)\nrepeat (10)\n    wait (.25) seconds\n    create clone of (_myself_ v)\n    change x by (15)\n    change [hsh# v] by (1)\nend\nhide\n\nwhen I receive [ygth v]\n\nwhen I start as a clone\nwait (.1) seconds\nif <(HSH#) = [1]> then\n    switch costume to (HSH1)\n    stop [this script v]\nend\nif <(HSH#) = [2]> then\n    switch costume to (HSH2)\n    stop [this script v]\nend\nif <(HSH#) = [3]> then\n    switch costume to (HSH3)\n    stop [this script v]\nend\nif <(HSH#) = [4]> then\n    switch costume to (HSH4)\n    stop [this script v]\nend\nif <(HSH#) = [5]> then\n    switch costume to (HSH5)\n    stop [this script v]\nend\nif <(HSH#) = [6]> then\n    switch costume to (HSH6)\n    stop [this script v]\nend\nif <(HSH#) = [7]> then\n    switch costume to (HSH7)\n    stop [this script v]\nend\nif <(HSH#) = [8]> then\n    switch costume to (HSH8)\n    stop [this script v]\nend\nif <(HSH#) = [9]> then\n    switch costume to (HSH9)\n    stop [this script v]\nend\nif <(HSH#) = [10]> then\n    switch costume to (HSH10)\n    stop [this script v]\nend\nif <(HSH#) = [11]> then\n    switch costume to (HSH11)\n    stop [this script v]\nend\nif <(HSH#) = [12]> then\n    switch costume to (HSH12)\n    stop [this script v]\nend\nif <(HSH#) = [13]> then\n    switch costume to (HSH13)\n    stop [this script v]\nend\nif <(HSH#) = [14]> then\n    switch costume to (HSH14)\n    stop [this script v]\nend\nif <(HSH#) = [15]> then\n    switch costume to (HSH15)\n    stop [this script v]\nend\nif <(HSH#) = [16]> then\n    switch costume to (HSH16)\n    stop [this script v]\nend\nif <(HSH#) = [17]> then\n    switch costume to (HSH17)\n    stop [this script v]\nend\nif <(HSH#) = [18]> then\n    switch costume to (HSH18)\n    stop [this script v]\nend\nif <(HSH#) = [19]> then\n    switch costume to (HSH19)\n    stop [this script v]\nend\nif <(HSH#) = [20]> then\n    switch costume to (HSH20)\n    stop [this script v]\nend\n\nwait (20) seconds\ndelete this clone\n\nwhen flag clicked\nforever\n    if <not <(username) = [NolanPH]>> then\n        stop [other scripts in sprite v]\n        hide\n    end\nend\n\nset [hsh1 v] to [34]\nset [hsh2 v] to [34]\nset [hsh3 v] to [14]\nset [hsh4 v] to [9]\nset [hsh5 v] to [14]\nset [hsh6 v] to [10]\nset [hsh7 v] to [1]\n\n@Music\n\ndefine Music Change\ngo to [front v] layer\ngo to x: (-172) y: (154)\nclear graphic effects\nshow\nwait (1.5) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\nend\n\nwhen flag clicked\nhide\nwait until <(Level) = [0]>\nwait until <(Level) = [1]>\nswitch costume to (fade, alan walker v)\nbroadcast (New Music v)\nforever\n    play sound [Alan Walker_ Fade v] until done\n    if <(volume) = [100]> then\n        switch costume to (fade, alan walker v)\n        broadcast (New Music v)\n    end\nend\n\nwhen flag clicked\nwait until <(Level) = [0]>\nwait until <(Level) = [1]>\nforever\n    wait until <key (m v) pressed?>\n    switch costume to (off v)\n    broadcast (New Music v)\n    set volume to (0) %\n    wait until <not <key (m v) pressed?>>\n    wait until <key (m v) pressed?>\n    stop all sounds\n    set volume to (100) %\n    broadcast (New Music v)\n    wait until <not <key (m v) pressed?>>\nend\n\nwhen I receive [new music v]\nMusic Change\n\n