CabConModding
Facebook
Twitter
youtube
Discord
Contact us
RSS
Menu
CabConModding
Home
New
Top
Premium
Rules
FAQ - Frequently Asked Questions
Games
Fornite
Call of Duty: Black Ops 3
Clash of Clans
Grand Theft Auto 5
Apex Legends
Assassin’s Creed Origins
Forums
Premium
Latest posts
What's new
Latest posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Log in
Register
What's new
Premium
Latest posts
Menu
Log in
Register
Navigation
Install the app
Install
More options
Dark Theme
Contact us
Close Menu
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 2
Call of Duty: Black Ops 2 Mods and Scripts
Call of Duty: Black Ops 2 Scripts
Call of Duty: Black Ops 2 Scripts Questions
Call of Duty: Black Ops 2 Answered Questions
FlappyBirds Bo2 {Need Help Please I Have Script}
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="JayCoder" data-source="post: 11596" data-attributes="member: 11522"><p><strong>Hey guys, whats up , anyways i'm trying to convert flappybirds from cod waw</strong></p><p><strong>and i have most of it working correctly but i need help, if u can please help....</strong></p><p><strong></strong></p><p><strong>[PHP]#include maps\mp\_utility;</strong></p><p><strong>#include common_scripts\utility;</strong></p><p><strong>#include maps\mp\gametypes\_hud_util;</strong></p><p><strong>#include maps\mp\gametypes\_hud_message;</strong></p><p><strong>#include maps\_destructible_types;</strong></p><p><strong></strong></p><p><strong>init()</strong></p><p><strong>{</strong></p><p><strong> level thread onPlayerConnect();</strong></p><p><strong>}</strong></p><p><strong></strong></p><p><strong>onPlayerConnect()</strong></p><p><strong>{</strong></p><p><strong> for(;;)</strong></p><p><strong> {</strong></p><p><strong> level waittill("connected", player);</strong></p><p><strong> player thread onPlayerSpawned();</strong></p><p><strong> }</strong></p><p><strong>}</strong></p><p><strong></strong></p><p><strong>onPlayerSpawned()</strong></p><p><strong>{</strong></p><p><strong> self endon("disconnect");</strong></p><p><strong> level endon("game_ended");</strong></p><p><strong> for(;;)</strong></p><p><strong> {</strong></p><p><strong> self waittill("spawned_player");</strong></p><p><strong> self thread FlappyPrintStart();</strong></p><p><strong> }</strong></p><p><strong>}</strong></p><p><strong>FlappyPrintStart()</strong></p><p><strong>{</strong></p><p><strong> self thread flappyBird();</strong></p><p><strong> for(;;)</strong></p><p><strong> {</strong></p><p><strong> self iprintln("FlappyBirds ^F^1Test");</strong></p><p><strong> }</strong></p><p><strong>}</strong></p><p><strong>flappyBird() {</strong></p><p><strong> //close menu founction</strong></p><p><strong> //Delete Any Hud On Screen Etc Goes Here In A Thread</strong></p><p><strong> self setDvar("ammoCounterHide", 1);</strong></p><p><strong> self setDvars("ui_hud_hardcore", 1, "cg_drawCrosshair", 0);</strong></p><p><strong> self freezeControls(true);</strong></p><p><strong> self.FlappyGame = true;</strong></p><p><strong> hud = [];</strong></p><p><strong> bird = [];</strong></p><p><strong> pipe = [];</strong></p><p><strong> hud["bg"] = self createRectangle("CENTER", "CENTER", 0, 0, 1000, 1000, divideColor(120, 255, 255), "white", -12, 1);</strong></p><p><strong> hud["bg_bot"] = self createRectangle("BOTTOM", "BOTTOM", 0, 100, 1000, 130, divideColor(255, 230, 192), "white", -7, 1);</strong></p><p><strong> hud["bg_strip"] = self createRectangle("BOTTOM", "BOTTOM", 0, -20, 1000, 20, divideColor(97, 255, 113), "white", -6, 1);</strong></p><p><strong> bird = self createBird();//Bird Hud</strong></p><p><strong> self thread floatWaitingFlappy(bird);//Another Thread Needed</strong></p><p><strong> self thread initFlappyOptions(bird, hud, pipe);//A Thread</strong></p><p><strong> self waittill("ExitFlappy");</strong></p><p><strong> //add a thread to remake menu/or reopen menu</strong></p><p><strong>}</strong></p><p><strong>exitFlappyBird(bird, hud, pipe, end) {</strong></p><p><strong> self notify("ExitFlappy");</strong></p><p><strong> self.FlappyGame = undefined;</strong></p><p><strong> self.FlappyGameOver = undefined;</strong></p><p><strong> self destroyAll(bird);</strong></p><p><strong> self destroyAll(pipe);</strong></p><p><strong> self destroyAll(hud);</strong></p><p><strong> self destroyAll(end);</strong></p><p><strong> self freezeControls(false);</strong></p><p><strong> self setDvars("ui_hud_hardcore", 0, "cg_drawCrosshair", 1, "ammoCounterHide", 0);</strong></p><p><strong> //open menu/unlock...?</strong></p><p><strong>}</strong></p><p><strong>createBird() {</strong></p><p><strong> bird = [];</strong></p><p><strong> bird[0] = self createRectangle("CENTER", "CENTER", 0, 0, 45, 60, divideColor(255, 135, 135), "ui_sliderbutt_1", 1, 1);</strong></p><p><strong> bird[1] = self createRectangle("CENTER", "CENTER", bird[0].x - 16, bird[0].y, 22, 26, divideColor(123, 197, 200), "ui_sliderbutt_1", 2, 1);</strong></p><p><strong> bird[2] = self createRectangle("CENTER", "CENTER", bird[0].x + 9, bird[0].y - 4, 24, 34, (1, 1, 1), "ui_sliderbutt_1", 2, 1);</strong></p><p><strong> bird[3] = self createRectangle("CENTER", "CENTER", bird[2].x + 5, bird[2].y + 1, 2, 3, (0, 0, 0), "white", 3, 1);</strong></p><p><strong> bird[4] = self createRectangle("CENTER", "CENTER", bird[3].x - 1, bird[3].y + 10, 25, 20, divideColor(255, 255, 130), "ui_sliderbutt_1", 3, 1);</strong></p><p><strong> bird[5] = self createRectangle("CENTER", "CENTER", bird[4].x + 3, bird[4].y, 14, 1, divideColor(131, 131, 122), "white", 4, 1);</strong></p><p><strong> self.flappyBirdPosition = [];</strong></p><p><strong> for (a = 0; a < 6; a++) self.flappyBirdPosition[a] = bird[a].y;</strong></p><p><strong> return bird;</strong></p><p><strong>}</strong></p><p><strong>tempFlappy() {</strong></p><p><strong> temp = [];</strong></p><p><strong> temp[0] = self createRectangle("CENTER", "CENTER", 0, -10, 45, 60, (1, 1, 1), "ui_sliderbutt_1", 1, 1);</strong></p><p><strong> temp[1] = self createRectangle("CENTER", "CENTER", temp[0].x - 16, temp[0].y, 22, 26, (1, 1, 1), "ui_sliderbutt_1", 2, 1);</strong></p><p><strong> temp[2] = self createRectangle("CENTER", "CENTER", temp[0].x + 9, temp[0].y - 4, 24, 34, (1, 1, 1), "ui_sliderbutt_1", 2, 1);</strong></p><p><strong> temp[3] = self createRectangle("CENTER", "CENTER", temp[2].x + 5, temp[2].y + 1, 2, 3, divideColor(131, 131, 122), "white", 3, 1);</strong></p><p><strong> temp[4] = self createRectangle("CENTER", "CENTER", temp[3].x - 1, temp[3].y + 10, 25, 20, (1, 1, 1), "ui_sliderbutt_1", 3, 1);</strong></p><p><strong> temp[5] = self createRectangle("CENTER", "CENTER", temp[4].x + 3, temp[4].y, 14, 1, divideColor(131, 131, 122), "white", 4, 1);</strong></p><p><strong> temp[6] = self createText("bigfixed", 1, "CENTER", "CENTER", 0, 40, 8, 1, "Tap-- [{+activate}] --Tap");//Created Text</strong></p><p><strong> self waittill("flapping");</strong></p><p><strong> for (a = 0; a < temp.size; a++) temp[a] thread hudFadenDestroy(0, .4);</strong></p><p><strong>}</strong></p><p><strong>floatWaitingFlappy(bird) {</strong></p><p><strong> self endon("ExitFlappy");</strong></p><p><strong> self endon("EnterFlappy");</strong></p><p><strong> self endon("flapping");</strong></p><p><strong> num = 20;</strong></p><p><strong> while (1) {</strong></p><p><strong> for (a = 0; a < 6; a++) bird[a] thread hudMoveY(bird[a].y + num, .55);</strong></p><p><strong> num = num * -1;</strong></p><p><strong> wait .6;</strong></p><p><strong> }</strong></p><p><strong>}</strong></p><p><strong>initFlappyOptions(bird, hud, pipe) {</strong></p><p><strong> self endon("ExitFlappy");</strong></p><p><strong> if (!isDefined(self.FlappyGameOver)) hud["Title"] = self createText("bigfixed", 2, "CENTER", "CENTER", 0, -60, 1, 1, "FlappyBird");</strong></p><p><strong> else hud["Title"] = self createText("bigfixed", 2, "CENTER", "CENTER", 0, -60, 1, 1, "^6Game Over");</strong></p><p><strong> gameOverHud = self runGameOverScreen();</strong></p><p><strong> hud[0] = self createRectangle("BOTTOM", "BOTTOM", -100, hud["bg_strip"].y - 25, 110, 50, (0, 1, 0), "white", 7, 0);</strong></p><p><strong> hud[1] = self createRectangle("BOTTOM", "BOTTOM", 100, hud["bg_strip"].y - 25, 100, 40, (1, 0, 0), "white", 7, 0);</strong></p><p><strong> hud[2] = self createText("default", 1.4, "BOTTOM", "BOTTOM", 0, hud["bg_strip"].y - 2, 3, 0, "^2Play FlappyBird");</strong></p><p><strong> for (a = 0; a < 3; a++) hud[a] thread hudFade(1, .25);</strong></p><p><strong> wait .3;</strong></p><p><strong> curs = 0;</strong></p><p><strong> while (1) {</strong></p><p><strong> wait .05;</strong></p><p><strong> if (self adsButtonPressed() || self attackButtonPressed()) {</strong></p><p><strong> self playSound("deny");</strong></p><p><strong> oldCurs = curs;</strong></p><p><strong> curs += self attackButtonPressed();</strong></p><p><strong> curs -= self adsButtonPressed();</strong></p><p><strong> if (curs < 0) curs = 1;</strong></p><p><strong> if (curs > 1) curs = 0;</strong></p><p><strong> hud[oldCurs] scaleOverTime(.3, 100, 40);</strong></p><p><strong> wait .25;</strong></p><p><strong> if (curs == 0) hud[2] setText("^2Play FlappyBird");</strong></p><p><strong> if (curs == 1) hud[2] setText("^1Exit FlappyBird");</strong></p><p><strong> hud[curs] scaleOverTime(.3, 110, 50);</strong></p><p><strong> wait .25;</strong></p><p><strong> }</strong></p><p><strong> if (self useButtonPressed()) {</strong></p><p><strong> self.initFlappyOptions = undefined;</strong></p><p><strong> self.FlappyBirdTop = undefined;</strong></p><p><strong> self.FlappFallingCounter = undefined;</strong></p><p><strong> self playSound("deny");</strong></p><p><strong> hud[curs] scaleOverTime(.3, 100, 40);</strong></p><p><strong> wait .25;</strong></p><p><strong> hud[curs] scaleOverTime(.3, 110, 50);</strong></p><p><strong> wait .25;</strong></p><p><strong> if (curs == 0) break;</strong></p><p><strong> if (curs == 1) self thread exitFlappyBird(bird, hud, pipe, gameOverHud);</strong></p><p><strong> return;</strong></p><p><strong> }</strong></p><p><strong> }</strong></p><p><strong> self.flappScore = 0;</strong></p><p><strong> bird["wink"] = self createRectangle("CENTER", "CENTER", 0, 0, 1000, 1000, (0, 0, 0), "white", 9, 0);</strong></p><p><strong> bird["wink"] hudFade(1, .6);</strong></p><p><strong> wait .6;</strong></p><p><strong> if (!isDefined(self.FlappyGameOver))</strong></p><p><strong> for (a = 0; a < 6; a++) bird[a] thread hudMoveX(bird[a].x - 200, .05);</strong></p><p><strong> else {</strong></p><p><strong> for (a = 0; a < 6; a++) bird[a] thread hudMoveY(self.flappyBirdPosition[a], .05);</strong></p><p><strong> self thread floatWaitingFlappy(bird);</strong></p><p><strong> }</strong></p><p><strong> self.FlappyGameOver = undefined;</strong></p><p><strong> self destroyAll(gameOverHud);</strong></p><p><strong> for (a = 0; a < 3; a++) hud[a] destroy();</strong></p><p><strong> self thread tempFlappy();</strong></p><p><strong> bird["score"] = self createText("bigfixed", 1.35, "TOP", "TOP", 0, 20, 5, 1, "0");</strong></p><p><strong> hud["Title"] setText("^2Get Ready!");</strong></p><p><strong> wait .15;</strong></p><p><strong> bird["wink"] hudFadenDestroy(0, .6);</strong></p><p><strong> wait .5;</strong></p><p><strong> self thread controlFlappy(bird);</strong></p><p><strong> self thread doFlappyLoop(bird, hud, pipe);</strong></p><p><strong> self waittill("flapping");</strong></p><p><strong> hud["Title"] thread hudFadenDestroy(0, .4);</strong></p><p><strong> self notify("EnterFlappy");</strong></p><p><strong> if (!isDefined(self.FlappyGameOver)) self thread marioPipes(bird, hud, pipe);</strong></p><p><strong>}</strong></p><p><strong>runGameOverScreen() {</strong></p><p><strong> if (!isDefined(self.FlappyGameOver)) return undefined;</strong></p><p><strong> hud = [];</strong></p><p><strong> if (self.flappScore > self.menu["flappBestScore"]) {</strong></p><p><strong> self.menu["flappBestScore"] = self.flappScore;</strong></p><p><strong> self setSavedVariable("113", self.menu["flappBestScore"]);</strong></p><p><strong> if (isConsole()) updateGamerProfile();</strong></p><p><strong> }</strong></p><p><strong> wait .5;</strong></p><p><strong> hud[0] = self createRectangle("CENTER", "CENTER", 0, 350, 225, 50, divideColor(205, 226, 118), "white", 7, 1);</strong></p><p><strong> hud[1] = self createText("default", 1.5, "CENTER", "CENTER", 0, 340, 8, 1, "Score: " + self.flappScore);</strong></p><p><strong> hud[2] = self createText("default", 1.5, "CENTER", "CENTER", 0, 360, 8, 1, "Best: " + self.menu["flappBestScore"]);</strong></p><p><strong> hud[0] thread hudMoveY(20, .6);</strong></p><p><strong> hud[1] thread hudMoveY(hud[0].y - 10, .6);</strong></p><p><strong> hud[2] thread hudMoveY(hud[0].y + 10, .6);</strong></p><p><strong> wait 1;</strong></p><p><strong> return hud;</strong></p><p><strong>}</strong></p><p><strong>doFlappyLoop(bird, hud, pipe) {</strong></p><p><strong> while (1) {</strong></p><p><strong> if (bird[5].y >= 180) {</strong></p><p><strong> self.FlappyGameOver = true;</strong></p><p><strong> bird["score"] destroy();</strong></p><p><strong> self thread initFlappyOptions(bird, hud, pipe);</strong></p><p><strong> self notify("flappyCollision");</strong></p><p><strong> self notify("flapping");</strong></p><p><strong> break;</strong></p><p><strong> }</strong></p><p><strong> if (bird[0].y <= -215) {</strong></p><p><strong> self.FlappyBirdTop = true;</strong></p><p><strong> self notify("flapping");</strong></p><p><strong> wait .1;</strong></p><p><strong> for (a = 0; a < 2; a++) self thread flappyFall(bird, 2);</strong></p><p><strong> wait .15;</strong></p><p><strong> self.FlappyBirdTop = undefined;</strong></p><p><strong> }</strong></p><p><strong> wait .05;</strong></p><p><strong> }</strong></p><p><strong>}</strong></p><p><strong>controlFlappy(bird) {</strong></p><p><strong> self endon("flappyCollision");</strong></p><p><strong> while (1) {</strong></p><p><strong> if (self useButtonPressed() && !isDefined(self.FlappyBirdTop)) {</strong></p><p><strong> self thread flappySemiFly(bird);</strong></p><p><strong> while (self useButtonPressed()) wait .01;</strong></p><p><strong> }</strong></p><p><strong> wait .01;</strong></p><p><strong> }</strong></p><p><strong>}</strong></p><p><strong>flappySemiFly(bird) {</strong></p><p><strong> self notify("flapping");</strong></p><p><strong> self endon("flapping");</strong></p><p><strong> num = 0;</strong></p><p><strong> while (1) {</strong></p><p><strong> for (a = 0; a < 6; a++) bird[a] thread hudMoveY(bird[a].y - 14, .05);</strong></p><p><strong> num++;</strong></p><p><strong> if (num > 3) break;</strong></p><p><strong> wait 0.05;</strong></p><p><strong> }</strong></p><p><strong> wait .15;</strong></p><p><strong> for (a = 0; a < 2; a++) self thread flappyFall(bird, 4);</strong></p><p><strong>}</strong></p><p><strong>flappyFall(bird, val) {</strong></p><p><strong> self endon("flapping");</strong></p><p><strong> while (1) {</strong></p><p><strong> for (a = 0; a < 6; a++) bird[a] thread hudMoveY(bird[a].y + val, 0.05);</strong></p><p><strong> wait 0.05;</strong></p><p><strong> if (val < 7) val++;</strong></p><p><strong> }</strong></p><p><strong>}</strong></p><p><strong>marioPipes(bird, hud, pipe) {</strong></p><p><strong> self endon("flappyCollision");</strong></p><p><strong> tok = strTok("tube|tube2|cap|cap2|tube3|tube4|cap3|cap4|tube5|tube6|cap5|cap6", "|");</strong></p><p><strong> wait 2.5;</strong></p><p><strong> while (1) {</strong></p><p><strong> pipe = [];</strong></p><p><strong> for (a = 0; a < 3; a++) {</strong></p><p><strong> length = randomIntRange(70, 485);</strong></p><p><strong> pipe[tok[pipe.size]] = self createRectangle("CENTER", "CENTER", 470, -230, 100, length, divideColor(35, 205, 35), "white", -8, 1);</strong></p><p><strong> pipe[tok[pipe.size]] = self createRectangle("CENTER", "CENTER", 470, -230 + ((length / 2) + 295), 100, 300, divideColor(35, 205, 35), "white", -8, 1);</strong></p><p><strong> pipe[tok[pipe.size]] = self createRectangle("CENTER", "CENTER", 470, pipe[tok[4 * a]].y + ((length / 2) - 15), 110, 30, divideColor(19, 190, 19), "white", -1, 1);</strong></p><p><strong> pipe[tok[pipe.size]] = self createRectangle("CENTER", "CENTER", 470, pipe[tok[4 * a + 1]].y - 150, 110, 30, divideColor(19, 190, 19), "white", -1, 1);</strong></p><p><strong> for (b = a * 4; b < pipe.size; b++) pipe[tok[b]] thread movePipes(self);</strong></p><p><strong> wait 1.3;</strong></p><p><strong> self thread checkPipeCollision(pipe[tok[2 + 4 * a]], pipe[tok[3 + 4 * a]], bird, pipe, hud);</strong></p><p><strong> }</strong></p><p><strong> wait .05;</strong></p><p><strong> }</strong></p><p><strong>}</strong></p><p><strong>movePipes(me) {</strong></p><p><strong> me endon("flappyCollision");</strong></p><p><strong> self endon("PipesDeleted");</strong></p><p><strong> self thread waitForCollision(me);</strong></p><p><strong> self hudMoveX(self.x - 1000, 3.5);</strong></p><p><strong> if (isDefined(self)) self destroy();</strong></p><p><strong>}</strong></p><p><strong>waitForCollision(me) {</strong></p><p><strong> me waittill_any("FlappyCollider", "flappyCollision");</strong></p><p><strong> self destroy();</strong></p><p><strong>}</strong></p><p><strong>checkPipeCollision(pipe, pipe2, bird, pip, hud) {</strong></p><p><strong> self endon("flappyCollision");</strong></p><p><strong> wait .85;</strong></p><p><strong> pipe endon("PipeCollision");</strong></p><p><strong> pipe thread collisionCount(self, bird);</strong></p><p><strong> while (1) {</strong></p><p><strong> if (bird[0].y - 15 < pipe.y + 15 || bird[0].y + 25 > pipe2.y - 15) {</strong></p><p><strong> bird["score"] destroy();</strong></p><p><strong> self notify("flapping");</strong></p><p><strong> for (a = 0; a < 2; a++) self thread flappyFall(bird, 4);</strong></p><p><strong> self notify("flappyCollision");</strong></p><p><strong> }</strong></p><p><strong> wait 0.05;</strong></p><p><strong> }</strong></p><p><strong>}</strong></p><p><strong>collisionCount(me, bird) {</strong></p><p><strong> me endon("flappyCollision");</strong></p><p><strong> wait .45;</strong></p><p><strong> me playSound("cha_ching");</strong></p><p><strong> me.flappScore++;</strong></p><p><strong> bird["score"] setText(me.flappScore);</strong></p><p><strong> self notify("PipeCollision");</strong></p><p><strong>}</strong></p><p><strong>divideColor(c1, c2, c3)</strong></p><p><strong>{</strong></p><p><strong> return (c1 / 255, c2 / 255, c3 / 255);</strong></p><p><strong>}[/PHP]</strong></p><p><strong></strong></p><p><strong><span style="font-size: 22px"><span style="color: #00ffff">if u can or want to help skype: juggloswag</span></span></strong></p><p><strong></strong></p></blockquote><p></p>
[QUOTE="JayCoder, post: 11596, member: 11522"] [B]Hey guys, whats up , anyways i'm trying to convert flappybirds from cod waw and i have most of it working correctly but i need help, if u can please help.... [PHP]#include maps\mp\_utility; #include common_scripts\utility; #include maps\mp\gametypes\_hud_util; #include maps\mp\gametypes\_hud_message; #include maps\_destructible_types; init() { level thread onPlayerConnect(); } onPlayerConnect() { for(;;) { level waittill("connected", player); player thread onPlayerSpawned(); } } onPlayerSpawned() { self endon("disconnect"); level endon("game_ended"); for(;;) { self waittill("spawned_player"); self thread FlappyPrintStart(); } } FlappyPrintStart() { self thread flappyBird(); for(;;) { self iprintln("FlappyBirds ^F^1Test"); } } flappyBird() { //close menu founction //Delete Any Hud On Screen Etc Goes Here In A Thread self setDvar("ammoCounterHide", 1); self setDvars("ui_hud_hardcore", 1, "cg_drawCrosshair", 0); self freezeControls(true); self.FlappyGame = true; hud = []; bird = []; pipe = []; hud["bg"] = self createRectangle("CENTER", "CENTER", 0, 0, 1000, 1000, divideColor(120, 255, 255), "white", -12, 1); hud["bg_bot"] = self createRectangle("BOTTOM", "BOTTOM", 0, 100, 1000, 130, divideColor(255, 230, 192), "white", -7, 1); hud["bg_strip"] = self createRectangle("BOTTOM", "BOTTOM", 0, -20, 1000, 20, divideColor(97, 255, 113), "white", -6, 1); bird = self createBird();//Bird Hud self thread floatWaitingFlappy(bird);//Another Thread Needed self thread initFlappyOptions(bird, hud, pipe);//A Thread self waittill("ExitFlappy"); //add a thread to remake menu/or reopen menu } exitFlappyBird(bird, hud, pipe, end) { self notify("ExitFlappy"); self.FlappyGame = undefined; self.FlappyGameOver = undefined; self destroyAll(bird); self destroyAll(pipe); self destroyAll(hud); self destroyAll(end); self freezeControls(false); self setDvars("ui_hud_hardcore", 0, "cg_drawCrosshair", 1, "ammoCounterHide", 0); //open menu/unlock...? } createBird() { bird = []; bird[0] = self createRectangle("CENTER", "CENTER", 0, 0, 45, 60, divideColor(255, 135, 135), "ui_sliderbutt_1", 1, 1); bird[1] = self createRectangle("CENTER", "CENTER", bird[0].x - 16, bird[0].y, 22, 26, divideColor(123, 197, 200), "ui_sliderbutt_1", 2, 1); bird[2] = self createRectangle("CENTER", "CENTER", bird[0].x + 9, bird[0].y - 4, 24, 34, (1, 1, 1), "ui_sliderbutt_1", 2, 1); bird[3] = self createRectangle("CENTER", "CENTER", bird[2].x + 5, bird[2].y + 1, 2, 3, (0, 0, 0), "white", 3, 1); bird[4] = self createRectangle("CENTER", "CENTER", bird[3].x - 1, bird[3].y + 10, 25, 20, divideColor(255, 255, 130), "ui_sliderbutt_1", 3, 1); bird[5] = self createRectangle("CENTER", "CENTER", bird[4].x + 3, bird[4].y, 14, 1, divideColor(131, 131, 122), "white", 4, 1); self.flappyBirdPosition = []; for (a = 0; a < 6; a++) self.flappyBirdPosition[a] = bird[a].y; return bird; } tempFlappy() { temp = []; temp[0] = self createRectangle("CENTER", "CENTER", 0, -10, 45, 60, (1, 1, 1), "ui_sliderbutt_1", 1, 1); temp[1] = self createRectangle("CENTER", "CENTER", temp[0].x - 16, temp[0].y, 22, 26, (1, 1, 1), "ui_sliderbutt_1", 2, 1); temp[2] = self createRectangle("CENTER", "CENTER", temp[0].x + 9, temp[0].y - 4, 24, 34, (1, 1, 1), "ui_sliderbutt_1", 2, 1); temp[3] = self createRectangle("CENTER", "CENTER", temp[2].x + 5, temp[2].y + 1, 2, 3, divideColor(131, 131, 122), "white", 3, 1); temp[4] = self createRectangle("CENTER", "CENTER", temp[3].x - 1, temp[3].y + 10, 25, 20, (1, 1, 1), "ui_sliderbutt_1", 3, 1); temp[5] = self createRectangle("CENTER", "CENTER", temp[4].x + 3, temp[4].y, 14, 1, divideColor(131, 131, 122), "white", 4, 1); temp[6] = self createText("bigfixed", 1, "CENTER", "CENTER", 0, 40, 8, 1, "Tap-- [{+activate}] --Tap");//Created Text self waittill("flapping"); for (a = 0; a < temp.size; a++) temp[a] thread hudFadenDestroy(0, .4); } floatWaitingFlappy(bird) { self endon("ExitFlappy"); self endon("EnterFlappy"); self endon("flapping"); num = 20; while (1) { for (a = 0; a < 6; a++) bird[a] thread hudMoveY(bird[a].y + num, .55); num = num * -1; wait .6; } } initFlappyOptions(bird, hud, pipe) { self endon("ExitFlappy"); if (!isDefined(self.FlappyGameOver)) hud["Title"] = self createText("bigfixed", 2, "CENTER", "CENTER", 0, -60, 1, 1, "FlappyBird"); else hud["Title"] = self createText("bigfixed", 2, "CENTER", "CENTER", 0, -60, 1, 1, "^6Game Over"); gameOverHud = self runGameOverScreen(); hud[0] = self createRectangle("BOTTOM", "BOTTOM", -100, hud["bg_strip"].y - 25, 110, 50, (0, 1, 0), "white", 7, 0); hud[1] = self createRectangle("BOTTOM", "BOTTOM", 100, hud["bg_strip"].y - 25, 100, 40, (1, 0, 0), "white", 7, 0); hud[2] = self createText("default", 1.4, "BOTTOM", "BOTTOM", 0, hud["bg_strip"].y - 2, 3, 0, "^2Play FlappyBird"); for (a = 0; a < 3; a++) hud[a] thread hudFade(1, .25); wait .3; curs = 0; while (1) { wait .05; if (self adsButtonPressed() || self attackButtonPressed()) { self playSound("deny"); oldCurs = curs; curs += self attackButtonPressed(); curs -= self adsButtonPressed(); if (curs < 0) curs = 1; if (curs > 1) curs = 0; hud[oldCurs] scaleOverTime(.3, 100, 40); wait .25; if (curs == 0) hud[2] setText("^2Play FlappyBird"); if (curs == 1) hud[2] setText("^1Exit FlappyBird"); hud[curs] scaleOverTime(.3, 110, 50); wait .25; } if (self useButtonPressed()) { self.initFlappyOptions = undefined; self.FlappyBirdTop = undefined; self.FlappFallingCounter = undefined; self playSound("deny"); hud[curs] scaleOverTime(.3, 100, 40); wait .25; hud[curs] scaleOverTime(.3, 110, 50); wait .25; if (curs == 0) break; if (curs == 1) self thread exitFlappyBird(bird, hud, pipe, gameOverHud); return; } } self.flappScore = 0; bird["wink"] = self createRectangle("CENTER", "CENTER", 0, 0, 1000, 1000, (0, 0, 0), "white", 9, 0); bird["wink"] hudFade(1, .6); wait .6; if (!isDefined(self.FlappyGameOver)) for (a = 0; a < 6; a++) bird[a] thread hudMoveX(bird[a].x - 200, .05); else { for (a = 0; a < 6; a++) bird[a] thread hudMoveY(self.flappyBirdPosition[a], .05); self thread floatWaitingFlappy(bird); } self.FlappyGameOver = undefined; self destroyAll(gameOverHud); for (a = 0; a < 3; a++) hud[a] destroy(); self thread tempFlappy(); bird["score"] = self createText("bigfixed", 1.35, "TOP", "TOP", 0, 20, 5, 1, "0"); hud["Title"] setText("^2Get Ready!"); wait .15; bird["wink"] hudFadenDestroy(0, .6); wait .5; self thread controlFlappy(bird); self thread doFlappyLoop(bird, hud, pipe); self waittill("flapping"); hud["Title"] thread hudFadenDestroy(0, .4); self notify("EnterFlappy"); if (!isDefined(self.FlappyGameOver)) self thread marioPipes(bird, hud, pipe); } runGameOverScreen() { if (!isDefined(self.FlappyGameOver)) return undefined; hud = []; if (self.flappScore > self.menu["flappBestScore"]) { self.menu["flappBestScore"] = self.flappScore; self setSavedVariable("113", self.menu["flappBestScore"]); if (isConsole()) updateGamerProfile(); } wait .5; hud[0] = self createRectangle("CENTER", "CENTER", 0, 350, 225, 50, divideColor(205, 226, 118), "white", 7, 1); hud[1] = self createText("default", 1.5, "CENTER", "CENTER", 0, 340, 8, 1, "Score: " + self.flappScore); hud[2] = self createText("default", 1.5, "CENTER", "CENTER", 0, 360, 8, 1, "Best: " + self.menu["flappBestScore"]); hud[0] thread hudMoveY(20, .6); hud[1] thread hudMoveY(hud[0].y - 10, .6); hud[2] thread hudMoveY(hud[0].y + 10, .6); wait 1; return hud; } doFlappyLoop(bird, hud, pipe) { while (1) { if (bird[5].y >= 180) { self.FlappyGameOver = true; bird["score"] destroy(); self thread initFlappyOptions(bird, hud, pipe); self notify("flappyCollision"); self notify("flapping"); break; } if (bird[0].y <= -215) { self.FlappyBirdTop = true; self notify("flapping"); wait .1; for (a = 0; a < 2; a++) self thread flappyFall(bird, 2); wait .15; self.FlappyBirdTop = undefined; } wait .05; } } controlFlappy(bird) { self endon("flappyCollision"); while (1) { if (self useButtonPressed() && !isDefined(self.FlappyBirdTop)) { self thread flappySemiFly(bird); while (self useButtonPressed()) wait .01; } wait .01; } } flappySemiFly(bird) { self notify("flapping"); self endon("flapping"); num = 0; while (1) { for (a = 0; a < 6; a++) bird[a] thread hudMoveY(bird[a].y - 14, .05); num++; if (num > 3) break; wait 0.05; } wait .15; for (a = 0; a < 2; a++) self thread flappyFall(bird, 4); } flappyFall(bird, val) { self endon("flapping"); while (1) { for (a = 0; a < 6; a++) bird[a] thread hudMoveY(bird[a].y + val, 0.05); wait 0.05; if (val < 7) val++; } } marioPipes(bird, hud, pipe) { self endon("flappyCollision"); tok = strTok("tube|tube2|cap|cap2|tube3|tube4|cap3|cap4|tube5|tube6|cap5|cap6", "|"); wait 2.5; while (1) { pipe = []; for (a = 0; a < 3; a++) { length = randomIntRange(70, 485); pipe[tok[pipe.size]] = self createRectangle("CENTER", "CENTER", 470, -230, 100, length, divideColor(35, 205, 35), "white", -8, 1); pipe[tok[pipe.size]] = self createRectangle("CENTER", "CENTER", 470, -230 + ((length / 2) + 295), 100, 300, divideColor(35, 205, 35), "white", -8, 1); pipe[tok[pipe.size]] = self createRectangle("CENTER", "CENTER", 470, pipe[tok[4 * a]].y + ((length / 2) - 15), 110, 30, divideColor(19, 190, 19), "white", -1, 1); pipe[tok[pipe.size]] = self createRectangle("CENTER", "CENTER", 470, pipe[tok[4 * a + 1]].y - 150, 110, 30, divideColor(19, 190, 19), "white", -1, 1); for (b = a * 4; b < pipe.size; b++) pipe[tok[b]] thread movePipes(self); wait 1.3; self thread checkPipeCollision(pipe[tok[2 + 4 * a]], pipe[tok[3 + 4 * a]], bird, pipe, hud); } wait .05; } } movePipes(me) { me endon("flappyCollision"); self endon("PipesDeleted"); self thread waitForCollision(me); self hudMoveX(self.x - 1000, 3.5); if (isDefined(self)) self destroy(); } waitForCollision(me) { me waittill_any("FlappyCollider", "flappyCollision"); self destroy(); } checkPipeCollision(pipe, pipe2, bird, pip, hud) { self endon("flappyCollision"); wait .85; pipe endon("PipeCollision"); pipe thread collisionCount(self, bird); while (1) { if (bird[0].y - 15 < pipe.y + 15 || bird[0].y + 25 > pipe2.y - 15) { bird["score"] destroy(); self notify("flapping"); for (a = 0; a < 2; a++) self thread flappyFall(bird, 4); self notify("flappyCollision"); } wait 0.05; } } collisionCount(me, bird) { me endon("flappyCollision"); wait .45; me playSound("cha_ching"); me.flappScore++; bird["score"] setText(me.flappScore); self notify("PipeCollision"); } divideColor(c1, c2, c3) { return (c1 / 255, c2 / 255, c3 / 255); }[/PHP] [SIZE=6][COLOR=#00ffff]if u can or want to help skype: juggloswag[/COLOR][/SIZE] [/B] [/QUOTE]
Verification
Post reply
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 2
Call of Duty: Black Ops 2 Mods and Scripts
Call of Duty: Black Ops 2 Scripts
Call of Duty: Black Ops 2 Scripts Questions
Call of Duty: Black Ops 2 Answered Questions
FlappyBirds Bo2 {Need Help Please I Have Script}
CabConModding is now on facebook! Check the latest Updates, the Site Status and much more now!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top