Advertisement
InTesting

Time Stopping For Better Purposes

Dec 1st, 2019
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.91 KB | None | 0 0
  1. local function Set_Up_Function(player)
  2.     local Set_Up_1 = {
  3.        
  4.        
  5.        
  6.         };
  7.    
  8.     local Set_Up_2={Name='Time_Stop';Motor6d_Enabled={Left_Arm=true;Right_Arm=true;Left_Leg=true;
  9.     Right_Leg=true;};Shirt_Asset=true;Pants_Asset=true;Health=nil;WalkSpeed=nil;JumpPower=nil;
  10.     Customized_Face_Ids={};Destroy_Accessories={};Destroy_Character_Meshes=false;Booleans={
  11.     Active=true;In_Pause=false;Global_Table_1={};Global_Event_1=nil;
  12.    
  13.     };};wait(2);local function Get_Player_From_Descendant(de)if not de then return;end;
  14.     local fn=de:GetFullName();local sep1=string.find(fn,'%.');if not sep1 then return;end;
  15.     local sep2=string.find(fn,'%.',sep1+1);if not sep2 then return;end;
  16.     local pl=game:service'Players':FindFirstChild(fn:sub(sep1+1,sep2-1));if not pl then return;end;
  17.     return pl;end;
  18.     local Players,cwrap,Wait_For_Child_2,Storage,RE,RF,clerp,Asset_Prefix=
  19.         game:GetService("Players"),function(a)local b=coroutine.wrap(a);b();return b;end,
  20.         function(p,c,wt)wt=wt or 1/60;local a;if not p or not c then return;end;
  21.         if typeof(p)~='Instance'or typeof(c)~='string'then return;end;repeat
  22.         a=p:FindFirstChild(c);wait(wt);until a;return a;end,{},nil,nil,function(cf,goal,al)
  23.         return cf:Lerp(goal,al);end,'rbxassetid://';
  24.     player=(player=='FindPlayer'and(loadstring('return owner')()or Players:
  25.         GetPlayerFromCharacter(script.Parent)))or player;
  26.     script.Name=Set_Up_2.Name;if not player or not Players then return;end;
  27.     if loadstring('return owner')()then pcall(function()local NLS;NLS=loadstring('return NLS')();
  28.         NLS([[local lp,re,rf=game:GetService'Players'.LocalPlayer,script:WaitForChild'RE_Client',
  29.     script:WaitForChild'RF_Client';local mouse=lp:GetMouse();mouse.KeyDown:Connect(function(k)
  30. re:FireServer('KD',k,mouse.Hit,mouse.Target);end);mouse.Button1Down:Connect(function()re:
  31. FireServer('MB_Down',mouse.Hit,mouse.Target);end);rf.OnClientInvoke=function(...)local args={...};
  32. if args[1]=='Get_Mouse_CF'then return mouse.Hit;elseif args[1]=='Get_Mouse_Target'then
  33. return mouse.Target;end;end;]],script);script.Parent=loadstring('return owner')().Character;
  34.         end);end;
  35.     local pchar,Instance_2,Remove=player.Character or(function()repeat wait(1);player:LoadCharacter();
  36.         until player.Character;return player.Character;end)(),function(c,p)
  37.         local a=(function()for a,b in pairs(Storage)do if b.ClassName==c then
  38.         table.remove(Storage,a);return b;end;end;end)()or Instance.new(c);if not a then
  39.         print'No classname';return;end;for b,c in pairs(p)do local _,d= pcall(function()a[b]=c;end);
  40.         if d then print(d);end;end;return a;end,function(a)for _,b in pairs(a:GetDescendants())do
  41.         pcall(function()b.Parent=nil;table.insert(Storage,b);end);end;pcall(function()a.Parent=nil;
  42.         table.insert(Storage,a);end);end;
  43.     if not pchar then return;end;local a=(function()if loadstring('return owner')()then return{
  44.         Instance_2('RemoteEvent',{Name='RE_Client';Parent=script:GetChildren()[1];});
  45.         Instance_2('RemoteFunction',{Name='RF_Client';Parent=script:GetChildren()[1];})};end;
  46.         wait(2);return{script:FindFirstChildWhichIsA('RemoteEvent',true);script:
  47.     FindFirstChildWhichIsA('RemoteFunction',true);}end)();RE,RF=unpack(a);if not RE or not RF then
  48.     return;end;
  49.     local Head,HRootPart,Torso,Humanoid,Left_Arm,Right_Arm,Left_Leg,Right_Leg,Damage,Container=
  50.         (function()local a;repeat a=pchar:FindFirstChild'Head';if a then break;end;wait(1);until nil;
  51.         return a;end)(),(function()local a;repeat a=pchar:FindFirstChild'HumanoidRootPart';if a then
  52.         break;end;wait(1);until nil;return a;end)(),(function()local a;repeat
  53.         a=pchar:FindFirstChild'Torso';if a then break;end;wait(1);until nil;return a;end)(),
  54.         (function()local a;repeat a=pchar:FindFirstChildWhichIsA'Humanoid';if a then break;end;wait(1);
  55.         until nil;return a;end)(),(function()local a;repeat a=pchar:FindFirstChild'Left Arm';if a then
  56.         break;end;wait(1);until nil;return a;end)(),(function()local a;repeat
  57.         a=pchar:FindFirstChild'Right Arm';if a then break;end;wait(1);until nil;return a;end)(),
  58.         (function()local a;repeat a=pchar:FindFirstChild'Left Leg';if a then break;end;wait(1);until
  59.         nil;return a;end)(),(function()local a;repeat a=pchar:FindFirstChild'Right Leg';if a then
  60.         break;end;wait(1);until nil;return a;end)(),function(h,d,f)if not h then return;end;d=d or 10;
  61.         f=f or function()end;local a=h:FindFirstAncestorWhichIsA'Model';
  62.         if not a or a==workspace or a==pchar then return;end;
  63.         local b,c=a:FindFirstChildWhichIsA'Humanoid',a:FindFirstChild'Head'or a:FindFirstChild'Torso'
  64.             or a:FindFirstChild'UpperTorso'or a:FindFirstChild'HumanoidRootPart';
  65.         if b then if b.Health>150 then b.Health=0;else b:TakeDamage(d);end;elseif c then
  66.         Remove(c);else pcall(function()a:BreakJoints();end);end;end,Instance_2('Folder',{Parent=
  67.         pchar});
  68.     local Left_Hip,Left_Shoulder,Neck,Right_Hip,Right_Shoulder,RootJoint=
  69.         (not Set_Up_2.Motor6d_Enabled.Left_Leg and(function()local a=Torso:FindFirstChild'Left Hip';
  70.         if a then Remove(a)end;local b=Instance_2('Weld',{Part0=Torso;Part1=Left_Leg;Parent=Torso;});
  71.         return b;end)())or Torso:FindFirstChild'Left Hip',(not Set_Up_2.Motor6d_Enabled.Left_Arm
  72.         and(function()local a=Torso:FindFirstChild'Left Shoulder';if a then Remove(a)end;
  73.         local b=Instance_2('Weld',{Part0=Torso;Part1=Left_Arm;Parent=Torso;});return b;end)())or
  74.         Torso:FindFirstChild'Left Shoulder',Torso:FindFirstChild'Neck',(not Set_Up_2.Motor6d_Enabled.
  75.         Right_Leg and(function()local a=Torso:FindFirstChild'Right Hip';if a then Remove(a)end;
  76.         local b=Instance_2('Weld',{Part0=Torso;Part1=Right_Leg;Parent=Torso;});return b;end)())or
  77.         Torso:FindFirstChild'Right Hip',(not Set_Up_2.Motor6d_Enabled.Right_Arm and(function()
  78.         local a=Torso:FindFirstChild'Right Shoulder';if a then Remove(a)end;local b=Instance_2('Weld'
  79.         ,{Part0=Torso;Part1=Right_Arm;Parent=Torso;});return b;end)())or Torso:FindFirstChild
  80.         'Right Shoulder',HRootPart:FindFirstChild'RootJoint';
  81.     if not Left_Hip or not Left_Shoulder or not Neck or not Right_Hip or not Right_Shoulder or
  82.         not RootJoint then return;end;local Joints={Left_Hip;Left_Shoulder;Neck;Right_Hip;
  83.     Right_Shoulder};   
  84.     local CFrames,CFrame_Mode={
  85.        
  86.         },{};
  87.     (function()--[[Appearence]]local a=pchar:FindFirstChildWhichIsA'Shirt'or Instance_2('Shirt',{
  88.         Parent=pchar;});if Set_Up_2.Shirt_Asset and typeof(Set_Up_2.Shirt_Asset)~='boolean'then
  89.         a.ShirtTemplate=Asset_Prefix..Set_Up_2.Shirt_Asset;elseif Set_Up_2.Shirt_Asset==true then else
  90.         Remove(a);end;local a=pchar:FindFirstChildWhichIsA'Pants'or Instance_2('Pants',{Parent=pchar;});
  91.         if Set_Up_2.Pants_Asset and typeof(Set_Up_2.Pants_Asset)~='boolean'then
  92.         a.Pants=Asset_Prefix.. Set_Up_2.Pants_Asset;elseif Set_Up_2.Pants_Asset then else Remove(a);
  93.         end;if #Set_Up_2.Customized_Face_Ids~=0 then for _,a in pairs(Head:GetChildren())do
  94.         if a:IsA'Decal'then Remove(a);end;end;for _,a in pairs(Set_Up_2.Customized_Face_Ids)do
  95.         local b=(typeof(a)=='table'and a)or{Color3=Color3.fromRGB(255,255,255);Transparency=0;Texture=
  96.         Asset_Prefix..tostring(a)};b.Parent=Head;b.Face='Front';Instance_2('Decal',b);end;end;
  97.         for a,b in pairs(Set_Up_2.Destroy_Accessories)do if b then
  98.         for _,c in pairs(pchar:GetChildren())do(function()if not c:IsA'Accessory'then return;end;
  99.         local d=c:FindFirstChildWhichIsA('Attachment',true);if not d then return;end;if a~=d.Name then
  100.         return;end;c:Destroy();end)();end;end;end;if Set_Up_2.Destroy_Character_Meshes then
  101.         for _,a in pairs(pchar:GetChildren())do if a:IsA'CharacterMesh'then Remove(a);end;end;end;
  102.     end)();
  103.     local function Animation(cfs,In_Action)for _,c in pairs(Joints)do for a,b in pairs(cfs)do
  104.         if c.Name==a then for d,e in pairs(b)do if In_Action[a]==d then
  105.         c.C0,c.C1=clerp(c.C0,e.C0,e[3]or.5),clerp(c.C1,e.C1,e[3]or.5);end;end;break;end;end;end;end;
  106.     local function ServerHandler(pl,...)local args={...};
  107.         if args[2]=='e'and Set_Up_2.Booleans.Active and args[1]=='KD'then Set_Up_2.Booleans.Active=false;
  108.             Set_Up_2.Booleans.In_Pause=not Set_Up_2.Booleans.In_Pause;if Set_Up_2.Booleans.In_Pause then
  109.             local Size_Number=400;local orb=Instance_2('Part',{Size=Vector3.new(.4,.4,.4);Color=Color3.
  110.             fromRGB(0,123, 255);Position=HRootPart.Position;Shape='Ball';Anchored=true;CanCollide=false;
  111.             Massless=true;Parent=Container;Name='Time_Stop_Orb'});Instance_2('SpecialMesh',{Parent=
  112.             orb;MeshId='rbxassetid://1391002977';TextureId='';Scale=Vector3.new(-.01,-.01,-.01);});
  113.             wait(.1);
  114.             local a=game:GetService'TweenService':Create(orb,TweenInfo.new(1.4,Enum.EasingStyle.Linear,
  115.                 Enum.EasingDirection.Out,0,false,0),{Size=Vector3.new(Size_Number,Size_Number,Size_Number
  116.             );Color=Color3.fromRGB(197,255,7);});a:Play();
  117.             local b=game:GetService'TweenService':Create(orb:FindFirstChildWhichIsA'SpecialMesh',
  118.                 TweenInfo.new(1.4,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0),{Scale=
  119.             orb:FindFirstChildWhichIsA'SpecialMesh'.Scale*Vector3.new(Size_Number/.4,Size_Number/.4,
  120.             Size_Number/.4);});b:Play();
  121.             local sound=Instance_2('Sound',{SoundId='rbxassetid://1636723480';Volume=4;Parent=orb;Looped
  122.             =false;Playing=false;TimePosition=0;PlaybackSpeed=1;});sound:Play();wait(1.4);
  123.             orb.Touched:Connect(function()end);local d=function(e)if not e then return;end;
  124.             if not e:IsA'BasePart'then return;end;local cm=e:FindFirstAncestorWhichIsA'Model';
  125.             if game.PlaceId==843468296 and Get_Player_From_Descendant(e) then return;end;
  126.             if player==Get_Player_From_Descendant(e)then return;end;if e.Anchored==true then return;end;
  127.             e.Anchored=true;table.insert(Set_Up_2.Booleans.Global_Table_1,e);end;
  128.             for _,c in pairs(orb:GetTouchingParts())do d(c);end;
  129.             Set_Up_2.Booleans.Global_Event_1=workspace.DescendantAdded:Connect(d);
  130.             local a=game:GetService'TweenService':Create(orb,TweenInfo.new(1.4,Enum.EasingStyle.Linear,
  131.                 Enum.EasingDirection.Out,0,false,0),{Size=Vector3.new(.4,.4,.4);});a:Play();
  132.             local b=game:GetService'TweenService':Create(orb:FindFirstChildWhichIsA'SpecialMesh',
  133.                 TweenInfo.new(1.4,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0),{Scale=
  134.             Vector3.new(-.01,-.01,-.01);});b:Play();sound.Ended:Connect(function()Remove(orb);end);else
  135.                
  136.             local sound=Instance_2('Sound',{SoundId='rbxassetid://864569342';Volume=4;Parent=HRootPart;
  137.             Looped=false;Playing=false;TimePosition=0;PlaybackSpeed=1;});sound:Play();wait(sound.
  138.             TimeLength);
  139.             if Set_Up_2.Booleans.Global_Event_1 then
  140.                 Set_Up_2.Booleans.Global_Event_1:Disconnect();
  141.                 Set_Up_2.Booleans.Global_Event_1=nil;
  142.             end;
  143.             for a,b in pairs(Set_Up_2.Booleans.Global_Table_1)do
  144.                 (function()
  145.                     if not b then return;end;b.Anchored=false;
  146.                     Set_Up_2.Booleans.Global_Table_1[a]=nil;
  147.                    
  148.                 end)();
  149.             end;
  150.             end;
  151.             Set_Up_2.Booleans.Active=true;
  152.         end;
  153.     end;
  154.     Humanoid.MaxHealth=Set_Up_2.Health or 100;Humanoid.WalkSpeed=Set_Up_2.WalkSpeed or 16;
  155.     Humanoid.JumpPower=Set_Up_2.JumpPower or 50;Humanoid.Health=Humanoid.MaxHealth;cwrap(function()
  156.     while true do wait();Animation(CFrames,CFrame_Mode);end;end);
  157.     RE.OnServerEvent:Connect(ServerHandler);RF.OnServerInvoke=ServerHandler;
  158. end;
  159. Set_Up_Function'FindPlayer';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement