Platformer! V3.3
@Stage\n\nwhen flag clicked\nswitch backdrop to (circalpha dark v)\nwait (3) seconds\nswitch backdrop to (circalpha dark2 v)\n\nwhen I receive [intro finished v]\nforever\n    play sound [Mission Impossible Theme\(full theme\) v] until done\nend\n\nwhen I receive [splash screen v]\nswitch backdrop to (backdrop2 v)\n\n@Blank\n\n@Player\n\nwhen flag clicked\nset [coins v] to [0]\nset [intro finished v] to [0]\nhide\nwait until <(INTRO FINISHED) = [1]>\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume2 v)\nset size to (100) %\nwait (3) seconds\nbroadcast (Prologue v) and wait\nbroadcast (Splash Screen v)\nbroadcast (Main Menu v)\nhide\n\ndefine Move - In Steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((speed x) / (steps))\n    Check Touching Solid\n    if <(touching) > [0]> then\n        Collide X - Slope Or Wall?\n    end\n    set [last value v] to (y position)\n    change y by ((speed y) / (steps))\n    Check Touching Solid\n    if <(touching) > [0]> then\n        Collide Y - Ceiling Or Floor\n    end\nend\n\ndefine Check Touching Solid\nif <<touching (level v)?> or <touching (platform v)?>> then\n    set [touching v] to [1]\nelse\n    set [touching v] to [0]\nend\n\nwhen I receive [tick - player v]\nMoved By Moving Platform\nControls - Up - Down\nControls - Left - Right\nMove - In Steps (([abs v] of (speed x) ) + ([abs v] of (speed y) ))\nSet Costume\n\ndefine Controls - Up - Down\nif <key (up arrow v) pressed?> then\n    if <<(wall slide) > [0]> and <(jumping) = [0]>> then\n        start sound [Jump v]\n        set [jumping v] to [1]\n        set [falling v] to [3]\n        set [wall slide v] to [0]\n        turn right (180) degrees\n        set [speed x v] to (((direction) / (90)) * (5))\n        set [long jump v] to [12]\n    end\n    if <<(falling) < [3]> and <(jumping) = [0]>> then\n        start sound [Jump v]\n        set [jumping v] to [1]\n        set [falling v] to [3]\n    end\n    if <<(jumping) > [0]> and <(jumping) < (JUMP DURATION)>> then\n        change [jumping v] by (1)\n        set [speed y v] to (JUMP FORCE)\n    end\nelse\n    set [jumping v] to [0]\nend\nchange [speed y v] by (GRAVITY)\nif <(wall slide) > [0]> then\n    Check Wallslide\n    if <(speed y) < [0]> then\n        set [speed y v] to ((speed y) * (0.6))\n    end\nend\n\ndefine Controls - Left - Right\nif <(long jump) > [0]> then\n    change [long jump v] by (-1)\n    stop [this script v]\nend\nset [key x v] to (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>)\nif <(KEY X) = [0]> then\n    if <<(falling) > [2]> and <(wall slide) < [1]>> then\n        set [speed x v] to ((speed x) * (0.98))\n    end\n    if <([abs v] of (speed x) ) < [1]> then\n        set [frame v] to [0]\n        set [speed x v] to [0]\n    else\n        change [frame v] by (0.5)\n    end\nelse\n    change [speed x v] by ((KEY X) * (ACCELERATION))\n    if <not <(direction) = ((KEY X) * (90))>> then\n        set [wall slide v] to [0]\n    end\n    point in direction ((KEY X) * (ACCELERATION))\n    change [frame v] by (1)\nend\nset [speed x v] to ((speed x) * (RESISTANCE))\n\ndefine Reset And Begin\nclear graphic effects\nset size to (50) %\nset [invunerable v] to [0]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [falling v] to [99]\nset [wall slide v] to [0]\nset [jumping v] to [0]\nset [long jump v] to [0]\npoint in direction (90)\nBegin Scene # (SPAWN SCENE) Go To X: (SPAWN X) Y: (SPAWN Y)\n\nwhen I receive [game loop v]\nforever\n    broadcast (Tick - First v)\n    broadcast (Tick - Platforms v)\n    broadcast (Tick - Player v)\n    broadcast (Tick - Enemy v)\n    broadcast (Tick - Last v)\nend\n\nwhen I receive [tick - last v]\nif <(x position) > [235]> then\n    Begin Scene # ((SCENE #) + (1)) Go To X: [-235] Y: []\nend\nif <(x position) < [-235]> then\n    Begin Scene # ((SCENE #) - (1)) Go To X: [235] Y: []\nend\nif <(y position) > [180]> then\n    Begin Scene # ((SCENE #) + (100)) Go To X: [] Y: [-160]\nend\nif <(y position) < [-180]> then\n    Begin Scene # ((SCENE #) - (100)) Go To X: [] Y: [160]\nend\nif <<<touching (danger v)?> or <touching (danger - lava v)?>> or <touching (lightning v)?>> then\n    broadcast (Lose Life v)\nend\n\ndefine Begin Scene # (scene #) Go To X: (x) Y: (y)\nset [scene # v] to (scene #)\nif <(x) > []> then\n    set x to (x)\nend\nif <(y) > []> then\n    set y to (y)\nend\nbroadcast (Change Scene v)\nbroadcast (Exit Scene v)\nstop [other scripts in sprite v]\nwait (0) seconds\nswitch costume to (hitbox v2 v)\nset rotation style [don't rotate v]\nif <(x) > []> then\n    Fix Collision In Direction [0]\nelse\n    Fix Collision In Direction [90]\nend\nSet Costume\nbroadcast (Game Loop v)\n\ndefine Fix Collision In Direction (dir)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (dir)\nrepeat (128)\n    Check Touching Solid\n    if <(touching) < [1]> then\n        point in direction (temp)\n        stop [this script v]\n    end\n    move (distance) steps\n    turn right (180) degrees\n    change [distance v] by (1)\nend\n\nwhen I receive [tick - first v]\nswitch costume to (hitbox v2 v)\nset rotation style [don't rotate v]\nset [platform dx v] to []\nset [platform dy v] to []\n\ndefine Set Costume\nset rotation style [left-right v]\nif <(wall slide) > [0]> then\n    switch costume to (hangon01 v)\n    stop [this script v]\nend\nif <(falling) > [1]> then\n    if <(speed y) > [0]> then\n        switch costume to (jump01 v)\n    else\n        switch costume to (run_j2 v)\n    end\n    stop [this script v]\nend\nif <(frame) > [0]> then\n    switch costume to ((1) + (([floor v] of (frame) ) mod (16)))\nelse\n    switch costume to (hit angle 0 v)\n    repeat (5)\n        Check Touching Solid\n        if <(touching) < [1]> then\n            switch costume to ((costume [number v]) + (5))\n            stop [this script v]\n        end\n        next costume\n    end\n    switch costume to (stand v)\nend\n\ndefine Collide X - Slope Or Wall?\nCheck Wallslide\nchange y by (1)\nCheck Touching Solid\nif <(touching) > [0]> then\n    change y by (1)\n    Check Touching Solid\n    if <(touching) > [0]> then\n        change y by (-2)\n        set x to (last value)\n        set [speed x v] to [0]\n        stop [this script v]\n    end\n    set [speed x v] to ((speed x) * (0.8))\nend\nset [speed x v] to ((speed x) * (0.95))\nSlip\n\ndefine Collide Y - Ceiling Or Floor\nset y to (last value)\nif <(speed y) > [0]> then\n    set [speed y v] to [0]\n    stop [this script v]\nend\nif <(falling) > [0]> then\n    set [falling v] to [0]\n    Slip\nend\nset [speed y v] to ((speed y) * (0.8))\n\ndefine Slip\nchange y by (-2)\nchange x by (1)\nCheck Touching Solid\nif <(touching) < [1]> then\n    set [falling v] to [9]\n    change [speed x v] by (1)\n    stop [this script v]\nend\nchange x by (-2)\nCheck Touching Solid\nif <(touching) < [1]> then\n    set [falling v] to [9]\n    change [speed x v] by (-1)\n    stop [this script v]\nend\nchange y by (2)\nchange x by (1)\n\ndefine Check Wallslide\nif <(falling) < [2]> then\n    set [wall slide v] to [0]\n    stop [this script v]\nend\nswitch costume to (hitbox wallslide v)\nset rotation style [left-right v]\nCheck Touching Solid\nset [wall slide v] to (touching)\nswitch costume to (hitbox v2 v)\nset rotation style [don't rotate v]\n\nwhen I receive [lose life v]\nset [invunerable v] to [1]\nif <(LIVES) > [0]> then\n    change [lives v] by (-1)\n    stop [other scripts in sprite v]\n    start sound [Oops v]\n    switch costume to (die1b v)\n    wait (0.1) seconds\n    switch costume to (die2b v)\n    wait (0.1) seconds\n    switch costume to (die3b v)\n    wait (0.1) seconds\n    switch costume to (die2b v)\n    wait (0.1) seconds\n    set [speed y v] to (JUMP FORCE)\n    repeat until <(y position) < [-200]>\n        change y by (speed y)\n        change [speed y v] by (GRAVITY)\n    end\n    wait (0.5) seconds\n    Reset And Begin\nend\nif <(LIVES) = [0]> then\n    stop [other scripts in sprite v]\n    broadcast (Game Over v)\nend\n\ndefine Moved By Moving Platform\nchange x by (PLATFORM DX)\nchange y by (PLATFORM DY)\nCheck Touching Solid\nif <(touching) > [0]> then\n    Find Closest Space To (x position) (y position) Max [16]\n    if <(touching) > [0]> then\n        broadcast (Lose Life v)\n    end\nend\n\ndefine Find Closest Space To (x) (y) Max (max)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (0)\nrepeat (max)\n    repeat (16)\n        go to x: (x) y: (y)\n        move (distance) steps\n        Check Touching Solid\n        if <(touching) < [1]> then\n            point in direction (temp)\n            stop [this script v]\n        end\n        turn right (22.5) degrees\n    end\n    change [distance v] by (1)\nend\ngo to x: (x) y: (y)\npoint in direction (temp)\n\nwhen I receive [tick - last v]\nset rotation style [left-right v]\nif <touching (water v)?> then\n    change y by ((10) * ([sin v] of ((timer) * (180)) ))\nend\n\nwhen I receive [appel boss fight v]\nstop [other scripts in sprite v]\n\nwhen I receive [cat talk v]\nswitch costume to (cat sad v)\nset language to (zh-cn v)::tts\nset voice to (tenor v)::tts\nspeak [hello]::tts\nswitch costume to (cat angry v)\nwait (0.1) seconds\nswitch costume to (cat angry2 v)\nwait (0.1) seconds\nswitch costume to (cat angry3 v)\nwait (0.1) seconds\nswitch costume to (cat angry4 v)\nwait (0.1) seconds\nswitch costume to (cat angry5 v)\n\nwhen I receive [start v]\nshow\ngo to x: (0) y: (0)\npoint in direction (90)\nset [scene # v] to [1]\nset [gravity v] to [-1.5]\nset [jump force v] to [16]\nset [jump duration v] to [6]\nset [acceleration v] to [1.5]\nset [resistance v] to [0.8]\nbroadcast (Reset v) and wait\nbroadcast (Setup v) and wait\nset [spawn scene v] to [1]\nset [spawn x v] to [-150]\nset [spawn y v] to [55]\nset [lives v] to [9]\nReset And Begin\n\nwhen I receive [player - bounce v]\nset [speed y v] to [10]\n\nwhen I start as a clone\nforever\n    switch costume to (costume3 v)\nend\n\ndefine Make Smoke\nforever\n    if <<not <(x) = (x position)>> or <not <(y) = (y position)>>> then\n        broadcast (Smoke v)\n    end\n    set [x v] to (x position)\n    set [y v] to (y position)\nend\n\nwhen I receive [game loop v]\nMake Smoke\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nclear graphic effects\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@Level\n\nwhen flag clicked\nhide\nclear graphic effects\nforever\n    go to x: (0) y: (0)\nend\n\nwhen I receive [change scene v]\nswitch costume to (join [Scene] (SCENE #))\nerase all\nStamp Shadow\nStamp Outline\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    go [forward v] (1) layers\nend\n\nwhen [t v] key pressed\n\n    set [scene # v] to [4]\n    broadcast (Change Scene v)\nend\n\ndefine Stamp Outline\nset rotation style [don't rotate v]\npoint in direction (90)\nset [brightness v] effect to (-100)\nrepeat (8)\n    move (3) steps\n    stamp\n    move (-3) steps\n    turn right (45) degrees\nend\nclear graphic effects\n\ndefine Stamp Shadow\nset [brightness v] effect to (-100)\nset [ghost v] effect to (90)\nchange y by (-20)\nstamp\nchange y by (20)\nclear graphic effects\n\nwhen I receive [intro finished v]\nshow\n\nwhen flag clicked\nswitch costume to (pick random (1) to (65))\nerase all\nStamp Shadow\nStamp Outline\n\n@Text Engine\n\ndefine Type (text) At X: (x) Y: (y)\nswitch costume to ( v)\ngo to x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nset [index v] to [1]\nrepeat (length of (text))\n    set [value v] to (letter (index) of (text))\n    create clone of (_myself_ v)\n    change [index v] by (1)\nend\nhide\n\nwhen I start as a clone\nshow\nClone Setup\n\nwhen flag clicked\nbroadcast (Delete All v)\n\nwhen I receive [delete all v]\ndelete this clone\n\ndefine Clone Setup\nshow\nswitch costume to (value)\nrepeat (index)\n    change x by (15)\n    if <(x position) > [220]> then\n        set x to ((x) + (15))\n        change y by (-20)\n    end\nend\n\nwhen flag clicked\nbroadcast (Delete All v) and wait\n\nwhen I receive [prologue v]\ngo to [front v] layer\nshow\nType [IT WAS A TIME OF GREAT MYSTERY] At X: [-175] Y: [0]\nwait (1) seconds\nbroadcast (Delete All v) and wait\nType [THE SQUARE DUDE - APPEL - HAD DEFEATED MICRO MANAGER] At X: [-175] Y: [0]\nwait (1) seconds\nbroadcast (Delete All v) and wait\nType [AND RESTORED PEACE TO PLANET APPELMOESSHAPJE] At X: [-220] Y: [0]\nwait (1) seconds\nbroadcast (Delete All v) and wait\nType [HOWEVER, THE VIRUS CAPTURED HIM AND TURNED HIM EVIL] At X: [-220] Y: [0]\nwait (1) seconds\nbroadcast (Delete All v) and wait\nType [NOW HE HAUNTS THE PLANET OF APPELMOESSHAPJE] At X: [-220] Y: [0]\nwait (1) seconds\nbroadcast (Delete All v) and wait\nType [GRIFFPATCH TRIED TO STOP HIM] At X: [-220] Y: [0]\nwait (1) seconds\nbroadcast (Delete All v) and wait\nType [BUT APPEL CAPTURED HIM] At X: [-220] Y: [0]\nwait (1) seconds\nbroadcast (Delete All v) and wait\nType [WHO WILL DEFEAT APPEL AND SAVE GRIFFPATCH?] At X: [-220] Y: [0]\nwait (1) seconds\nbroadcast (Delete All v) and wait\nType [MABYE, YOU?] At X: [-220] Y: [0]\nwait (1) seconds\nbroadcast (Delete All v) and wait\n\n@Appel\n\nwhen flag clicked\ngo to x: (43) y: (-55)\nset language to (pl v)::tts\nset voice to (giant v)::tts\nclear graphic effects\nhide\n\nwhen I receive [appel boss fight v]\nshow\nspeak [hello scratch cat]::tts\nbroadcast (cat talk v)\n\nwhen I receive [tick - enemy v]\nif <(SCENE #) = [728]> then\n    broadcast (Appel Boss Fight v)\nend\n\n@notification\n\nwhen flag clicked\ngo to x: (0) y: (50)\ngo to [front v] layer\nhide\nwait (pick random (6) to (10)) seconds\nshow\nrepeat until <(y position) < [6]>\n    change y by (((5) - (y position)) / (6))\nend\nwait (3.5) seconds\nrepeat until <(y position) > [49.5]>\n    change y by (((y position) + (5)) / (5))\nend\nhide\nforever\n    wait (pick random (14) to (26)) seconds\n    show\n    repeat until <(y position) < [6]>\n        change y by (((5) - (y position)) / (6))\n    end\n    wait (3.5) seconds\n    repeat until <(y position) > [49.5]>\n        change y by (((y position) + (5)) / (5))\n    end\n    hide\nend\n\nwhen I receive [alert v]\nstop [other scripts in sprite v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\nwhen I receive [tick v]\ngo to [front v] layer\n\n@Danger\n\nwhen flag clicked\nclear graphic effects\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\n\nwhen flag clicked\nhide\n\nwhen I receive [intro finished v]\nshow\n\n@Danger - Lava\n\nwhen flag clicked\nclear graphic effects\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\nif <<<<(SCENE #) = [3]> or <(SCENE #) = [4]>> or <<(SCENE #) = [3]> or <(SCENE #) = [4]>>> or <<<(SCENE #) = [727]> or <(SCENE #) = [728]>> or <<<(SCENE #) = [720]> or <(SCENE #) = [721]>> or <<(SCENE #) = [722]> or <(SCENE #) = [723]>>>>> then\n    forever\n        set y to ((10) * ([sin v] of ((timer) * (180)) ))\n    end\nend\n\nwhen flag clicked\nclear graphic effects\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\nend\n\n@Platform\n\nwhen I receive [change scene v]\nstop [other scripts in sprite v]\npoint in direction (90)\nhide\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\nbroadcast (Back v)\nif <(SCENE #) = [0]> then\n    Spawn [Scene0] At: [-28] [188] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [1]> then\n    Spawn [Scene1] At: [92] [141] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [2]> then\n    Spawn [Scene2] At: [216] [99] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [4]> then\n    Spawn [Key 1] At: [286] [159] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [6]> then\n    Spawn [Scene6] At: [286] [159] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [201]> then\n    Spawn [Scene201] At: [146] [95] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [203]> then\n    Spawn [Scene203] At: [252] [240] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [205]> then\n    Spawn [Scene205] At: [83] [60] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [302]> then\n    Spawn [Scene302] At: [194] [112] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [303]> then\n    Spawn [Scene303] At: [-78] [141] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [304]> then\n    Spawn [Scene304] At: [119] [-3] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [305]> then\n    Spawn [Scene305] At: [0] [0] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [506]> then\n    Spawn [Scene506] At: [-41] [-2] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [606]> then\n    Spawn [Scene606] At: [0] [120] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [706]> then\n    Spawn [Scene706] At: [0] [-2] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [707]> then\n    Spawn [Scene707] At: [0] [-2] Dir [90]\n    stop [this script v]\nend\nif <(SCENE #) = [718]> then\n    Spawn [Scene718] At: [-11] [-103] Dir [90]\n    stop [this script v]\nend\n\ndefine Animate Platform 1\ngo to x: (92) y: (141)\nforever\n    glide (0.5) secs to x: (92) y: (200)\n    wait (0.5) seconds\n    glide (0.5) secs to x: (92) y: (141)\n    wait (0.5) seconds\nend\n\nwhen I receive [tick - platforms v]\nTick (x position) (y position)\nset [last x v] to (x position)\nset [last y v] to (y position)\n\ndefine Tick (new x) (new y)\nif <(new y) > (last y)> then\n    change y by (1)\nelse\n    set y to ((last y) + (1))\nend\nif <touching (player v)?> then\n    set [platform dx v] to ((new x) - (last x))\n    set [platform dy v] to ((new y) - (last y))\nend\ngo to x: (new x) y: (new y)\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\n\ndefine Animate Platform 2\ngo to x: (216) y: (99)\nforever\n    glide (1) secs to x: (216) y: (200)\n    wait (1) seconds\n    glide (1) secs to x: (216) y: (99)\n    wait (1) seconds\nend\n\ndefine Animate Platform 3\ngo to x: (286) y: (159)\nforever\n    glide (0.5) secs to x: (286) y: (272)\n    wait (0.5) seconds\n    glide (1) secs to x: (286) y: (159)\n    wait (0.5) seconds\nend\n\ndefine Animate Platform 4\npoint in direction (90)\ngo to x: (146) y: (95)\nforever\n    turn right (1) degrees\nend\n\ndefine Animate Platform 5\ngo to x: (252) y: (240)\nforever\n    glide (0.5) secs to x: (252) y: (144)\n    wait (0.5) seconds\n    glide (0.5) secs to x: (252) y: (240)\n    wait (0.5) seconds\nend\n\ndefine Animate Platform 6\ngo to x: (83) y: (60)\nforever\n    glide (0.5) secs to x: (83) y: (215)\n    wait (0.5) seconds\n    glide (0.5) secs to x: (83) y: (60)\n    wait (0.5) seconds\nend\n\ndefine Animate Platform 7\ngo to x: (194) y: (112)\nforever\n    glide (1) secs to x: (286) y: (112)\n    wait (0.5) seconds\n    glide (1) secs to x: (194) y: (112)\n    wait (0.5) seconds\nend\n\ndefine Animate Platform 8\ngo to x: (-78) y: (141)\nforever\n    glide (1) secs to x: (-6) y: (118)\n    wait (0.5) seconds\n    glide (1) secs to x: (-78) y: (141)\n    wait (0.5) seconds\nend\n\ndefine Animate Platform 9\npoint in direction (90)\ngo to x: (119) y: (-3)\nforever\n    turn right (1) degrees\nend\n\ndefine Animate Platform 10\npoint in direction (90)\ngo to x: (0) y: (0)\nforever\n    turn right (1) degrees\nend\n\ndefine Animate Platform 11\ngo to x: (-41) y: (-2)\nforever\n    glide (0.5) secs to x: (32) y: (-2)\n    wait (0.5) seconds\n    glide (0.5) secs to x: (-41) y: (-2)\n    wait (0.5) seconds\nend\n\ndefine Animate Platform 12\ngo to x: (0) y: (120)\nforever\n    glide (0.5) secs to x: (0) y: (-40)\n    wait (0.5) seconds\n    glide (0.5) secs to x: (0) y: (120)\n    wait (0.5) seconds\nend\n\ndefine Animate Platform 13\ngo to x: (0) y: (-2)\nforever\n    glide (0.5) secs to x: (0) y: (-88)\n    wait (1) seconds\n    glide (1) secs to x: (0) y: (-2)\n    wait (0.5) seconds\nend\n\ndefine Animate Platform 14\ngo to x: (0) y: (-2)\nforever\n    glide (0.5) secs to x: (0) y: (-88)\n    wait (1) seconds\n    glide (1) secs to x: (0) y: (-2)\n    wait (0.5) seconds\nend\n\ndefine Animate Platform 15\npoint in direction (90)\ngo to x: (-11) y: (-103)\nforever\n    turn right (1) degrees\nend\n\nwhen I receive [change scene v]\nswitch costume to (join [Scene] (SCENE #))\n\ndefine Door At (x) (y) Key (key name)\nshow\nswitch costume to (key name)\ngo to x: (x) y: (y)\nforever\n    wait until <touching (player v)?>\n    if <[collected v] contains (key name)?> then\n        start sound [Buzz Whir v]\n        repeat (24)\n            change y by (4)\n        end\n        wait (1) seconds\n        start sound [Buzz Whir v]\n        repeat (24)\n            change y by (4)\n        end\n        start sound [Crunch v]\n    else\n        start sound [Low Squeak v]\n        wait until <not <touching (player v)?>>\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [intro finished v]\nshow\n\ndefine Animate Platform 0\ngo to x: (-28) y: (188)\nforever\n    glide (2) secs to x: (x position) y: ((y position) - (400))\n    wait (1) seconds\n    glide (2) secs to x: (x position) y: ((y position) + (400))\n    wait (1) seconds\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I receive [exit scene v]\ndelete this clone\n\ndefine Spawn (type) At: (x) (y) Dir (dir)\ngo to x: (x) y: (y)\npoint in direction (dir)\nswitch costume to (type)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nif < (costume [name v]) contains [Key 1]?> then\n    Door At (x position) (y position) Key (costume [name v])\nend\nif < (costume [name v]) contains [Scene0]?> then\n    Animate Platform 0\nend\nif < (costume [name v]) contains [Scene1]?> then\n    Animate Platform 1\nend\nif < (costume [name v]) contains [Scene2]?> then\n    Animate Platform 2\nend\nif < (costume [name v]) contains [Scene6]?> then\n    Animate Platform 3\nend\nif < (costume [name v]) contains [Scene201]?> then\n    Animate Platform 4\nend\nif < (costume [name v]) contains [Scene203]?> then\n    Animate Platform 5\nend\nif < (costume [name v]) contains [Scene205]?> then\n    Animate Platform 6\nend\nif < (costume [name v]) contains [Scene302]?> then\n    Animate Platform 7\nend\nif < (costume [name v]) contains [Scene303]?> then\n    Animate Platform 8\nend\nif < (costume [name v]) contains [Scene304]?> then\n    Animate Platform 9\nend\nif < (costume [name v]) contains [Scene305]?> then\n    Animate Platform 10\nend\nif < (costume [name v]) contains [Scene506]?> then\n    Animate Platform 11\nend\nif < (costume [name v]) contains [Scene606]?> then\n    Animate Platform 12\nend\nif < (costume [name v]) contains [Scene706]?> then\n    Animate Platform 13\nend\nif < (costume [name v]) contains [Scene707]?> then\n    Animate Platform 14\nend\nif < (costume [name v]) contains [Scene718]?> then\n    Animate Platform 15\nend\n\nwhen I start as a clone\nforever\n    go to [back v] layer\nend\n\n@Water\n\nwhen flag clicked\nclear graphic effects\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\nend\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\nif <<<<<(SCENE #) = [711]> or <(SCENE #) = [712]>> or <<(SCENE #) = [612]> or <(SCENE #) = [713]>>> or <<(SCENE #) = [715]> or <(SCENE #) = [716]>>> or <(SCENE #) = [717]>> then\n    forever\n        set y to ((10) * ([sin v] of ((timer) * (180)) ))\n    end\nend\n\n@Collectable\n\nwhen I receive [change scene v]\nif <(SCENE #) = (my scene)> then\n    show\nelse\n    hide\nend\n\nwhen I start as a clone\nrepeat until <touching (player v)?>\n    if <not <<(type) = [Flag 1]> or <(type) = [Flag 2]>>> then\n        change y by ((0.5) * ([sin v] of (frame) ))\n        change [frame v] by (5)\n    end\nend\nset [my scene v] to []\nif <(type) = [Coin 1]> then\n    start sound [Coin v]\n    change [coins v] by (1)\nelse\n    if <(type) = [Flag 1]> then\n        start sound [Coin v]\n        set [spawn scene v] to (SCENE #)\n        set [spawn x v] to ([x position v] of [player v])\n        set [spawn y v] to ([y position v] of [player v])\n        set [type v] to [Flag 2]\n        switch costume to (flag 2 v)\n        repeat (15)\n            turn right (1) degrees\n        end\n        repeat (15)\n            turn left (1) degrees\n        end\n    else\n        start sound [Coin v]\n        add (type) to [collected v]\n    end\nend\nif <not <<(type) = [Flag 1]> or <(type) = [Flag 2]>>> then\n    repeat (20)\n        change y by (2)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I receive [setup v]\nset size to (50) %\ndelete all of [collected v]\nset [coins v] to [0]\nset [frame v] to [0]\nhide\nPlace [Coin 1] Scene [1] X: [202] Y: [49]\nPlace [Coin 1] Scene [1] X: [-163] Y: [130]\nPlace [Key 1] Scene [3] X: [-17] Y: [102]\nPlace [Flag 1] Scene [5] X: [-66] Y: [-58]\n\nwhen I receive [change scene v]\nif <(type) = [Coin 1]> then\n    forever\n        wait (0) seconds\n        next costume\n        if <(costume [number v]) > [8]> then\n            switch costume to (coin 1 v)\n        end\n        set size to (25) %\n    end\nend\nif <(type) = [Key 1]> then\n    switch costume to (key 1 v)\n    set size to (100) %\nend\n\ndefine Place (costume) Scene (scene) X: (x) Y: (y)\nset [type v] to (costume)\nset [my scene v] to (scene)\nswitch costume to (costume)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [my scene v] to []\n\nwhen I receive [reset v]\ndelete this clone\n\n@Intro\n\nwhen I start as a clone\nif <(ID) = [Chev1]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (chev v)\n    set size to (1) %\n    set [ghost v] effect to (85)\n    set [brightness v] effect to (100)\n    set [svel v] to [0]\n    wait until <(((#) / (2)) + (0.5)) < (timer)>\n    repeat (15)\n        change size by (Svel)\n        change [svel v] by (1)\n        change [direction v] by (2)\n    end\n    \n        switch costume to (size hack v)\n        change size by (Svel)\n        change [svel v] by (1)\n        switch costume to (chev v)\n        change [direction v] by (2)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Circ2]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (circ1 v)\n    set size to (1) %\n    set [ghost v] effect to (0)\n    set [brightness v] effect to (100)\n    set [svel v] to [5]\n    show\n    repeat (11)\n        change size by (Svel)\n        change [svel v] by ((Svel) / (4))\n    end\n    repeat (25)\n        switch costume to (size hack v)\n        change size by (((650) - (size)) / (6))\n        switch costume to (circ1 v)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Circs1]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (circ1 v)\n    set size to (1) %\n    set [ghost v] effect to (98)\n    set [brightness v] effect to (100)\n    set [svel v] to [10]\n    show\n    repeat (((#) * (2)) + (4))\n        change size by (Svel)\n        change [svel v] by ((Svel) / (4))\n    end\n    repeat until <[6.45] < (timer)>\n        switch costume to (size hack v)\n        change size by ((((#) * (200)) - (size)) / (6))\n        switch costume to (circ1 v)\n    end\n    wait (0.5) seconds\n    set [svel v] to [-1]\n    repeat (10)\n        change size by (Svel)\n        change [svel v] by ((Svel) / (4))\n        change [ghost v] effect by (0.25)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [CircExplo2]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (circexplo v)\n    set size to (1) %\n    set [ghost v] effect to (25)\n    set [brightness v] effect to (100)\n    set [svel v] to [45]\n    set [xvel v] to [30]\n    set [fisheye v] effect to (100)\n    show\n    repeat (25)\n        change size by (Svel)\n        change [xvel v] by ((Xvel) / (3))\n        change [fisheye v] effect by (Xvel)\n        set [svel v] to ((Svel) * (0.85))\n        change [ghost v] effect by (4)\n    end\n    delete this clone\nend\n\ndefine Shake (vel) (deter) (domain)\nset [var v] to [0]\nset [shakevel v] to (vel)\nrepeat until <(ShakeVel) < [0.01]>\n    set [camx v] to (([sin v] of ((Var) * (4)) ) * ((ShakeVel) / (10)))\n    set [camy v] to (([cos v] of ((Var) * (4)) ) * ((ShakeVel) / (10)))\n    set [camd v] to ((([sin v] of ((Var) * (4)) ) * ((ShakeVel) / (10))) + (90))\n    change [var v] by (domain)\n    set [shakevel v] to ((ShakeVel) - (deter))\nend\n\nwhen I start as a clone\nif <not << (ID) contains [par]?> or < (ID) contains [line]?>>> then\n    wait (0.1) seconds\n    set [defx v] to (x position)\n    set [defy v] to (y position)\n    forever\n        if <not <<[6.4] < (timer)> and <(ID) = [Circ3]>>> then\n            go to x: ((DefX) + (CamX)) y: ((DefY) + (CamY))\n            point in direction ((CamD) + (Direction))\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [camd v] to [90]\nset [camx v] to [0]\nset [defx v] to [0]\nset [defy v] to [0]\nset [camy v] to [0]\nset [shakevel v] to [0]\nset [direction v] to [0]\npoint in direction (90)\nwait until <[1.5] < (timer)>\nShake [75] [4] [5]\nwait until <[2.2] < (timer)>\nShake [75] [4] [5]\nwait until <[3.1] < (timer)>\nShake [25] [4] [5]\nwait until <[3.8] < (timer)>\nShake [75] [4] [5]\nwait until <[4.7] < (timer)>\nShake [75] [4] [5]\nwait until <[5.4] < (timer)>\nShake [50] [4] [5]\nwait until <[6.2] < (timer)>\nShake [75] [4] [5]\nwait until <[6.9] < (timer)>\nShake [75] [4] [5]\nwait until <[7.8] < (timer)>\nShake [75] [4] [5]\n\nwhen I start as a clone\nif <(ID) = [Fade]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (fade v)\n    set size to (200) %\n    set [ghost v] effect to (100)\n    set [brightness v] effect to (50)\n    show\n    repeat (4)\n        change [ghost v] effect by (-6)\n    end\n    repeat until <[8.6] < (timer)>\n        go to [front v] layer\n    end\n    repeat (10)\n        change [ghost v] effect by (2)\n        delete this clone\n    end\nend\n\nwhen I receive [end v]\nif <<(ID) = [name1]> or <<(ID) = [Par2]> or <(ID) = [CircExplo2]>>> then\nbroadcast (Intro Finished v)\nset [intro finished v] to [1]\n\nwhen I start as a clone\nif <(ID) = [CircTop]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (180)\n    switch costume to (circ1 v)\n    set size to (1) %\n    set [ghost v] effect to (0)\n    set [brightness v] effect to (0)\n    set [svel v] to [5]\n    show\n    repeat (12)\n        change size by (Svel)\n        change [svel v] by ((Svel) / (4))\n    end\n    repeat (25)\n        switch costume to (size hack v)\n        change size by (((925) - (size)) / (6))\n        switch costume to (circ1 v)\n    end\nend\n\ndefine Clone (id) (#)\nset [id v] to (id)\nset [# v] to [1]\nrepeat (#)\n    create clone of (_myself_ v)\n    change [# v] by (1)\nend\n\nwhen flag clicked\nhide\npoint in direction (90)\nreset timer\nstart sound [Nightcore - Tonight \(Nurko feat Luma\)2 v]\nwait until <[0.8] < (timer)>\nClone [Circ2] [1]\nClone [Name1] [1]\nClone [Chev1] [15]\nwait until <[1.3] < (timer)>\nClone [Fade] [1]\nClone [Fade2] [1]\nwait until <[1.5] < (timer)>\nClone [Circ3] [1]\nwait until <[2.2] < (timer)>\nClone [CircExplo2] [1]\nClone [Line3] [4]\nwait until <[3] < (timer)>\nClone [Circ4] [1]\nClone [CircExplo1] [1]\nClone [Par1] [7]\nwait until <[3.8] < (timer)>\nClone [CircExplo1] [1]\nClone [Line1] [4]\nwait until <[4.7] < (timer)>\nClone [CircExplo1] [1]\nClone [Line1] [4]\nwait until <[5.4] < (timer)>\nClone [Par1] [7]\nwait until <[6.2] < (timer)>\nClone [Circ5] [1]\nClone [CircExplo2] [1]\nClone [Line3] [4]\nwait until <[6.9] < (timer)>\nClone [CircExplo2] [1]\nClone [Par2] [7]\nClone [Line3] [4]\nwait until <[7.8] < (timer)>\nClone [CircExplo2] [1]\nClone [Par2] [7]\n\nwhen I start as a clone\nif <(ID) = [Par1]> then\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (pick random (3) to (4))\n    set size to (pick random (35) to (25.11)) %\n    Turn\n    turn right (pick random (-25) to (25.1)) degrees\n    set [ddir v] to (direction)\n    point in direction (pick random (-180) to (180))\n    set [vdir v] to (direction)\n    set [brightness v] effect to (0)\n    set [ghost v] effect to (pick random (10) to (0))\n    show\n    set [svel v] to (pick random (7) to (13.11))\n    repeat (pick random (20) to (30))\n        point in direction (DDir)\n        move (Svel) steps\n        change [vdir v] by (Svel)\n        change [svel v] by (((0) - (Svel)) / (9))\n        point in direction (VDir)\n    end\n    repeat (10)\n        point in direction (DDir)\n        move (Svel) steps\n        change [vdir v] by (Svel)\n        change [svel v] by (((0) - (Svel)) / (9))\n        point in direction (VDir)\n        change size by (-2)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\ndefine Turn\npoint in direction (90)\nrepeat (#)\n    turn right ((360) / (7)) degrees\nend\n\nwhen I start as a clone\nif <(ID) = [Circ1]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (circ1 v)\n    set size to (1) %\n    set [ghost v] effect to (0)\n    set [brightness v] effect to (0)\n    set [svel v] to [5]\n    show\n    repeat (11)\n        change size by (Svel)\n        change [svel v] by ((Svel) / (4))\n    end\n    repeat (25)\n        switch costume to (size hack v)\n        change size by (((650) - (size)) / (6))\n        switch costume to (circ1 v)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [CircRight]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (240) y: (0)\n    switch costume to (circ1 v)\n    set size to (1) %\n    set [ghost v] effect to (0)\n    set [brightness v] effect to (0)\n    set [svel v] to [9]\n    show\n    repeat (12)\n        change size by (Svel)\n        change [svel v] by ((Svel) / (4))\n    end\n    repeat (25)\n        switch costume to (size hack v)\n        change size by (((1075) - (size)) / (6))\n        switch costume to (circ1 v)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Par2]> then\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (pick random (3) to (4))\n    set size to (pick random (35) to (25.11)) %\n    Turn\n    turn right (pick random (-25) to (25.1)) degrees\n    set [ddir v] to (direction)\n    point in direction (pick random (-180) to (180))\n    set [vdir v] to (direction)\n    set [brightness v] effect to (100)\n    set [ghost v] effect to (pick random (10) to (0))\n    show\n    set [svel v] to (pick random (13.11) to (18.11))\n    repeat (pick random (20) to (30))\n        point in direction (DDir)\n        move (Svel) steps\n        change [vdir v] by (Svel)\n        change [svel v] by (((0) - (Svel)) / (9))\n        point in direction (VDir)\n    end\n    repeat (10)\n        point in direction (DDir)\n        move (Svel) steps\n        change [vdir v] by (Svel)\n        change [svel v] by (((0) - (Svel)) / (9))\n        point in direction (VDir)\n        change size by (-2)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [Name1]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (text v)\n    set size to (500) %\n    set [ghost v] effect to (100)\n    set [brightness v] effect to (0)\n    set [direction v] to [0]\n    set [svel v] to [-3]\n    show\n    repeat (10)\n        change size by (Svel)\n        change [svel v] by ((Svel) / (4))\n        change [ghost v] effect by (-10)\n    end\n    repeat until <[1.5] < (timer)>\n        change size by (((150) - (size)) / (5))\n        change [ghost v] effect by (-10)\n    end\n    set [svel v] to [4]\n    repeat until <[2.2] < (timer)>\n        change [brightness v] effect by (15)\n        change size by (Svel)\n        set [svel v] to (((Svel) * (0.6)) + (((200) - (size)) / (4)))\n    end\n    set [svel v] to [4]\n    repeat until <[2.5] < (timer)>\n        change size by (Svel)\n        set [svel v] to (((Svel) * (0.6)) + (((225) - (size)) / (4)))\n    end\n    set [svel v] to [-1]\n    repeat until <[3.05] < (timer)>\n        change size by (Svel)\n        change [svel v] by ((Svel) / (4))\n    end\n    set [svel v] to [6]\n    repeat (4)\n        change [brightness v] effect by (-25)\n        change size by (Svel)\n        set [svel v] to (((Svel) * (0.6)) + (((175) - (size)) / (4)))\n    end\n    repeat until <[3.4] < (timer)>\n        change size by (Svel)\n        set [svel v] to (((Svel) * (0.6)) + (((175) - (size)) / (4)))\n    end\n    set [svel v] to [-2]\n    repeat until <[3.8] < (timer)>\n        change size by (Svel)\n        change [svel v] by ((Svel) / (4))\n    end\n    set [svel v] to [6]\n    set [rvel v] to [-2]\n    repeat (7)\n        change [rvel v] by ((Rvel) / (3))\n        change [direction v] by (Rvel)\n        change size by (Svel)\n        set [svel v] to (((Svel) * (0.6)) + (((200) - (size)) / (4)))\n    end\n    repeat until <[4.7] < (timer)>\n        change size by (Svel)\n        set [svel v] to (((Svel) * (0.6)) + (((200) - (size)) / (4)))\n        change [rvel v] by (((-360) - (Rvel)) / (5))\n        set [direction v] to (Rvel)\n    end\n    set [svel v] to [4]\n    repeat until <[5.6] < (timer)>\n        change size by (Svel)\n        set [svel v] to (((Svel) * (0.6)) + (((225) - (size)) / (4)))\n        change [rvel v] by (((-360) - (Rvel)) / (5))\n        set [direction v] to (Rvel)\n    end\n    set [svel v] to [-1]\n    repeat until <[6.3] < (timer)>\n        change size by (Svel)\n        change [svel v] by ((Svel) / (4))\n    end\n    set [svel v] to [6]\n    repeat (4)\n        change [brightness v] effect by (25)\n        change size by (Svel)\n        set [svel v] to (((Svel) * (0.6)) + (((175) - (size)) / (4)))\n    end\n    repeat until <[7.8] < (timer)>\n        change size by (Svel)\n        set [svel v] to (((Svel) * (0.6)) + (((175) - (size)) / (4)))\n    end\n    broadcast (End v)\n    set [svel v] to [3]\n    repeat until <[8.1] < (timer)>\n        change size by (Svel)\n        set [svel v] to (((Svel) * (0.6)) + (((225) - (size)) / (4)))\n    end\n    set [svel v] to [-1]\n    repeat (4)\n        change size by (Svel)\n        change [svel v] by ((Svel) / (44))\n    end\n    repeat until <(size) < [35]>\n        change size by (Svel)\n        change [svel v] by ((Svel) / (4))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [line2]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (spinlines1 v)\n    set size to (1) %\n    point in direction (((#) * (90)) + (45))\n    move (50) steps\n    point in direction (Direction)\n    set [direction v] to (((#) * (90)) + (-45))\n    point in direction (((#) * (90)) + (45))\n    set [brightness v] effect to (100)\n    set [svel v] to [2]\n    show\n    repeat (9)\n        turn right (Svel) degrees\n        change [svel v] by ((Svel) / (12))\n        change size by (Svel)\n        next costume\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [Circ3]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (circ1 v)\n    set size to (1) %\n    go to [back v] layer\n    go [forward v] (1) layers\n    set [ghost v] effect to (0)\n    set [brightness v] effect to (0)\n    set [svel v] to [25]\n    show\n    repeat (2)\n        change size by (Svel)\n        change [svel v] by (((0) - (Svel)) / (25))\n    end\n    repeat (25)\n        switch costume to (size hack v)\n        change size by (((650) - (size)) / (6))\n        switch costume to (circ1 v)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [line3]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (spinlines1 v)\n    set size to (100) %\n    point in direction (((#) * (90)) + (45))\n    move (0) steps\n    point in direction (Direction)\n    set [direction v] to (((#) * (90)) + (-45))\n    point in direction (((#) * (90)) + (45))\n    set [brightness v] effect to (100)\n    set [svel v] to [10]\n    show\n    repeat (9)\n        move (Svel) steps\n        set [svel v] to ((Svel) * (0.85))\n        next costume\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [Circ4]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (circ1 v)\n    set size to (1) %\n    go to [back v] layer\n    go [forward v] (2) layers\n    set [ghost v] effect to (0)\n    set [brightness v] effect to (100)\n    set [svel v] to [25]\n    show\n    repeat (2)\n        change size by (Svel)\n        change [svel v] by (((0) - (Svel)) / (25))\n    end\n    repeat (25)\n        switch costume to (size hack v)\n        change size by (((650) - (size)) / (6))\n        switch costume to (circ1 v)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Chev1]> then\n    wait until <[1.5] < (timer)>\n    show\n    wait until <[3.2] < (timer)>\n    set [brightness v] effect to (0)\n    wait until <[6.4] < (timer)>\n    repeat (4)\n        change [brightness v] effect by (25)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [CircExplo1]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (circexplo v)\n    set size to (1) %\n    set [ghost v] effect to (25)\n    set [brightness v] effect to (0)\n    set [svel v] to [45]\n    set [xvel v] to [30]\n    set [fisheye v] effect to (100)\n    show\n    repeat (25)\n        change size by (Svel)\n        change [xvel v] by ((Xvel) / (3))\n        change [fisheye v] effect by (Xvel)\n        set [svel v] to ((Svel) * (0.85))\n        change [ghost v] effect by (4)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [line1]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (spinlines1 v)\n    set size to (100) %\n    point in direction (((#) * (90)) + (45))\n    move (0) steps\n    point in direction (Direction)\n    set [direction v] to (((#) * (90)) + (-45))\n    point in direction (((#) * (90)) + (45))\n    set [brightness v] effect to (0)\n    set [svel v] to [10]\n    show\n    repeat (9)\n        move (Svel) steps\n        set [svel v] to ((Svel) * (0.85))\n        next costume\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [Circ5]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (circ1 v)\n    set size to (1) %\n    go to [back v] layer\n    go [forward v] (3) layers\n    set [ghost v] effect to (0)\n    set [brightness v] effect to (0)\n    set [svel v] to [25]\n    show\n    repeat (2)\n        change size by (Svel)\n        change [svel v] by (((0) - (Svel)) / (25))\n    end\n    repeat (25)\n        switch costume to (size hack v)\n        change size by (((650) - (size)) / (6))\n        switch costume to (circ1 v)\n    end\nend\n\nClone [Par2] [7]\n\nwhen I start as a clone\nif <(ID) = [Fade2]> then\n    hide\n    switch costume to (pos hack v)\n    go to x: (0) y: (0)\n    switch costume to (fade2 v)\n    set size to (200) %\n    set [ghost v] effect to (100)\n    set [brightness v] effect to (0)\n    show\n    repeat (4)\n        change [ghost v] effect by (-5)\n    end\n    repeat until <[8.6] < (timer)>\n        go to [front v] layer\n    end\n    repeat (10)\n        change [ghost v] effect by (2)\n        delete this clone\n    end\nend\n\n@Splash Screen\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\ngo to x: (0) y: (0)\nswitch costume to (game over v)\ngo to [front v] layer\nshow\nbroadcast (Main Menu v)\n\nwhen I receive [start v]\nhide\n\nwhen I receive [splash screen v]\ngo to x: (0) y: (0)\nswitch costume to (title screen v)\ngo to [front v] layer\nshow\n\n@Main Menu\n\nwhen I receive [main menu v]\nwait (0.1) seconds\ngo to [front v] layer\nset size to (10) %\nshow\ngo to x: (0) y: (-85)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((110) - (size)))\n    else\n        change size by ((0.2) * ((100) - (size)))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nhide\nbroadcast (Start v)\n\n@Score\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nforever\n    Change Costume To (letter (index) of (COINS))\n    set x to ((((index) - (0.5)) - ((length of (COINS)) / (2))) * ((size) / (2)))\n    change size by ((0.2) * ((50) - (size)))\nend\n\ndefine Setup\nhide\ngo to x: (0) y: (137)\nset [index v] to [1]\nrepeat (5)\n    create clone of (_myself_ v)\n    change x by ((size) / (2))\n    change [index v] by (1)\nend\n\ndefine Change Costume To (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to (120) %\nend\n\nwhen I receive [start v]\nSetup\n\n@Lives\n\nwhen flag clicked\ngo to x: (162) y: (152)\nhide\n\nwhen I receive [start v]\nswitch costume to (9 v)\nshow\nforever\n    if <(LIVES) < [2]> then\n        point in direction (pick random (-180) to (180))\n        move (2) steps\n        wait (0) seconds\n        turn left (180) degrees\n        move (2) steps\n    end\n    go to x: (162) y: (152)\nend\n\nwhen I receive [lose life v]\nnext costume\n\n@Timer\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nforever\n    Change Costume To (letter (index) of (TIMER))\n    set x to ((((index) - (0.5)) - ((length of (TIMER)) / (2))) * ((size) / (2)))\nend\n\ndefine Setup\nhide\nreset timer\ngo to x: (0) y: (-137)\nset [index v] to [1]\nrepeat (8)\n    create clone of (_myself_ v)\n    change x by ((size) / (2))\n    change [index v] by (1)\nend\n\ndefine Change Costume To (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\nend\n\nwhen I receive [start v]\nSetup\n\nwhen flag clicked\nforever\n    set [timer v] to (([floor v] of ((timer) * (10)) ) / (10))\n    if <not < (TIMER) contains [.]?>> then\n        set [timer v] to (join (TIMER) [.0])\n    end\nend\n\n@Enemy\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I receive [change scene v]\nif <(SCENE #) = [2]> then\n    if <([x position v] of [player v]) < [0]> then\n        Spawn [Purple] At: [-47] [-75] Dir [90]\n    else\n        Spawn [Purple] At: [76] [-75] Dir [-90]\n    end\nend\n\nwhen I start as a clone\nset size to (75) %\nclear graphic effects\nshow\nset [frame v] to [0]\nset [speed y v] to [0]\nforever\n    switch costume to (purple 1 v)\n    set rotation style [don't rotate v]\n    Move - Left To Right\n    Move Down\n    change [frame v] by (0.33)\n    switch costume to ((1) + (([floor v] of (frame) ) mod (4)))\n    set rotation style [left-right v]\n    if <<(INVUNERABLE) = [0]> and <touching (player v)?>> then\n        Touching Player\n    end\nend\n\nwhen I receive [exit scene v]\ndelete this clone\n\ndefine Move Down\nchange [speed y v] by (GRAVITY)\nchange y by (speed y)\nrepeat until <not <touching (level v)?>>\n    change y by (1)\n    set [speed y v] to [0]\nend\n\ndefine Move - Left To Right\nmove (2) steps\nrepeat (4)\n    if <not <<touching (level v)?> or <touching (_edge_ v)?>>> then\n        if <not <<touching (safe zones v)?> or <touching (platform v)?>>> then\n            stop [this script v]\n        end\n    end\n    change y by (1)\nend\nchange y by (-4)\nmove (-2) steps\nturn right (180) degrees\n\ndefine Touching Player\nif <([speed y v] of [player v]) < [-3]> then\n    broadcast (Player - Bounce v)\n    start sound [Squish Pop v]\n    switch costume to (purple squish v)\n    wait (0.3) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\nbroadcast (Lose Life v)\n\ndefine Spawn (type) At: (x) (y) Dir (dir)\ngo to x: (x) y: (y)\npoint in direction (dir)\ncreate clone of (_myself_ v)\n\n@Safe Zones\n\nwhen flag clicked\nclear graphic effects\ngo to x: (0) y: (0)\ngo to [back v] layer\nset [ghost v] effect to (100)\n\nwhen I receive [change scene v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (SCENE #))\n\nwhen flag clicked\nhide\n\nwhen I receive [intro finished v]\nshow\n\n@Smoke\n\nwhen I start as a clone\nshow\nAnimate Smoke\n\nwhen I receive [smoke v]\nMake Smoke\n\ndefine Make Smoke\ncreate clone of (_myself_ v)\n\ndefine Animate Smoke\nset size to (29) %\npoint in direction (pick random (0) to (360))\nset rotation style [all around v]\ngo to x: ([x position v] of [player v]) y: (([y position v] of [player v]) - (10))\nswitch costume to (costume1 v)\nrepeat (20)\n    move (-2) steps\n    change [ghost v] effect by (5)\n    change size by (-5)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    hide\n    go to [back v] layer\n    go [forward v] (1) layers\nend\n\n
Arrow Keys to Move\n\n@griffpatch omg griffpatch commented!!!!!!!!!\nmon 6 sept 2021\n\n---------------------------------Story----------------------------------\nIT WAS A TIME OF GREAT MYSTERY.\nTHE SQUARE DUDE - APPEL - HAD DEFEATED MICRO MANAGER.\nAND RESTORED PEACE TO PLANET APPELMOESSHAPJE\nHOWEVER, THE VIRUS CAPTURED HIM AND TURNED HIM EVIL.\nNOW HE HAUNTS THE PLANET OF APPELMOESSHAPJE.\nGRIFFPATCH TRIED TO STOP HIM.\nBUT APPEL CAPTURED HIM.\nWHO WILL DEFEAT APPEL AND SAVE GRIFFPATCH?\nMABYE, YOU?\n\n\n\n------------------------------------Credits----------------------------\n\n@griffpatch\n@df21