Advertisement
tusKOr661

Micro Nil

Dec 4th, 2013
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.83 KB | None | 0 0
  1. wait'';
  2.         script.Parent=nil;
  3.         --[[
  4.             Micro Nil Open Source
  5.         ]]
  6.         local session_id=math.floor(math.ceil(math.random(1,5002)%255*2.5)+125.6773)*75;
  7.         session={
  8.             ['commands']={  };
  9.             ['body']={
  10.                 ['colors']={};
  11.                 ['other']={};
  12.             };
  13.             ['User']=game:service'Players'.localPlayer;
  14.             ['services']=function(index)return game:service(index:sub(1,1):upper()..index:sub(2))end;
  15.             ['functions']={   };
  16.         };
  17.         session.commands={
  18.             ['Character']={'Spawns <Character>','/char',function()
  19.                 session.functions.spawn'';
  20.             end};
  21.             ['Source']={'Views the script\'s source','/source',function()
  22.                 local it=Instance.new'Message';
  23.                 it.Parent=session.services'workspace';
  24.                 local source=[[http://pastebin.com/LiY1n9wC]];
  25.                 for i=1,#source do
  26.                     it.Text=source:sub(1,i)..(function()rtn='';for derp=1,#source-i do rtn=rtn..string.char(math.random(47,67))end;return rtn; end)();
  27.                     wait(0.06);
  28.                 end;
  29.                 wait(2);
  30.                 it:remove'';
  31.             end};
  32.         };
  33.         session.functions={
  34.             spawn=function()
  35.                 local char=session.services'insertService':loadAsset(68452456):children''[1];
  36.                 char.Torso.CFrame=CFrame.new(0,50,0);
  37.                 pcall(function()session.User.Character:remove''end);
  38.                 for _,v in pairs(session.body.colors)do
  39.                     pcall(function()char[_].Color=v;end);
  40.                 end;
  41.                 for _,h in pairs(session.body.other)do
  42.                     pcall(function()h:clone''.Parent=char;end);
  43.                 end;
  44.                 char.Parent=workspace;
  45.                 char.Name=session.User.Name;
  46.                 char:makeJoints'';
  47.                 session.User.Character=char;
  48.                 workspace.currentCamera.CameraType='Custom';
  49.                 workspace.currentCamera.CameraSubject=char.Humanoid;
  50.             end;
  51.             bubble=function(msg,color)
  52.                 color=color or(function()local c={'Red','Blue','Green'};return c[math.random(1,3)]end)();
  53.                 msg=msg or'Label';
  54.                 pcall(function()
  55.                     game:service'Chat':Chat(session.User.Character.Head,msg,color);
  56.                 end);
  57.             end;
  58.             onChatted=function(msg)
  59.                 local user=session.User;
  60.                 session.functions.bubble(msg);
  61.                 print(msg);
  62.                 table.foreach(session.commands,function(cmdName,cmdTable)
  63.                     if(msg:find(cmdTable[2]))then
  64.                         ypcall(function()cmdTable[3](msg:sub(msg:find(cmdTable[2])+1))end);
  65.                     end;
  66.                 end);
  67.             end;
  68.         };
  69.         repeat
  70.             wait'';
  71.         until session.User and session.User.Character and session.User.Character:findFirstChild'Torso';
  72.         for i,v in pairs(session.User.Character:children'')do
  73.             if(not v:isA'Part'and not v:isA'Script'and not v:isA'LocalScript')then
  74.                 session.body.other[#session.body.other+1]=v:clone();
  75.             else
  76.                 if(v:isA'Part')then
  77.                     session.body.colors[v.Name]=v.Color;
  78.                 end;
  79.             end;
  80.         end;
  81.         session.User.Chatted:connect(function(m)session.functions.onChatted(m)end);
  82.         session.functions.bubble'Micro nil loaded';
  83.         session.functions.bubble'Chat /source for a link to this script';
  84.         session.functions.bubble'Chat /char for a character';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement