Rogue Knight // Pixel Art Platformer #games

Instructions: Hi And Welcome To My Newest Game: Rogue Knight\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n▶ Advertising Will Be Reported haha lol\n▶ Arrow Keys To Move.\n▶ Space To Attack\n▶ Attack Or Jump To Kill enemies\n▶ Watch Out For Spikes And Holes And Enemies\n▶ Go To The Door To Complete The Level\n★ ALL LEVELS ARE POSSIBLE\n▬▬▬▬▬▬▬▬▬▬▬Info▬▬▬▬▬▬▬▬▬▬▬\nMade In 7 hours\nOver 1029 Blocks\nSlime And Orange Bat Can't Be Killed Via Jump\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\nSuggest It To Get Featured Here:\nhttps://scratch.mit.edu/studios/4228481/comments\n\nreport bugs and faults in the comments\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#Rogue #Knight #Enemies #Attack #Jump #platformer #worm #mushroom #goblin #key #door #levels @hours #hard #To #make #popular @naterose1 @popuiar @flippy445 #lol #money #heart #star #epic #great #good\n#Out # Side #Outside #Adventurer #xamuil2 #game #rat #fly #mushroom #cactus #star #bee #sign #flower #colors #blue  #Lag #Wall #Slope #Art #Grass #Monster #griffpatch #spike #sequel #lava #remix #heart #star #famous #why #are #u #reading #this #Hi #I #God #kay #cool #money #snow #trend #Gravity #dash #I #see #you #xd #space  #Darkness #Gravity #darkness\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n#games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games \n#games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games \n\n\n

@Stage\n\nwhen flag clicked\nset volume to (50) %\nforever\n    play sound [621600_Bluebird-of-Friendliness v] until done\nend\n\n@Blank\n\n@Assets\n\n@Player\n\nwhen flag clicked\nset [level v] to [1]\nset rotation style [left-right v]\nbroadcast (Reset v)\nforever\n    if <(Player Alive?) = [0]> then\n        platform physics (13.5) (-1) (0.7) (2.1)\n    end\n    if <touching (end v)?> then\n        change [level v] by (1)\n        broadcast (Reset v)\n    end\nend\n\ndefine platform physics (jump height) (gravity) (friction) (movement speed)\nswitch costume to (hitbbox v)\nif <<(y position) < [-160]> or <touching (spikes v)?>> then\n    broadcast (Die v)\nend\nchange y by (Y Velocity)\nif <<touching (ground v)?> or <touching (strange door v)?>> then\n    repeat ([abs v] of (Y Velocity) )\n        if <<touching (ground v)?> or <touching (strange door v)?>> then\n            change y by ((-1) * (([abs v] of (Y Velocity) ) / (Y Velocity)))\n        end\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <not <(Y Velocity) > [0]>>> then\n        start sound [Jump v]\n        set [y velocity v] to (jump height)\n    else\n        set [y velocity v] to [0]\n    end\nelse\n    change [y velocity v] by (gravity)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x velocity v] by (movement speed)\n    point in direction (90)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x velocity v] by ((-1) * (movement speed))\n    point in direction (-90)\nend\nchange x by (X Velocity)\nif <<touching (ground v)?> or <touching (strange door v)?>> then\n    set [old y v] to (y position)\n    repeat ([abs v] of (X Velocity) )\n        if <<touching (ground v)?> or <touching (strange door v)?>> then\n            change y by (1)\n        end\n    end\n    if <<touching (ground v)?> or <touching (strange door v)?>> then\n        set y to (Old Y)\n        repeat ([ceiling v] of ([abs v] of (X Velocity) ) )\n            if <<touching (ground v)?> or <touching (strange door v)?>> then\n                change x by ((-1) * (([abs v] of (X Velocity) ) / (X Velocity)))\n            end\n        end\n        set [x velocity v] to [0]\n    end\nend\nset [x velocity v] to ((X Velocity) * (friction))\nchange [frame v] by (1)\nif <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> and <(Attacking?) = [0]>> then\n    switch costume to ((((Frame) / (4)) mod (4)) + (6))\nelse\n    if <(Attacking?) = [0]> then\n        switch costume to ((((Frame) / (4)) mod (3)) + (2))\n    end\nend\nif <(Attacking?) = [1]> then\n    switch costume to (AttackingCostume)\nend\n\nwhen I receive [reset v]\nset size to (250) %\nif <not <(Level) = [4]>> then\n    go to x: (-221) y: (-59)\nelse\n    go to x: (-221) y: (140)\nend\nclear graphic effects\nshow\n\nwhen flag clicked\nforever\n    if <<key (space v) pressed?> and <(Attacking?) = [0]>> then\n        start sound [swing3 v]\n        set [attacking? v] to [1]\n        wait (0.75) seconds\n    end\nend\n\nwhen flag clicked\nset [attacking? v] to [0]\nforever\n    wait until <(Attacking?) = [1]>\n    set [attackingcostume v] to [12]\n    wait (0.035) seconds\n    repeat (3)\n        change [attackingcostume v] by (1)\n        wait (0.03) seconds\n    end\n    set [attacking? v] to [0]\n    change [attackingcostume v] by (13)\nend\n\nwhen I receive [die v]\nstart sound [Ouch v]\nset [player alive? v] to [1]\nbroadcast (Reset v)\n\nwhen I receive [reset v]\nset [player alive? v] to [0]\nclear graphic effects\n\nchange [level v] by (1)\nbroadcast (Reset v)\n\n@Ground\n\nwhen flag clicked\nforever\n    switch costume to (Level)\n    go to x: (15) y: (54)\nend\n\n@Art\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Spikes\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@End\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    switch costume to (Level)\nend\n\ngo to [front v] layer\n\n@Box\n\n@Clones\n\nwhen I start as a clone\nif <[7] > (costume [number v])> then\n    show\n    forever\n        repeat (Enemy 1 Distance)\n            if <(Enemy Alive?) = [0]> then\n                point in direction (-90)\n                change x by (([abs v] of (Enemy 1 Speed) ) * (-1))\n            end\n        end\n        repeat (Enemy 1 Distance)\n            if <(Enemy Alive?) = [0]> then\n                point in direction (90)\n                change x by ([abs v] of (Enemy 1 Speed) )\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nset [level v] to [1]\nhide\n\nwhen I receive [reset v]\nset [trigger v] to [0]\ndelete this clone\n\nwhen I receive [reset v]\nwait (0.05) seconds\nif <(Level) = [1]> then\n    Create Enemy Type: [1] A: [77] B: [-150] C: [51] D: [2.5]\n    Create Enemy Type: [2] A: [60] B: [4] C: [75] D: [2.5]\nend\nif <(Level) = [2]> then\n    Create Enemy Type: [3] A: [70] B: [-36] C: [90] D: [0]\n    Create Enemy Type: [2] A: [-8] B: [43] C: [95] D: [2.5]\nend\nif <(Level) = [3]> then\n    Create Enemy Type: [4] A: [-131] B: [87] C: [] D: []\n    Create Enemy Type: [1] A: [-96] B: [35] C: [50] D: [2.5]\n    Create Enemy Type: [5] A: [20] B: [-127] C: [] D: []\nend\nif <(Level) = [4]> then\n    Create Enemy Type: [3] A: [82] B: [19] C: [180] D: []\n    Create Enemy Type: [3] A: [-43] B: [19] C: [0] D: []\n    Create Enemy Type: [4] A: [219] B: [-70] C: [0] D: []\n    Create Enemy Type: [7] A: [221 ] B: [-120] C: [72.5] D: [2.5]\n    Create Enemy Type: [6] A: [233] B: [164] C: [10] D: [2.5]\nend\nif <(Level) = [5]> then\n    Create Enemy Type: [4] A: [-218] B: [167] C: [] D: []\n    Create Enemy Type: [1] A: [-116] B: [86] C: [43] D: [2.5]\n    Create Enemy Type: [8] A: [106] B: [-29] C: [10] D: [1]\nend\n\ndefine Create Enemy Type: (type) A: (var a) B: (var b) C: (var c) D: (var d)\nif <(type) = [1]> then\n    switch costume to (goblin_run_anim v)\n    go to x: (var a) y: (var b)\n    set [enemy 1 distance v] to (var c)\n    set [enemy 1 speed v] to (var d)\n    create clone of (_myself_ v)\nend\nif <(type) = [2]> then\n    switch costume to (blue_fly_idle_or_flying_anim v)\n    go to x: (var a) y: (var b)\n    set [enemy 1 distance v] to (var c)\n    set [enemy 1 speed v] to (var d)\n    create clone of (_myself_ v)\nend\nif <(type) = [3]> then\n    switch costume to (trap_suspended_anim v)\n    go to x: (var a) y: (var b)\n    point in direction (var c)\n    create clone of (_myself_ v)\n    point in direction (90)\nend\nif <(type) = [4]> then\n    switch costume to (costume2 v)\n    go to x: (var a) y: (var b)\n    create clone of (_myself_ v)\nend\nif <(type) = [5]> then\n    switch costume to (mushroom_crushed_anim v)\n    go to x: (var a) y: (var b)\n    create clone of (_myself_ v)\nend\nif <(type) = [6]> then\n    switch costume to (orange_fly_idle_or_flying_anim v)\n    go to x: (var a) y: (var b)\n    create clone of (_myself_ v)\nend\nif <(type) = [7]> then\n    switch costume to (slime_walk_anim v)\n    go to x: (var a) y: (var b)\n    create clone of (_myself_ v)\nend\nif <(type) = [8]> then\n    switch costume to (worm_walk_anim v)\n    go to x: (var a) y: (var b)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <[7] > (costume [number v])> then\n    set [enemy alive? v] to [0]\n    forever\n        if <touching (bottom detection v)?> then\n            start sound [Crunch v]\n            set [enemy alive? v] to [1]\n            repeat (15)\n                change size by (4)\n                change [ghost v] effect by (6.6666666667)\n            end\n            delete this clone\n        end\n        if <<touching (sword detection v)?> and <(Attacking?) = [1]>> then\n            start sound [Crunch v]\n            set [enemy alive? v] to [1]\n            repeat (15)\n                change size by (4)\n                change [ghost v] effect by (6.6666666667)\n            end\n            delete this clone\n        end\n        if <<<touching (player v)?> and <not <(Enemy Alive?) = [1]>>> and <(Attacking?) = [0]>> then\n            broadcast (Die v)\n        end\n    end\nend\n\nwhen I start as a clone\nif <[7] > (costume [number v])> then\n    forever\n        if <not <(Enemy Alive?) = [1]>> then\n            switch costume to (goblin_run_anim v)\n            wait (0.05) seconds\n        end\n        repeat (5)\n            if <not <(Enemy Alive?) = [1]>> then\n                next costume\n                wait (0.05) seconds\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) > [6]> and <[10] > (costume [number v])>> then\n    forever\n        if <not <(Enemy Alive?) = [1]>> then\n            switch costume to (blue_fly_idle_or_flying_anim v)\n            wait (0.04) seconds\n        end\n        repeat (2)\n            if <not <(Enemy Alive?) = [1]>> then\n                next costume\n                wait (0.04) seconds\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) > [6]> and <[10] > (costume [number v])>> then\n    set [enemy alive? v] to [0]\n    forever\n        if <touching (bottom detection v)?> then\n            start sound [Crunch v]\n            set [enemy alive? v] to [1]\n            repeat (15)\n                change size by (4)\n                change [ghost v] effect by (6.6666666667)\n            end\n            delete this clone\n        end\n        if <<touching (sword detection v)?> and <(Attacking?) = [1]>> then\n            start sound [Crunch v]\n            set [enemy alive? v] to [1]\n            repeat (15)\n                change size by (4)\n                change [ghost v] effect by (6.6666666667)\n            end\n            delete this clone\n        end\n        if <<<touching (player v)?> and <not <(Enemy Alive?) = [1]>>> and <(Attacking?) = [0]>> then\n            broadcast (Die v)\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) > [6]> and <[10] > (costume [number v])>> then\n    show\n    forever\n        repeat (Enemy 1 Distance)\n            if <(Enemy Alive?) = [0]> then\n                point in direction (90)\n                change x by (([abs v] of (Enemy 1 Speed) ) * (-1))\n            end\n        end\n        repeat (Enemy 1 Distance)\n            if <(Enemy Alive?) = [0]> then\n                point in direction (-90)\n                change x by ([abs v] of (Enemy 1 Speed) )\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) > [9]> and <[28] > (costume [number v])>> then\n    set rotation style [all around v]\n    forever\n        show\n        switch costume to (trap_suspended_anim v)\n        wait (0.07) seconds\n        repeat (17)\n            next costume\n            wait (0.07) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nif <[7] > (costume [number v])> then\n    set [enemy alive? v] to [0]\n    forever\n        if <touching (bottom detection v)?> then\n            start sound [Crunch v]\n            set [enemy alive? v] to [1]\n            repeat (15)\n                change size by (4)\n                change [ghost v] effect by (6.6666666667)\n            end\n            delete this clone\n        end\n        if <<touching (sword detection v)?> and <(Attacking?) = [1]>> then\n            start sound [Crunch v]\n            set [enemy alive? v] to [1]\n            repeat (15)\n                change size by (4)\n                change [ghost v] effect by (6.6666666667)\n            end\n            delete this clone\n        end\n        if <<<touching (player v)?> and <not <(Enemy Alive?) = [1]>>> and <(Attacking?) = [0]>> then\n            broadcast (Die v)\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) > [9]> and <[28] > (costume [number v])>> then\n    forever\n        if <touching (player v)?> then\n            broadcast (Die v)\n        end\n    end\nend\n\nwhen I start as a clone\nif <[7] > (costume [number v])> then\n\nwhen I start as a clone\nif <(costume [number v]) = [28]> then\n    show\n    clear graphic effects\n    forever\n        if <touching (player v)?> then\n            set [trigger v] to [1]\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) > [28]> and <[35] > (costume [number v])>> then\n    show\n    forever\n        switch costume to (mushroom_crushed_anim v)\n        wait (0.05) seconds\n        repeat (5)\n            next costume\n            wait (0.05) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) > [28]> and <[35] > (costume [number v])>> then\n    forever\n        if <touching (player v)?> then\n            set [y velocity v] to [18]\n            wait until <not <touching (player v)?>>\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) > [34]> and <[38] > (costume [number v])>> then\n    show\n    forever\n        repeat (Enemy 1 Distance)\n            if <(Enemy Alive?) = [0]> then\n                point in direction (90)\n                change x by (([abs v] of (Enemy 1 Speed) ) * (-1))\n            end\n        end\n        repeat (Enemy 1 Distance)\n            if <(Enemy Alive?) = [0]> then\n                point in direction (-90)\n                change x by ([abs v] of (Enemy 1 Speed) )\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) > [34]> and <[38] > (costume [number v])>> then\n    forever\n        if <not <(Enemy Alive?) = [1]>> then\n            switch costume to (orange_fly_idle_or_flying_anim v)\n            wait (0.04) seconds\n        end\n        repeat (2)\n            if <not <(Enemy Alive?) = [1]>> then\n                next costume\n                wait (0.04) seconds\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) > [37]> and <[53] > (costume [number v])>> then\n    forever\n        if <not <(Enemy Alive?) = [1]>> then\n            switch costume to (slime_walk_anim v)\n            wait (0.02) seconds\n        end\n        repeat (14)\n            if <not <(Enemy Alive?) = [1]>> then\n                next costume\n                wait (0.02) seconds\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) > [37]> and <[53] > (costume [number v])>> then\n    show\n    forever\n        repeat (Enemy 1 Distance)\n            if <(Enemy Alive?) = [0]> then\n                point in direction (90)\n                change x by (([abs v] of (Enemy 1 Speed) ) * (-1))\n            end\n        end\n        repeat (Enemy 1 Distance)\n            if <(Enemy Alive?) = [0]> then\n                point in direction (-90)\n                change x by ([abs v] of (Enemy 1 Speed) )\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <<<(costume [number v]) > [37]> and <[53] > (costume [number v])>> or <<(costume [number v]) > [34]> and <[38] > (costume [number v])>>> then\n    set [enemy alive? v] to [0]\n    forever\n        if <<touching (sword detection v)?> and <(Attacking?) = [1]>> then\n            start sound [Crunch v]\n            set [enemy alive? v] to [1]\n            repeat (15)\n                change size by (4)\n                change [ghost v] effect by (6.6666666667)\n            end\n            delete this clone\n        end\n        if <<<touching (player v)?> and <not <(Enemy Alive?) = [1]>>> and <(Attacking?) = [0]>> then\n            broadcast (Die v)\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) > [52]> and <[59] > (costume [number v])>> then\n    forever\n        if <not <(Enemy Alive?) = [1]>> then\n            switch costume to (worm_walk_anim v)\n            wait (0.04) seconds\n        end\n        repeat (5)\n            if <not <(Enemy Alive?) = [1]>> then\n                next costume\n                wait (0.04) seconds\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) > [52]> and <[59] > (costume [number v])>> then\n    set [enemy alive? v] to [0]\n    forever\n        if <touching (bottom detection v)?> then\n            start sound [Crunch v]\n            set [enemy alive? v] to [1]\n            repeat (15)\n                change size by (4)\n                change [ghost v] effect by (6.6666666667)\n            end\n            delete this clone\n        end\n        if <<touching (sword detection v)?> and <(Attacking?) = [1]>> then\n            start sound [Crunch v]\n            set [enemy alive? v] to [1]\n            repeat (15)\n                change size by (4)\n                change [ghost v] effect by (6.6666666667)\n            end\n            delete this clone\n        end\n        if <<<touching (player v)?> and <not <(Enemy Alive?) = [1]>>> and <(Attacking?) = [0]>> then\n            broadcast (Die v)\n        end\n    end\nend\n\nwhen I start as a clone\nif <<(costume [number v]) > [52]> and <[59] > (costume [number v])>> then\n    show\n    forever\n        repeat (Enemy 1 Distance)\n            if <(Enemy Alive?) = [0]> then\n                point in direction (90)\n                change x by (([abs v] of (Enemy 1 Speed) ) * (-1))\n            end\n        end\n        repeat (Enemy 1 Distance)\n            if <(Enemy Alive?) = [0]> then\n                point in direction (-90)\n                change x by ([abs v] of (Enemy 1 Speed) )\n            end\n        end\n    end\nend\n\n@Sword Detection\n\nwhen flag clicked\nset rotation style [left-right v]\nset [ghost v] effect to (100)\nforever\n    broadcast (Tick v)\nend\n\nwhen I receive [tick v]\ngo to x: ([x position v] of [player v]) y: ([y position v] of [player v])\npoint in direction ([direction v] of [player v])\n\n@Clouds\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nset size to (pick random (750) to (1000)) %\nset [ghost v] effect to (pick random (60) to (90))\ngo to x: (300) y: (pick random (160) to (-160))\nrepeat until <(x position) < [-245]>\n    move (-1) steps\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\n    wait (pick random (5) to (12)) seconds\nend\n\n@Coins\n\nwhen I start as a clone\nforever\n    next costume\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nset [level v] to [1]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [reset v]\nwait (0.05) seconds\nif <(Level) = [1]> then\n    Create Coin X: [-180] Y: [-105]\n    Create Coin X: ((-180) + (30)) Y: [-105]\n    Create Coin X: ((-180) + (60)) Y: [-105]\n    Create Coin X: [104] Y: [-49]\n    Create Coin X: ((104) + (30)) Y: [-49]\n    Create Coin X: ((104) + (60)) Y: [-49]\n    Create Coin X: ((-35) + (0)) Y: [55]\n    Create Coin X: ((-35) + (30)) Y: [55]\nend\nif <(Level) = [2]> then\n    Create Coin X: [45] Y: [-133]\n    Create Coin X: [-70] Y: [-102]\n    Create Coin X: ((-70) + (25)) Y: [-102]\n    Create Coin X: ((145) + (0)) Y: [-102]\n    Create Coin X: ((145) + (0)) Y: [-102]\n    Create Coin X: ((-184) + (0)) Y: [-68]\n    Create Coin X: ((-184) + (25)) Y: [-68]\nend\nif <(Level) = [3]> then\n    Create Coin X: [18] Y: [-101]\n    Create Coin X: [18] Y: ((-101) + ((35) * (1)))\n    Create Coin X: [18] Y: ((-101) + ((35) * (2)))\n    Create Coin X: [18] Y: ((-101) + ((35) * (3)))\n    Create Coin X: [-105] Y: [-130]\n    Create Coin X: ((-105) + ((15) * (2))) Y: [-130]\n    Create Coin X: ((-105) + ((15) * (-2))) Y: [-130]\n    Create Coin X: [97] Y: [73]\n    Create Coin X: [97] Y: ((73) - (33))\nend\nif <(Level) = [4]> then\n    Create Coin X: [133] Y: [-72]\n    Create Coin X: [160] Y: [-72]\n    Create Coin X: ((160) + ((160) - (133))) Y: [-72]\n    Create Coin X: [-178] Y: [121]\n    Create Coin X: ((-178) + ((30) * (1))) Y: [121]\n    Create Coin X: ((-178) + ((30) * (2))) Y: [121]\nend\nif <(Level) = [5]> then\n    Create Coin X: [1] Y: [83]\n    Create Coin X: [-181] Y: [165]\n    Create Coin X: ((-181) + ((30) * (1))) Y: [165]\n    Create Coin X: ((-181) + ((30) * (2))) Y: [165]\n    Create Coin X: [226] Y: [-102]\n    Create Coin X: ((226) + ((-30) * (1))) Y: [-102]\n    Create Coin X: ((226) + ((-30) * (2))) Y: [-102]\nend\n\ndefine Create Coin X: (x) Y: (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nforever\n    if <touching (player v)?> then\n        start sound [Coin v]\n        delete this clone\n    end\nend\n\n@Bottom Detection\n\nwhen I receive [tick v]\ngo to x: ([x position v] of [player v]) y: ([y position v] of [player v])\n\nwhen flag clicked\nset rotation style [left-right v]\nset [ghost v] effect to (100)\n\n@Strange Door\n\nwhen flag clicked\nset rotation style [left-right v]\nset [level v] to [1]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [reset v]\nwait (0.05) seconds\nif <(Level) = [3]> then\n    Create Door X: [139] Y: [54]\nend\nif <(Level) = [4]> then\n    Create Door X: [-100] Y: [-97]\nend\nif <(Level) = [5]> then\n    Create Door X: [64] Y: [152]\nend\n\ndefine Create Door X: (x) Y: (y)\nset [attacking? v] to [0]\nswitch costume to (strange_door_closed_anim v)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nclear graphic effects\nif <not <(Level) = [5]>> then\n    switch costume to (strange_door_closed_anim v)\nend\nif <(Level) = [5]> then\n    switch costume to (strange_door_closed_anim2 v)\nend\n\nwhen I start as a clone\nset [strange door ghost fx v] to [0]\nforever\n    go to [back v] layer\n    set [ghost v] effect to (Strange Door Ghost FX)\n    if <(Trigger) = [1]> then\n        change [strange door ghost fx v] by (5)\n    end\n    if <(Strange Door Ghost FX) = [100]> then\n        delete this clone\n    end\n    if <(Level) = [3]> then\n        point in direction (90)\n    end\n    if <(Level) = [4]> then\n        point in direction (-90)\n    end\nend\n\n@fog \n\nwhen flag clicked\nshow\nset [ghost v] effect to (97.5)\ngo to x: (0) y: (0)\n\n@Thumbnail\n\nwhen flag clicked\nhide\nforever\n    set [timer v] to (timer)\nend\n\nwhen [timer v] > (Timer)\ngo to [front v] layer\nshow\n\n