Advertisement
Hachem16

Stay In The Box - Transformice Minigame Compressed.

Mar 24th, 2014
1,238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.63 KB | None | 0 0
  1. map=[[<C><P /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" L="600" o="324650" X="400" Y="380" T="12" H="40" /></S><D><DS Y="355" X="400" /></D><O /></Z></C>]]BAN=[[<font size="30" face="Soopafresh" color="#FF2222">Stay in the box!</font>]]CC=0;tfm.exec.disableAutoShaman(true)tfm.exec.disableAutoNewGame(true)tfm.exec.disableAutoTimeLeft(true)MA=false;wg=150;lg=150;x=350;y=200;Rect={type=12,width=wg,height=lg,foreground=false,friction=0.3,resistance,0.4,angle=0,color=CC,miceCollision=false,groundCollision=false,dynamic=false,mass=620,linearDamping=0,angularDamping=0}function move()if wg<=40 or lg<=40 then return end;wg=wg-1;lg=lg-1;Rect["width"]=wg;Rect["height"]=lg;y=y+1 end;function check()local a=0;local b;for c,d in pairs(tfm.get.room.playerList)do if not d.isDead then a=a+1;b=c end end;if a==1 then tfm.exec.giveCheese(b)tfm.exec.playerVictory(b)main()elseif a==0 then main()end end;function eventNewPlayer(b)end;for c,d in pairs(tfm.get.room.playerList)do eventNewPlayer(c)end;function main()CC=CC+10;wg=100;lg=100;x=350+100-wg;y=265+100-lg;tfm.exec.newGame(map)Rect["color"]=CC;Rect["width"]=wg;Rect["height"]=lg;tfm.exec.addPhysicObject(0,x+wg/2,y+lg/2,Rect)MA=true;bool=true;ui.addTextArea(5,BAN,nil,100,50,nil,nil,nil,nil,0,true)end;function kill()for c,e in pairs(tfm.get.room.playerList)do if e.x>x+wg or e.x<x or e.y>y+lg or e.y<y then tfm.exec.killPlayer(c)end end end;function eventLoop(f,g)if f>5000 then if MA==true then if x<700-wg and bool==true then move()x=x+5;tfm.exec.addPhysicObject(0,x+wg/2,y+wg/2,Rect)else bool=false;if x>100+wg then move()x=x-5;tfm.exec.addPhysicObject(0,x+wg/2,y+lg/2,Rect)else bool=true end end;kill()end;check()end end;main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement