Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableShamanSkills(true)
- tfm.exec.disableMortCommand(true)
- wonCountDown=1
- scores={0,0,0,0,0,0,0,0}
- maps={7455943}
- powery=320
- powerx=math.random(1600)
- mice=0
- ui.addTextArea(10, "", nil, -432, -822, 3625, 953, 0xff0000, 0x00a2ff, 0.6, true)
- Down=string.byte("S")
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAutoScore(true)
- data={}
- text={}
- lang={}
- lang.en={commands="Powerups\n\n<font size='11'>Click - Spawns a random shaman object when you have the role of being a <J>Death</J>.\n\nSpacebar - Makes a large jump followed with an invisible cannon when you have the role of being a <J>Runner</J>. \n\nDown Arrow / S key - Gives you a boost of speed. (Works for both Deaths and Runners)",commands2="Powerups",credits="Credits</font></font><font face='verdana'><font size='11'>\n\n<N>Programming - Fuzzyfirsdog#0000\n\nModule Idea - Reddeathnick#3204\n\nPowerup Suggestions - Reddeathnick#3204, Seaqueen2003#000, Mugiwaraloffy#9866\n\n<VP>Thank you ^^",credits2="Credits",youCanAttack="<R>Death: <N>You can attack",youCanNotAttack="<R>Death: <N>You can not attack",youCanUsePowerups="<VP>Runner: <N>You can use powerups",youCanNotUsePowerups="<VP>Runner: <N>You can not use powerups",attacked="ATTACKED",youAreARunner="You are a runner",youAreADeath="You are a death",help="In #deathrun there are <J>Deaths</J> and <J>Runners</J>. Deaths should try to kill the mice by clicking to spawn objects, if no runners get into the hole then deaths win! Runners are supposed to use the powerups they are given to get into the hole and escape Deaths. If one runner gets into the hole, runners win.",close="Close",help2="Help",superJump="SUPER JUMP",speed="SPEED",deathsWin="Deaths win!",runnersWin="Runners win!"}
- roles={"Death","Runner"}
- death=0
- runner=0
- miceInHole=0
- function setLang(n)
- for n,player in pairs(tfm.get.room.playerList) do
- text[n]=lang[tfm.get.room.playerList[n].community] or lang.en
- end
- end
- function bindMouse()
- for n,player in pairs(tfm.get.room.playerList) do
- tfm.exec.bindKeyboard(n, 32, true, true)
- system.bindMouse(n, true)
- tfm.exec.bindKeyboard(n, 40, true, true)
- tfm.exec.bindKeyboard(n, Down, true, true)
- end
- end
- bindMouse()
- tfm.exec.newGame(maps[math.random(#maps)])
- names={}
- theRole=1
- currentRole=roles[math.floor(theRole)]
- function changeCurrentRole()
- end
- numbs={1,2}
- function showTabs(n)
- ui.addTextArea(15, "<VP><a href='event:help'><font size='12'>"..text[n].help2.."</a> | <a href='event:credits'>"..text[n].credits2.." </a>|<a href='event:commands'> "..text[n].commands2, n, 10, 30, 264, 26, 0x00aaff, 0x00eeff, 0, true)
- end
- for n,player in pairs(tfm.get.room.playerList) do
- changeCurrentRole()
- mice=mice+1
- table.insert(names,n)
- setLang(n)
- data[n]={name=n,role="Runner",points=0,spawnLimit=-1,ableToShoot=0,ableToShoot2=0}
- showTabs(n)
- end
- data[names[math.floor(math.random(mice))]].role="Death"
- function findRoles(n)
- for n,player in pairs(tfm.get.room.playerList) do
- if data[n].role=="Death" then
- tfm.exec.movePlayer(n,150,30,false,0,0,false)
- tfm.exec.setShaman(n)
- elseif data[n].role=="Runner" then
- tfm.exec.movePlayer(n,70,300,false,0,0,false)
- end
- end
- end
- n1=scores[math.floor(1)]
- n2=scores[math.floor(2)]
- n3=scores[math.floor(3)]
- print(n1)
- print(n2)
- print(n3)
- function eventNewPlayer(n)
- bindMouse()
- ui.addTextArea(10, "", n, -432, -822, 3625, 953, 0xff0000, 0x00a2ff, 0.6, true)
- mice=mice+1
- data[n]={name=n,role="Runner",points=0,spawnLimit=-1,ableToShoot=0,ableToShoot2=0}
- setLang(n)
- showTabs(n)
- table.insert(names,n)
- findRoles(n)
- tfm.exec.respawnPlayer(n)
- end
- function addToRoleNumber()
- for n,player in pairs(tfm.get.room.playerList) do
- if data[n].role=="Death" then
- death=death+1
- end
- if data[n].role=="Runner" then
- runner=runner+1
- end
- findRoles(n)
- end
- end
- tfm.exec.newGame(maps[math.random(#maps)])
- function eventNewGame()
- time=0
- theRole=1
- powerx=math.random(1600)
- runner=0
- death=0
- mice=0
- for n,player in pairs(tfm.get.room.playerList) do
- mice=mice+1
- changeCurrentRole()
- data[n].role="Runner"
- data[n].ableToShoot=0
- data[n].ableToShoot2=0
- data[n].spawnLimit=-1
- end
- mice=mice
- data[names[math.floor(math.random(mice))]].role="Death"
- findRoles(n)
- findRoles(n)
- addToRoleNumber()
- end
- locationx=0
- locationy=0
- objects={39,23,45,34,10}
- function eventMouse(n,x,y)
- system.bindMouse(n,false)
- if data[n].role=="Death" then
- data[n].spawnLimit=2
- ui.addTextArea(2, "<font color='#FF9000'><font size='30'><b>"..n.." "..text[n].attacked, nil, x, y, 425, 100, 0x324650, 0x000000, 0, false)
- locationx=x
- locationy=y
- tfm.exec.addShamanObject(objects[math.random(#objects)],locationx,locationy,0,0,20,false)
- tfm.exec.displayParticle(0,locationx,locationy,0.5,0.5,0.5,0.5,nil)
- tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
- tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
- tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
- tfm.exec.displayParticle(0,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
- tfm.exec.displayParticle(0,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
- tfm.exec.displayParticle(2,locationx,locationy,1,-3,1,-3,nil)
- tfm.exec.displayParticle(2,locationx,locationy,1,1,3,1,nil)
- tfm.exec.displayParticle(2,locationx,locationy,-1,3,-1,3,nil)
- tfm.exec.displayParticle(2,locationx,locationy,-1,-1,-3,-1,nil)
- tfm.exec.displayParticle(5,locationx,locationy,0.5,0.5,0.5,0.5,nil)
- tfm.exec.displayParticle(5,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
- tfm.exec.displayParticle(5,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
- tfm.exec.displayParticle(5,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
- end
- end
- time=0
- number1=0
- number2=0
- number3=0
- function eventPlayerGetCheese(n)
- if data[n].role=="Runner" then
- time=118
- data[n].points=data[n].points+3
- for n,player in pairs(tfm.get.room.playerList) do
- ui.addTextArea(133, "<font size='20'><font color='#0ff164'>"..text[n].runnersWin, n, 296, 282, 251, 89, 0xd41717, 0x000000, 0, true)
- tfm.exec.chatMessage(text[n].runnersWin,n)
- if data[n].role=="Runner" then
- data[n].points=data[n].points+2
- wonCountDown=-5
- end
- end
- end
- function eventPlayerWon(n,time)
- for n,player in pairs(tfm.get.room.playerList) do
- ui.addTextArea(133, "<font size='20'><font color='#d40000'>"..text[n].deathsWin, n, 296, 282, 251, 89, 0xd41717, 0x000000, 0, true)
- tfm.exec.chatMessage(text[n].deathsWin,n)
- end
- if data[n].role=="Death" then
- for n,player in pairs(tfm.get.room.playerList) do
- wonCountDown=-5
- end
- end
- tfm.exec.newGame(maps[math.random(#maps)])
- print("Runners win!")
- end
- end
- function explosions()
- tfm.exec.displayParticle(0,locationx,locationy,0.5,0.5,0.5,0.5,nil)
- tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
- tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
- tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
- tfm.exec.displayParticle(0,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
- tfm.exec.displayParticle(0,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
- tfm.exec.displayParticle(2,locationx,locationy,1,-3,1,-3,nil)
- tfm.exec.displayParticle(2,locationx,locationy,1,1,3,1,nil)
- tfm.exec.displayParticle(2,locationx,locationy,-1,3,-1,3,nil)
- tfm.exec.displayParticle(2,locationx,locationy,-1,-1,-3,-1,nil)
- tfm.exec.displayParticle(5,locationx,locationy,0.5,0.5,0.5,0.5,nil)
- tfm.exec.displayParticle(5,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
- tfm.exec.displayParticle(5,locationx,locationy,-0.5,0.5,-0.5,0.5,nil)
- tfm.exec.displayParticle(5,locationx,locationy,0.5,-0.5,0.5,-0.5,nil)
- tfm.exec.explosion(locationx, locationy, 40, 40, false)
- end
- function canShoot()
- for n,player in pairs(tfm.get.room.playerList) do
- if data[n].spawnLimit<1 and data[n].role=="Death" then
- ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanAttack, n, 270, 23, 240, 36, 0x00a611, 0x338500, 0.6, true)
- end
- if not (data[n].spawnLimit<1) and data[n].role=="Death" then
- ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanNotAttack, n, 270, 23, 240, 36, 0x802c2c, 0x6e0000, 0.6, true)
- end
- if data[n].spawnLimit<1 and data[n].role=="Runner" then
- ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanUsePowerups, n, 270, 23, 240, 36, 0x00a611, 0x338500, 0.6, true)
- end
- if not (data[n].spawnLimit<1) and data[n].role=="Runner" then
- ui.addTextArea(12, "\n<p align='center'>"..text[n].youCanNotUsePowerups, n, 270, 23, 240, 36, 0x802c2c, 0x6e0000, 0.6, true)
- end
- end
- end
- function eventLoop()
- wonCoundown=wonCountDown+0.5
- ui.addTextArea(13, "<font size='20'>"..math.floor(time).." / 120s", nil, 316, 73, 251, 32, 0x324650, 0x000000, 0, true)
- canShoot()
- for n,player in pairs(tfm.get.room.playerList) do
- data[n].spawnLimit=data[n].spawnLimit-0.5
- if data[n].spawnLimit==-0.5 then
- ui.removeTextArea(2,nil)
- system.bindMouse(n, true)
- ui.removeTextArea(11,n)
- end
- end
- time=time+.5
- if time==120 then
- tfm.exec.newGame(maps[math.random(#maps)])
- print("Deaths win!")
- time=-0.5
- elseif time==0 then
- for n,player in pairs(tfm.get.room.playerList) do
- findRoles(n)
- end
- elseif time==5 then
- for n,player in pairs(tfm.get.room.playerList) do
- ui.removeTextArea(0,nil)
- ui.removeTextArea(2,nil)
- system.bindMouse(n, true)
- ui.removeTextArea(133,n)
- end
- end
- end
- function eventKeyboard(n, key, down, x,y)
- if key==32 and data[n].role=="Runner" and data[n].spawnLimit<0 then
- ui.addTextArea(11, "<b><font size='30'><font color='#F0F000'>"..text[n].superJump, n, x-50, y-50, 379, 67, 0x324650, 0x000000, 0, false)
- tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
- tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
- tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
- tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
- tfm.exec.displayParticle(0,x,y,-0.5,0.5,-0.5,0.5,nil)
- tfm.exec.displayParticle(0,x,y,0.5,-0.5,0.5,-0.5,nil)
- tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
- tfm.exec.displayParticle(2,x,y,1,1,3,1,nil)
- tfm.exec.displayParticle(2,x,y,-1,3,-1,3,nil)
- tfm.exec.displayParticle(2,x,y,-1,-1,-3,-1,nil)
- tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
- tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
- tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
- tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
- tfm.exec.movePlayer(n,x,y,false,0,-80,false)
- data[n].spawnLimit=3
- tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
- tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
- tfm.exec.displayParticle(10,locationx,locationy,3,-3,3,-3,nil)
- tfm.exec.displayParticle(10,locationx,locationy,-3,3,-3,3,nil)
- tfm.exec.displayParticle(10,x,y,-0.5,0.5,-0.5,0.5,nil)
- tfm.exec.displayParticle(10,x,y,0.5,-0.5,0.5,-0.5,nil)
- tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
- tfm.exec.displayParticle(10,x,y,1,1,3,1,nil)
- tfm.exec.displayParticle(12,x,y,-1,3,-1,3,nil)
- tfm.exec.displayParticle(12,x,y,-1,-1,-3,-1,nil)
- tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
- tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
- tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
- tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
- tfm.exec.bindKeyboard(n, 32, false, false)
- tfm.exec.addShamanObject(17,x,y,60,50,-10,true)
- data[n].spawnLimit=3.5
- data[n].ableToShoot=0
- elseif (key==40 or key==Down) and data[n].spawnLimit<0 then
- ui.addTextArea(11, "<b><font size='30'><font color='#F0F000'>"..text[n].speed, n, x-50, y-50, 379, 67, 0x324650, 0x000000, 0, false)
- tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
- tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
- tfm.exec.displayParticle(2,locationx,locationy,3,-3,3,-3,nil)
- tfm.exec.displayParticle(2,locationx,locationy,-3,3,-3,3,nil)
- tfm.exec.displayParticle(0,x,y,-0.5,0.5,-0.5,0.5,nil)
- tfm.exec.displayParticle(0,x,y,0.5,-0.5,0.5,-0.5,nil)
- tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
- tfm.exec.displayParticle(2,x,y,1,1,3,1,nil)
- tfm.exec.displayParticle(2,x,y,-1,3,-1,3,nil)
- tfm.exec.displayParticle(2,x,y,-1,-1,-3,-1,nil)
- tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
- tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
- tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
- tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
- tfm.exec.movePlayer(n,x,y,false,76,0,false)
- data[n].spawnLimit=3
- tfm.exec.displayParticle(0,x,y,0.5,0.5,0.5,0.5,nil)
- tfm.exec.displayParticle(0,locationx,locationy,-0.5,-0.5,-0.5,-0.5,nil)
- tfm.exec.displayParticle(10,locationx,locationy,3,-3,3,-3,nil)
- tfm.exec.displayParticle(10,locationx,locationy,-3,3,-3,3,nil)
- tfm.exec.displayParticle(10,x,y,-0.5,0.5,-0.5,0.5,nil)
- tfm.exec.displayParticle(10,x,y,0.5,-0.5,0.5,-0.5,nil)
- tfm.exec.displayParticle(2,x,y,1,-3,1,-3,nil)
- tfm.exec.displayParticle(10,x,y,1,1,3,1,nil)
- tfm.exec.displayParticle(12,x,y,-1,3,-1,3,nil)
- tfm.exec.displayParticle(12,x,y,-1,-1,-3,-1,nil)
- tfm.exec.displayParticle(5,x,y,0.5,0.5,0.5,0.5,nil)
- tfm.exec.displayParticle(5,x,y,-0.5,-0.5,-0.5,-0.5,nil)
- tfm.exec.displayParticle(5,x,y,-0.5,0.5,-0.5,0.5,nil)
- tfm.exec.displayParticle(5,x,y,0.5,-0.5,0.5,-0.5,nil)
- data[n].spawnLimit=3.5
- data[n].ableToShoot=0
- end
- end
- function eventTextAreaCallback(id,n,a)
- if a=="close" then
- ui.removeTextArea(18,n)
- ui.removeTextArea(19,n)
- ui.removeTextArea(110,n)
- ui.removeTextArea(25,n)
- elseif a=="help" then
- ui.addTextArea(110, "", n, 498, 165, 266, 217, 0x324650, 0x000000, 1, true)
- ui.addTextArea(18, "<font size='15'><font face='calibri'>"..text[n].help, n, 504, 172, 254, 179, 0x000000, 0x000000, 1, true)
- ui.addTextArea(19, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close, n, 504, 338, 254, 36, 0x000000, 0xffffff, 1, true)
- elseif a=="credits" then
- ui.addTextArea(18, "<p align='center'><font size='16'><font face='verdana'><J>"..text[n].credits, n, 504, 142, 254, 194, 0x4f4132, 0x695743, 1, true)
- ui.addTextArea(19, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close, n, 504, 338, 254, 36, 0x4f4132, 0x30291a, 1, true)
- elseif a=="commands" then
- ui.addTextArea(18, "<p align='center'><font size='14'><font face='verdana'>"..text[n].commands, n, 545, 111, 220, 238, 0x50498c, 0x05014f, 1, true)
- ui.addTextArea(19, "<p align='center'><font size='13'><a href='event:close'>Close", n, 545, 346, 220, 36, 0x284391, 0x0f0759, 1, true)
- end
- end
- function eventPlayerDied(n)
- if data[n].role=="Runner" then
- runner=runner-1
- print(runner)
- end
- if runner<1 then
- tfm.exec.newGame(maps[math.random(#maps)])
- for n,player in pairs(tfm.get.room.playerList) do
- ui.addTextArea(133, "<font size='20'><font color='#d40000'>"..text[n].deathsWin, n, 296, 282, 251, 89, 0xd41717, 0x000000, 0, true)
- tfm.exec.chatMessage(text[n].deathsWin,n)
- end
- wonCountDown=-5
- print("hi")
- end
- if death<1 then
- tfm.exec.newGame(maps[math.random(#maps)])
- tfm.exec.disableAutoShaman(true)
- time=0
- for n,player in pairs(tfm.get.room.playerList) do
- wonCountdown=-5
- changeCurrentRole()
- data[n].role="Runner"
- end
- data[names[math.floor(math.random(mice))]].role="Death"
- end
- end
- print(death)
- print(runner)
- print(mice)
- function eventPlayerLeft(n)
- mice=mice-1
- if data[n].role=="Runner" then
- runner=runner-1
- elseif data[n].role=="Death" then
- death=death-1
- end
- end
- function eventSummoningEnd(playerName, objectType, xPosition, yPosition, angle, xSpeed, ySpeed, other)
- print("hi")
- tfm.exec.removeObject(other)
- end
Advertisement
Add Comment
Please, Sign In to add comment