Advertisement
InTesting

Anim testing

Sep 29th, 2019
704
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 41.03 KB | None | 0 0
  1. print('https://pastebin.com/raw/UdhzTMkH');
  2. print('By SoftlockedUnderZero / Semicolon abuser');
  3. print('E = Hold out staff. (Kinda bad when you swing it)');
  4. print('F = Throw a .. I forgot what its called')
  5.  
  6. local function I_Robbed_Robins_Gear(player)
  7.     local places = {843495510,843468296,897312463}
  8.     local re,rf
  9.     for _,v in pairs(places)do
  10.         if game.PlaceId==v then
  11.             pcall(function()
  12.                 local function Get_Components_Of_Mouse(player)
  13.                     local pchar = player.Character
  14.                     if pchar then
  15.                         local Remote = pchar:FindFirstChild('RE_Mouse')or
  16.                             Instance.new("RemoteEvent",pchar);
  17.                         local RF = pchar:FindFirstChild('RF_Mouse')or
  18.                             Instance.new("RemoteFunction",pchar);
  19.                         Remote.Name = 'RE_Mouse';RF.Name='RF_Mouse'
  20.                        
  21.                         Remote.Parent = NLS(
  22.                             [[
  23. local lp,re,rf =
  24.     game:GetService("Players").LocalPlayer,script:WaitForChild('RE_Mouse'),
  25.     script:WaitForChild('RF_Mouse');
  26. local mouse = lp:GetMouse();
  27.  
  28. mouse.KeyDown:Connect(function(k)
  29.     re:FireServer('KD',k,mouse.Hit,mouse.Target)
  30. end);
  31. mouse.Button1Down:Connect(function()
  32.     re:FireServer('MB_Down',mouse.Hit,mouse.Target)
  33. end)
  34.  
  35. rf.OnClientInvoke = function(...)
  36.     local args = {...}
  37.     if args[1]=='Get_Mouse_CF'then return mouse.Hit;
  38.     elseif args[1]=='Get_Mouse_Target'then return mouse.Target;
  39.     end
  40. end;
  41.                             ]]
  42.                         ,pchar)
  43.                         RF.Parent=Remote.Parent
  44.                         return Remote,RF
  45.                     else
  46.                         error('Best to actually put your character In the game.')
  47.                     end
  48.                 end
  49.                 re,rf = Get_Components_Of_Mouse(player);
  50.                 repeat wait(1);until re and rf;
  51.             end)
  52.            
  53.         end;
  54.     end;
  55.     if not re and not rf then
  56.         re,rf = script:WaitForChild('LocalScript'):WaitForChild'RemoteEvent',
  57.             script:WaitForChild('LocalScript'):WaitForChild'RemoteFunction';
  58.     end;
  59.    
  60.     local New_Instance = function(Classname,Props)
  61.         if not Classname or typeof(Classname)~='string'or not Props then
  62.             error'Invalid arguments';end;
  63.         local a = Instance.new(Classname);for i,v in pairs(Props)do
  64.             local _,e=pcall(function()a[i]=v;end)if e then print(e)end;
  65.         end;a.Parent=Props.Parent or workspace;return a;end;
  66.    
  67.     local Instance_2 = {
  68.         new = New_Instance,Get_Part = function(Props)
  69.             Props.Massless = (Props.Massless==nil and true)or Props.Massless;
  70.             Props.CanCollide = (Props.CanCollide==nil and false)or Props.CanCollide;
  71.             return New_Instance('Part',Props);end,
  72.         Weld = function(props)return New_Instance('Weld',props)end,}
  73.     Instance_2.Get_SM_Part = function(Part_Props,SM_Props)
  74.         local part = Instance_2.Get_Part(Part_Props);
  75.         if not SM_Props.Parent then SM_Props.Parent=part;end;
  76.         local sm = Instance_2.new('SpecialMesh',SM_Props);return part;
  77.     end
  78.     Instance_2.Get_Wedge = function(Part_Props)
  79.         Part_Props.Massless = (not Part_Props.Massless and true)or Part_Props.Massless;
  80.         local part = Instance_2.new('WedgePart',Part_Props);return part
  81.     end
  82.    
  83.     local function Get_New_Motor(rig,Instance_variant_1,type_)
  84.         local Old_M6D;
  85.         local function Error_Msg(Res)print('Failed to load: '..Res);end;
  86.         if rig and Instance_variant_1 then
  87.             if typeof(rig)=='Instance'and typeof(Instance_variant_1)=='Instance'then
  88.                 local torso = rig:FindFirstChild'Torso';
  89.                 if torso then
  90.                     if Instance_variant_1:IsA'Motor6D'then
  91.                         Old_M6D = Instance_variant_1;
  92.                     elseif Instance_variant_1:IsA'BasePart'then
  93.                         for _,v in pairs(torso:GetChildren())do
  94.                             if v:IsA'Motor6D'then
  95.                                 if v.Part1==Instance_variant_1 then
  96.                                     Old_M6D = v;break;
  97.                                 end;
  98.                             end;
  99.                         end;
  100.                     end;
  101.                 else Error_Msg'Can not find torso.';end;
  102.             else
  103.                 if typeof(rig)~='Instance'then
  104.                     Error_Msg'Argument "rig" is not an Instance.';end;
  105.                 if typeof(Instance_variant_1)~='Instance'then
  106.                     Error_Msg'Argument Instance_variant_1 is not an Instance.';end;
  107.             end;
  108.         else
  109.             if not rig then Error_Msg'Argument 1 is nil.';end;
  110.             if not Instance_variant_1 then Error_Msg'Argument 2 is nil.';end;
  111.         end
  112.         if Old_M6D then
  113.             local torso,new_M6D = rig.Torso,(not type_ and Instance.new('Weld'))or
  114.                 Instance.new("Motor6D");
  115.         new_M6D.Name = Old_M6D.Name;new_M6D.Part0 = Old_M6D.Part0;
  116.         new_M6D.Part1 = Old_M6D.Part1;
  117.         local P1n = new_M6D.Part1.Name
  118.         if P1n=='Left Arm'then
  119.             new_M6D.C0 = CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
  120.             new_M6D.C1 = CFrame.new(0.5, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 0.999999881, 0, -4.37113812e-08)
  121.         elseif P1n=='Right Arm'then
  122.             new_M6D.C0 = CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08)
  123.             new_M6D.C1 = CFrame.new(-0.5, 0.5, 0, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -0.999999881, 0, -4.37113812e-08)
  124.         elseif P1n=='Left Leg'then
  125.             new_M6D.C0 = CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08)
  126.             new_M6D.C1 = CFrame.new(-0.5, 1, 0, -4.37113883e-08, 0, -1, 0, 0.999999881, 0, 0.99999994, 1.49011612e-08, -4.37113847e-08)
  127.         elseif P1n=='Right Leg'then
  128.             new_M6D.C0 = CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08)
  129.             new_M6D.C1 = CFrame.new(0.5, 1, 1.1920929e-07, -4.37113883e-08, 0, 1, -2.08616257e-07, 0.999999881, -7.10542736e-15, -0.999999881, -1.49011612e-07, -4.37113847e-08)
  130.         end;
  131.         new_M6D.Parent = torso;Old_M6D:Destroy();return new_M6D;end;
  132.     end;
  133.    
  134.     local pchar,cwrap =
  135.         player.Character,coroutine.wrap;
  136.     local New = pchar:FindFirstChild'New'or(function()
  137.         local fold=Instance.new("Folder");fold.Name='New';fold.Parent=pchar;return fold;
  138.     end)();
  139.     local function Get_Parts(character)
  140.         local function FFC(n)return character:FindFirstChild(n);end;
  141.        
  142.         local LimbNames,M6_Names=
  143.             {'Head','HumanoidRootPart','Left Arm','Left Leg','Right Arm',
  144.             'Right Leg','Torso',},{HumanoidRootPart='RootJoint','Left Hip','Left Shoulder',
  145.             'Neck','Right Hip','Right Shoulder'};  
  146.         local Appearence,Limbs,M6S={},{},{};
  147.         local A_Count,Face_Count=0,0;
  148.         for _,v in pairs(LimbNames)do local limb=FFC(v);if limb then Limbs[v]=limb;end;end;
  149.         local Torso=Limbs.Torso;
  150.         if Torso then for _,v in pairs(M6_Names)do local M6=Torso:FindFirstChild(v);
  151.             if M6 then M6S[v]=M6;end;end;end;
  152.         if not M6S.RootJoint and Limbs.HumanoidRootPart.RootJoint then
  153.             M6S.RootJoint = Limbs.HumanoidRootPart.RootJoint;end;
  154.         for _,v in pairs(character:GetDescendants())do
  155.             if v:IsA'Accessory'then A_Count=A_Count+1;Appearence['Accessory_'..A_Count]=v;
  156.             elseif v:IsA'Decal'and v.Parent==Limbs.Head and Limbs.Head then
  157.                 Face_Count=Face_Count+1;Appearence['Face_'..Face_Count]=v;
  158.             elseif v:IsA'BodyColors'and not Appearence.BodyColors then Appearence.BodyColors=v;
  159.             elseif v:IsA'Humanoid'and not Appearence.Humanoid then Appearence.Humanoid=v;end;
  160.         end;
  161.         return Limbs,M6S,Appearence;
  162.     end;
  163.     local limbs,m6s=Get_Parts(pchar);
  164.    
  165.     local Torso,RArm=limbs.Torso,limbs['Right Arm'];
  166.     local Neck,LS,RS,RJ,LH,RH=m6s.Neck,m6s['Left Shoulder'],m6s['Right Shoulder'],
  167.         m6s.RootJoint,m6s['Left Hip'],m6s['Right Hip']
  168.     LS,RS,LH,RH=
  169.         Get_New_Motor(pchar,LS),Get_New_Motor(pchar,RS),
  170.         Get_New_Motor(pchar,LH),Get_New_Motor(pchar,RH)
  171.    
  172.     local hum = pchar:FindFirstChildWhichIsA'Humanoid''Model';if hp then
  173.         local hum = hp:FindFirstChildWhichIsA'Humanoid';
  174.         local Destroy_Part = hp:FindFirstChild'Head'or hp:FindFirstChild'Torso'or
  175.             hp:FindFirstChild'HumanoidRootPart';
  176.         if hp~=workspace and hp.Name~=workspace.Name and hp~=pchar then
  177.         if hum then if hum.Health>1000 then hum.Health = 0;return hit;else
  178.         hum:TakeDamage(damage);return hit;end;
  179.         elseif Destroy_Part then Destroy_Part:Destroy();if Destroy_Part~=hit then
  180.         return hit;end;else pcall(function()hp:BreakJoints();end); 
  181.         end;end;end;end;
  182.     end;
  183.     local function Get_Sound(props,id)
  184.         local Main_Sound = (props and (function()
  185.             props.Volume = (not props.Volume and 2)or props.Volume;
  186.             props.Parent = New;props.SoundId = (not id and props.SoundId)or id;
  187.             return Instance_2.new('Sound',props);
  188.             end)())or(function()
  189.             for _,v in pairs( New:GetChildren())do if v:IsA'Sound'then
  190.                 if not v.Playing then return v;end;end;end;
  191.         end)();
  192.         Main_Sound.SoundId = (not id and props.SoundId)or id;
  193.         Main_Sound:Play();return Main_Sound;
  194.     end;
  195.    
  196.     local function GetStaff(char)
  197.         local Staff=New:FindFirstChild'Staff'or(function()
  198.             local a=Instance.new("Part");a.Name='Staff';a.Shape='Cylinder';
  199.             a.Size=Vector3.new(5,.1,.1);a.Massless=true;a.CanCollide=false;
  200.             a.Material='Metal'a.Parent=New;return a;
  201.         end)();
  202.         local w1=Staff:FindFirstChildWhichIsA'Weld'or(function()
  203.             local a=Instance.new('Weld');a.Part1=Staff;a.Part0=Torso;
  204.             a.C0 = CFs.Staff_Away_C0;a.C1 = CFs.Staff_Away_C1;a.Parent=Staff;return a;
  205.         end)();return Staff;
  206.     end;
  207.     local function Bullet_Ray_1(Start,CF,id)
  208.         local dis,aim_CF,Prime_CF = (Start - CF.Position).Magnitude,
  209.             function(s,e)return CFrame.new(s,e);end;
  210.         local Bullet_Ray = BT_1_Cache[id*2-1]or
  211.             Instance_2.Get_Part({Transparency=.5,Material='Metal',
  212.             CFrame=aim_CF(Start,CF.Position)*CFrame.Angles(0,math.rad(90),0)*
  213.             CFrame.new(dis/2,0,0),Size=Vector3.new(dis,.1,.1),Shape='Cylinder',
  214.             Anchored=true,CanCollide=false,Parent=New,});
  215.         Bullet_Ray.Parent=New;
  216.         local Bullet = BT_1_Cache[id*2]or
  217.             Instance_2.Get_Part({
  218.             Color=Color3.new(1,0,0),Material='DiamondPlate',Size=Vector3.new(1,.25,1),
  219.             Anchored=true,CFrame=Bullet_Ray.CFrame*CFrame.new(dis/2,0,0),
  220.             CanCollide=false,Parent=New,});
  221.         Bullet_Ray.CFrame=aim_CF(Start,CF.Position)*CFrame.Angles(0,math.rad(90),0)*
  222.             CFrame.new(dis/2,0,0);Bullet_Ray.Size=Vector3.new(dis,.1,.1);
  223.         Bullet.Parent=New;Bullet:ClearAllChildren();Bullet.Anchored=true;
  224.         wait(1/math.huge);
  225.         Bullet.CFrame=Bullet_Ray.CFrame*CFrame.new(dis/2,0,0);Prime_CF=Bullet_Ray.CFrame;
  226.         local Deb_AddItem = cwrap(function()
  227.             local duration,increment = .5,.1;
  228.             local a_1 = 0;         
  229.             repeat wait(increment);a_1=a_1+increment;
  230.             until not Bullet_Ray or a_1>=duration or Bullet_Ray.CFrame~=Prime_CF or
  231.                 not Bullet_Ray.Parent;
  232.             if a_1>=duration then Bullet_Ray.Parent=nil;end;
  233.         end);Deb_AddItem();
  234.        
  235.         return Bullet,Bullet_Ray
  236.     end;
  237.    
  238.     local Staff = GetStaff(pchar);
  239.     local Staff_Weld = Staff.Weld;
  240.     local Staff_In_Hand,Is_Swinging,Staff_Deb = false,false,true;
  241.    
  242.     Sound_Cache[1]=Get_Sound({Volume=5},'rbxassetid://166423113');
  243.     Sound_Cache[1]:Stop();
  244.    
  245.     re.OnServerEvent:Connect(function(pl,...)
  246.         local args = {...};
  247.         if pl==player then
  248.             if args[1]=='KD'then
  249.                 if args[2]=='e'and not hum.Sit then
  250.                     Char_Bools.Staff_Enabled=(Char_Bools.Staff_Enabled=='Staff'and
  251.                         'Neutral')or'Staff';
  252.                     if Char_Bools.Staff_Enabled=='Staff'and not hum.Sit then
  253.                         Staff_Weld.Part0=RArm;Staff_Weld.C0=CFs.Staff_Ready_C0;
  254.                         Staff_Weld.C1=CFs.Staff_Ready_C1;Staff_In_Hand=true;
  255.                     elseif Char_Bools.Staff_Enabled=='Neutral'then
  256.                         Staff_Weld.Part0=Torso;Staff_Weld.C0=CFs.Staff_Away_C0;
  257.                         Staff_Weld.C1=CFs.Staff_Away_C1;Staff_In_Hand=false
  258.                     end;
  259.                 elseif args[2]=='f'and args[4]and Char_Bools.Staff_Enabled~='Staff'
  260.                     and not Char_Bools.In_Throwing_Bullets_T1 then
  261.                     Char_Bools.In_Throwing_Bullets_T1 = true;
  262.                     for i=1,3 do
  263.                         local ts = Sound_Cache[1];
  264.                         if not ts then
  265.                             Sound_Cache[1] = Get_Sound({Volume=5},
  266.                                 'rbxassetid://166423113');
  267.                             ts = Sound_Cache;
  268.                         end;ts:Play();
  269.                         args[3],args[4] =
  270.                             rf:InvokeClient(player,'Get_Mouse_CF'),
  271.                             rf:InvokeClient(player,'Get_Mouse_Target');
  272.                         local a,b=
  273.                             Bullet_Ray_1((RArm.CFrame*CFrame.new(0,-1,0).Position),
  274.                             args[3],BT_1_Count);
  275.                         BT_1_Cache[BT_1_Count*2-1] = b;BT_1_Cache[BT_1_Count*2] = a;
  276.                         BT_1_Count = BT_1_Count + 1;
  277.                         if BT_1_Count>BT_1_Max then BT_1_Count = 1;end;
  278.                         local stick_part = Custom_Damage(args[4]);
  279.                         if stick_part then a.Anchored=false;
  280.                             local w=Instance_2.new('WeldConstraint',{Part0=a,
  281.                             Part1=stick_part;Parent=a;});end;
  282.                         wait();
  283.                     end;
  284.                     Char_Bools.In_Throwing_Bullets_T1 = false
  285.                 end;
  286.             elseif args[1]=='MB_Down'and Staff_In_Hand and Staff_Deb then
  287.                 Staff_Deb = false;Is_Swinging = true;
  288.                 local Temp_ev = Staff.Touched:Connect(function(h)Custom_Damage(h,25)end);
  289.                 wait(.1);
  290.                 Temp_ev:Disconnect();
  291.                 Is_Swinging = false;Staff_Deb = true;
  292.             end;
  293.         end;
  294.     end);
  295.     spawn(function()
  296.         local hrp = limbs.HumanoidRootPart;
  297.         local Left_Step = true;
  298.         local clerp = function(cf,goal,percent)return cf:Lerp(goal,percent);end;
  299.        
  300.         local Frame,Throw_Frame,Climb_Frame,Swing_Frame = 0,0,0,0;
  301.        
  302.         local Frames_Max = 10;
  303.         local Throw_Frames_Max = 10;
  304.         local Climb_Frame_Max = 10;
  305.         local Swing_Frames_Max = 10;
  306.        
  307.         local Move_To_Decimal = .5;
  308.         local moving_radius = 1;
  309.         while true do
  310.             local state = hum:GetState();
  311.             local velo = hrp.Velocity;
  312.             local Abs_Climb_Frame = math.abs(Climb_Frame);
  313.             local Step_Frame = Frame % Frames_Max;
  314.             local Step_Throw_Frame = Throw_Frame % Throw_Frames_Max;
  315.             local Step_Climb_Frame = Abs_Climb_Frame % Climb_Frame_Max;
  316.             local Step_Swing_Frame = Swing_Frame % Swing_Frames_Max
  317.            
  318.            
  319.             if hum.Sit then
  320.                 --// Sitting
  321.                 Neck.C0=clerp(Neck.C0,Default_CFs.Neck_C0,Move_To_Decimal);
  322.                 Neck.C1=clerp(Neck.C1,Default_CFs.Neck_C1,Move_To_Decimal);
  323.                 RJ.C0=clerp(RJ.C0,Default_CFs.RootJoint_C0,Move_To_Decimal);
  324.                 RJ.C1=clerp(RJ.C1,Default_CFs.RootJoint_C1,Move_To_Decimal);
  325.                 LS.C0=clerp(LS.C0,CFs.Sitting_Left_Shoulder_C0,Move_To_Decimal);
  326.                 LS.C1=clerp(LS.C1,CFs.Sitting_Left_Shoulder_C1,Move_To_Decimal);
  327.                 if Throw_Frame==0 then
  328.                     RS.C0=clerp(RS.C0,CFs.Sitting_Right_Shoulder_C0,Move_To_Decimal);
  329.                     RS.C1=clerp(RS.C1,CFs.Sitting_Right_Shoulder_C1,Move_To_Decimal);
  330.                 elseif Step_Throw_Frame<=Throw_Frames_Max/2 then
  331.                     RS.C0=clerp(RS.C0,CFs.Readying_Throw_Right_Shoulder_C0,Move_To_Decimal);
  332.                     RS.C1=clerp(RS.C1,CFs.Readying_Throw_Right_Shoulder_C1,Move_To_Decimal);
  333.                 else
  334.                     RS.C0=clerp(RS.C0,CFs.Threw_Right_Shoulder_C0,Move_To_Decimal);
  335.                     RS.C1=clerp(RS.C1,CFs.Threw_Right_Shoulder_C1,Move_To_Decimal);
  336.                 end;
  337.                 LH.C0=clerp(LH.C0,CFs.Sitting_Left_Hip_C0,Move_To_Decimal);
  338.                 LH.C1=clerp(LH.C1,CFs.Sitting_Left_Hip_C1,Move_To_Decimal);
  339.                 RH.C0=clerp(RH.C0,CFs.Sitting_Right_Hip_C0,Move_To_Decimal);
  340.                 RH.C1=clerp(RH.C1,CFs.Sitting_Right_Hip_C1,Move_To_Decimal);
  341.             elseif velo.Y<-moving_radius*2 then
  342.                 --// Falling
  343.                 Climb_Frame=Climb_Frame-1
  344.                 if state==Enum.HumanoidStateType.Climbing then
  345.                     if Step_Climb_Frame>Climb_Frame_Max/2 then
  346.                         Neck.C0=clerp(Neck.C0,Default_CFs.Neck_C0,Move_To_Decimal);
  347.                         Neck.C1=clerp(Neck.C1,Default_CFs.Neck_C1,Move_To_Decimal);
  348.                         RJ.C0=clerp(RJ.C0,Default_CFs.RootJoint_C0,Move_To_Decimal);
  349.                         RJ.C1=clerp(RJ.C1,Default_CFs.RootJoint_C1,Move_To_Decimal);
  350.                         LS.C0=clerp(LS.C0,CFs.Climbing_Left_Shoulder_C0,Move_To_Decimal);
  351.                         LS.C1=clerp(LS.C1,CFs.Climbing_Left_Shoulder_C1,Move_To_Decimal);
  352.                         if Is_Swinging then
  353.                             Swing_Frame=Swing_Frame+1;
  354.                             if Step_Swing_Frame<=Swing_Frames_Max/2 then
  355.                                 RS.C0=clerp(RS.C0,CFs.Swing_1S_Right_Shoulder_C0,
  356.                                     Move_To_Decimal);
  357.                                 RS.C1=clerp(RS.C1,CFs.Swing_1S_Right_Shoulder_C1,
  358.                                     Move_To_Decimal);
  359.                             else
  360.                                 RS.C0=clerp(RS.C0,CFs.Swing_1F_Right_Shoulder_C0,
  361.                                     Move_To_Decimal);
  362.                                 RS.C1=clerp(RS.C1,CFs.Swing_1F_Right_Shoulder_C1,
  363.                                     Move_To_Decimal);
  364.                             end
  365.                         elseif Throw_Frame==0 then
  366.                             RS.C0=clerp(RS.C0,CFs.Climbing_Right_Shoulder_C0,
  367.                                 Move_To_Decimal);
  368.                             RS.C1=clerp(RS.C1,CFs.Climbing_Right_Shoulder_C1,
  369.                                 Move_To_Decimal);
  370.                         elseif Step_Throw_Frame<=Throw_Frames_Max/2 then
  371.                             RS.C0=clerp(RS.C0,CFs.Readying_Throw_Right_Shoulder_C0,
  372.                                 Move_To_Decimal);
  373.                             RS.C1=clerp(RS.C1,CFs.Readying_Throw_Right_Shoulder_C1,
  374.                                 Move_To_Decimal);
  375.                         else
  376.                             RS.C0=clerp(RS.C0,CFs.Threw_Right_Shoulder_C0,Move_To_Decimal);
  377.                             RS.C1=clerp(RS.C1,CFs.Threw_Right_Shoulder_C1,Move_To_Decimal);
  378.                         end;
  379.                         LH.C0=clerp(LH.C0,CFs.Climbing_Left_Hip_C0,Move_To_Decimal);
  380.                         LH.C1=clerp(LH.C1,CFs.Climbing_Left_Hip_C1,Move_To_Decimal);
  381.                         RH.C0=clerp(RH.C0,Default_CFs.Right_Hip_C0,Move_To_Decimal);
  382.                         RH.C1=clerp(RH.C1,Default_CFs.Right_Hip_C1,Move_To_Decimal);
  383.                     else
  384.                         Neck.C0=clerp(Neck.C0,Default_CFs.Neck_C0,Move_To_Decimal);
  385.                         Neck.C1=clerp(Neck.C1,Default_CFs.Neck_C1,Move_To_Decimal);
  386.                         RJ.C0=clerp(RJ.C0,Default_CFs.RootJoint_C0,Move_To_Decimal);
  387.                         RJ.C1=clerp(RJ.C1,Default_CFs.RootJoint_C1,Move_To_Decimal);
  388.                         LS.C0=clerp(LS.C0,CFs.Climbing2_Left_Shoulder_C0,Move_To_Decimal);
  389.                         LS.C1=clerp(LS.C1,CFs.Climbing2_Left_Shoulder_C1,Move_To_Decimal);
  390.                         if Throw_Frame==0 then
  391.                             RS.C0=clerp(RS.C0,CFs.Climbing2_Right_Shoulder_C0,
  392.                                 Move_To_Decimal);
  393.                             RS.C1=clerp(RS.C1,CFs.Climbing2_Right_Shoulder_C1,
  394.                                 Move_To_Decimal);
  395.                         elseif Step_Throw_Frame<=Throw_Frames_Max/2 then
  396.                             RS.C0=clerp(RS.C0,CFs.Readying_Throw_Right_Shoulder_C0,
  397.                                 Move_To_Decimal);
  398.                             RS.C1=clerp(RS.C1,CFs.Readying_Throw_Right_Shoulder_C1,
  399.                                 Move_To_Decimal);
  400.                         else
  401.                             RS.C0=clerp(RS.C0,CFs.Threw_Right_Shoulder_C0,Move_To_Decimal);
  402.                             RS.C1=clerp(RS.C1,CFs.Threw_Right_Shoulder_C1,Move_To_Decimal);
  403.                         end;
  404.                         LH.C0=clerp(LH.C0,Default_CFs.Left_Hip_C0,Move_To_Decimal);
  405.                         LH.C1=clerp(LH.C1,Default_CFs.Left_Hip_C1,Move_To_Decimal);
  406.                         RH.C0=clerp(RH.C0,CFs.Climbing_Right_Hip_C0,Move_To_Decimal);
  407.                         RH.C1=clerp(RH.C1,CFs.Climbing_Right_Hip_C1,Move_To_Decimal);
  408.                     end;
  409.                
  410.                 else
  411.                     Neck.C0=clerp(Neck.C0,CFs.Fall_Neck_C0,Move_To_Decimal);
  412.                     Neck.C1=clerp(Neck.C1,CFs.Fall_Neck_C1,Move_To_Decimal);
  413.                     RJ.C0=clerp(RJ.C0,CFs.Fall_Root_Joint_C0,Move_To_Decimal);
  414.                     RJ.C1=clerp(RJ.C1,CFs.Fall_Root_Joint_C1,Move_To_Decimal);
  415.                     LS.C0=clerp(LS.C0,CFs.Fall_Left_Shoulder_C0,Move_To_Decimal);
  416.                     LS.C1=clerp(LS.C1,CFs.Fall_Left_Shoulder_C1,Move_To_Decimal);
  417.                     if Throw_Frame==0 then
  418.                         RS.C0=clerp(RS.C0,CFs.Fall_Right_Shoulder_C0,
  419.                             Move_To_Decimal);
  420.                         RS.C1=clerp(RS.C1,CFs.Fall_Right_Shoulder_C1,
  421.                             Move_To_Decimal);
  422.                     elseif Step_Throw_Frame<=Throw_Frames_Max/2 then
  423.                         RS.C0=clerp(RS.C0,CFs.Readying_Throw_Right_Shoulder_C0,
  424.                             Move_To_Decimal);
  425.                         RS.C1=clerp(RS.C1,CFs.Readying_Throw_Right_Shoulder_C1,
  426.                             Move_To_Decimal);
  427.                     else
  428.                         RS.C0=clerp(RS.C0,CFs.Threw_Right_Shoulder_C0,Move_To_Decimal);
  429.                         RS.C1=clerp(RS.C1,CFs.Threw_Right_Shoulder_C1,Move_To_Decimal);
  430.                     end;
  431.                     LH.C0=clerp(LH.C0,CFs.Fall_Left_Hip_C0,Move_To_Decimal);
  432.                     LH.C1=clerp(LH.C1,CFs.Fall_Left_Hip_C1,Move_To_Decimal);
  433.                     RH.C0=clerp(RH.C0,CFs.Fall_Right_Hip_C0,Move_To_Decimal);
  434.                     RH.C1=clerp(RH.C1,CFs.Fall_Right_Hip_C1,Move_To_Decimal);
  435.                 end;
  436.             elseif velo.Y>moving_radius*2 then
  437.                 --// Jumping
  438.                 Climb_Frame=Climb_Frame+1
  439.                 if state==Enum.HumanoidStateType.Climbing then
  440.                     if Step_Climb_Frame<=Climb_Frame_Max/2 then
  441.                         Neck.C0=clerp(Neck.C0,Default_CFs.Neck_C0,Move_To_Decimal);
  442.                         Neck.C1=clerp(Neck.C1,Default_CFs.Neck_C1,Move_To_Decimal);
  443.                         RJ.C0=clerp(RJ.C0,Default_CFs.RootJoint_C0,Move_To_Decimal);
  444.                         RJ.C1=clerp(RJ.C1,Default_CFs.RootJoint_C1,Move_To_Decimal);
  445.                         LS.C0=clerp(LS.C0,CFs.Climbing_Left_Shoulder_C0,Move_To_Decimal);
  446.                         LS.C1=clerp(LS.C1,CFs.Climbing_Left_Shoulder_C1,Move_To_Decimal);
  447.                         if Is_Swinging then
  448.                             Swing_Frame=Swing_Frame+1;
  449.                             if Step_Swing_Frame<=Swing_Frames_Max/2 then
  450.                                 RS.C0=clerp(RS.C0,CFs.Swing_1S_Right_Shoulder_C0,
  451.                                     Move_To_Decimal);
  452.                                 RS.C1=clerp(RS.C1,CFs.Swing_1S_Right_Shoulder_C1,
  453.                                     Move_To_Decimal);
  454.                             else
  455.                                 RS.C0=clerp(RS.C0,CFs.Swing_1F_Right_Shoulder_C0,
  456.                                     Move_To_Decimal);
  457.                                 RS.C1=clerp(RS.C1,CFs.Swing_1F_Right_Shoulder_C1,
  458.                                     Move_To_Decimal);
  459.                             end
  460.                         elseif Throw_Frame==0 then
  461.                             RS.C0=clerp(RS.C0,CFs.Climbing_Right_Shoulder_C0,
  462.                                 Move_To_Decimal);
  463.                             RS.C1=clerp(RS.C1,CFs.Climbing_Right_Shoulder_C1,
  464.                                 Move_To_Decimal);
  465.                         elseif Step_Throw_Frame<=Throw_Frames_Max/2 then
  466.                             RS.C0=clerp(RS.C0,CFs.Readying_Throw_Right_Shoulder_C0,
  467.                                 Move_To_Decimal);
  468.                             RS.C1=clerp(RS.C1,CFs.Readying_Throw_Right_Shoulder_C1,
  469.                                 Move_To_Decimal);
  470.                         else
  471.                             RS.C0=clerp(RS.C0,CFs.Threw_Right_Shoulder_C0,Move_To_Decimal);
  472.                             RS.C1=clerp(RS.C1,CFs.Threw_Right_Shoulder_C1,Move_To_Decimal);
  473.                         end;
  474.                         LH.C0=clerp(LH.C0,CFs.Climbing_Left_Hip_C0,Move_To_Decimal);
  475.                         LH.C1=clerp(LH.C1,CFs.Climbing_Left_Hip_C1,Move_To_Decimal);
  476.                         RH.C0=clerp(RH.C0,Default_CFs.Right_Hip_C0,Move_To_Decimal);
  477.                         RH.C1=clerp(RH.C1,Default_CFs.Right_Hip_C1,Move_To_Decimal);
  478.                     else
  479.                         Neck.C0=clerp(Neck.C0,Default_CFs.Neck_C0,Move_To_Decimal);
  480.                         Neck.C1=clerp(Neck.C1,Default_CFs.Neck_C1,Move_To_Decimal);
  481.                         RJ.C0=clerp(RJ.C0,Default_CFs.RootJoint_C0,Move_To_Decimal);
  482.                         RJ.C1=clerp(RJ.C1,Default_CFs.RootJoint_C1,Move_To_Decimal);
  483.                         LS.C0=clerp(LS.C0,CFs.Climbing2_Left_Shoulder_C0,Move_To_Decimal);
  484.                         LS.C1=clerp(LS.C1,CFs.Climbing2_Left_Shoulder_C1,Move_To_Decimal);
  485.                         if Throw_Frame==0 then
  486.                             RS.C0=clerp(RS.C0,CFs.Climbing2_Right_Shoulder_C0,
  487.                                 Move_To_Decimal);
  488.                             RS.C1=clerp(RS.C1,CFs.Climbing2_Right_Shoulder_C1,
  489.                                 Move_To_Decimal);
  490.                         elseif Step_Throw_Frame<=Throw_Frames_Max/2 then
  491.                             RS.C0=clerp(RS.C0,CFs.Readying_Throw_Right_Shoulder_C0,
  492.                                 Move_To_Decimal);
  493.                             RS.C1=clerp(RS.C1,CFs.Readying_Throw_Right_Shoulder_C1,
  494.                                 Move_To_Decimal);
  495.                         else
  496.                             RS.C0=clerp(RS.C0,CFs.Threw_Right_Shoulder_C0,Move_To_Decimal);
  497.                             RS.C1=clerp(RS.C1,CFs.Threw_Right_Shoulder_C1,Move_To_Decimal);
  498.                         end;
  499.                         LH.C0=clerp(LH.C0,Default_CFs.Left_Hip_C0,Move_To_Decimal);
  500.                         LH.C1=clerp(LH.C1,Default_CFs.Left_Hip_C1,Move_To_Decimal);
  501.                         RH.C0=clerp(RH.C0,CFs.Climbing_Right_Hip_C0,Move_To_Decimal);
  502.                         RH.C1=clerp(RH.C1,CFs.Climbing_Right_Hip_C1,Move_To_Decimal);
  503.                     end;
  504.                 else
  505.                     Neck.C0=clerp(Neck.C0,CFs.Jump_Neck_C0,Move_To_Decimal);
  506.                     Neck.C1=clerp(Neck.C1,CFs.Jump_Neck_C1,Move_To_Decimal);
  507.                     RJ.C0=clerp(RJ.C0,CFs.Jump_Root_Joint_C0,Move_To_Decimal);
  508.                     RJ.C1=clerp(RJ.C1,CFs.Jump_Root_Joint_C1,Move_To_Decimal);
  509.                     LS.C0=clerp(LS.C0,CFs.Jump_Left_Shoulder_C0,Move_To_Decimal);
  510.                     LS.C1=clerp(LS.C1,CFs.Jump_Left_Shoulder_C1,Move_To_Decimal);
  511.                     if Throw_Frame==0 then
  512.                         RS.C0=clerp(RS.C0,CFs.Jump_Right_Shoulder_C0,Move_To_Decimal);
  513.                         RS.C1=clerp(RS.C1,CFs.Jump_Right_Shoulder_C1,Move_To_Decimal);
  514.                     elseif Step_Throw_Frame<=Throw_Frames_Max/2 then
  515.                         RS.C0=clerp(RS.C0,CFs.Readying_Throw_Right_Shoulder_C0,
  516.                             Move_To_Decimal);
  517.                         RS.C1=clerp(RS.C1,CFs.Readying_Throw_Right_Shoulder_C1,
  518.                             Move_To_Decimal);
  519.                     else
  520.                         RS.C0=clerp(RS.C0,CFs.Threw_Right_Shoulder_C0,Move_To_Decimal);
  521.                         RS.C1=clerp(RS.C1,CFs.Threw_Right_Shoulder_C1,Move_To_Decimal);
  522.                     end;
  523.                     LH.C0=clerp(LH.C0,CFs.Jump_Left_Hip_C0,Move_To_Decimal);
  524.                     LH.C1=clerp(LH.C1,CFs.Jump_Left_Hip_C1,Move_To_Decimal);
  525.                     RH.C0=clerp(RH.C0,CFs.Jump_Right_Hip_C0,Move_To_Decimal);
  526.                     RH.C1=clerp(RH.C1,CFs.Jump_Right_Hip_C1,Move_To_Decimal);              
  527.                 end
  528.             elseif velo.X>moving_radius or velo.X<-moving_radius or
  529.                 velo.Z>moving_radius or velo.Z<-moving_radius then
  530.                 --// Walking
  531.                 Neck.C0=clerp(Neck.C0,CFs.Run_Pose_Neck_C0,Move_To_Decimal);
  532.                 Neck.C1=clerp(Neck.C1,CFs.Run_Pose_Neck_C1,Move_To_Decimal);
  533.                 RJ.C0=clerp(RJ.C0,CFs.Run_Pose_Root_Joint_C0,Move_To_Decimal);
  534.                 RJ.C1=clerp(RJ.C1,CFs.Run_Pose_Root_Joint_C1,Move_To_Decimal);
  535.                 LS.C0=clerp(LS.C0,CFs.Run_Pose_Left_Shoulder_C0,Move_To_Decimal);
  536.                 LS.C1=clerp(LS.C1,CFs.Run_Pose_Left_Shoulder_C1,Move_To_Decimal);
  537.                 if Is_Swinging then
  538.                     Swing_Frame=Swing_Frame+1;
  539.                     if Step_Swing_Frame<=Swing_Frames_Max/2 then
  540.                         RS.C0=clerp(RS.C0,CFs.Swing_1S_Right_Shoulder_C0,
  541.                             -Move_To_Decimal);
  542.                         RS.C1=clerp(RS.C1,CFs.Swing_1S_Right_Shoulder_C1,
  543.                             -Move_To_Decimal);
  544.                     else
  545.                         RS.C0=clerp(RS.C0,CFs.Swing_1F_Right_Shoulder_C0,
  546.                             -Move_To_Decimal);
  547.                         RS.C1=clerp(RS.C1,CFs.Swing_1F_Right_Shoulder_C1,
  548.                             -Move_To_Decimal);
  549.                     end
  550.                 elseif Char_Bools.Staff_Enabled=='Staff'then
  551.                     RS.C0=clerp(RS.C0,CFs.Staff_Out2_Right_Shoulder_C0,Move_To_Decimal);
  552.                     RS.C1=clerp(RS.C1,CFs.Staff_Out2_Right_Shoulder_C1,Move_To_Decimal);
  553.                 elseif Throw_Frame==0 then
  554.                     RS.C0=clerp(RS.C0,CFs.Run_Pose_Right_Shoulder_C0,Move_To_Decimal);
  555.                     RS.C1=clerp(RS.C1,CFs.Run_Pose_Right_Shoulder_C1,Move_To_Decimal);
  556.                 elseif Step_Throw_Frame<=Throw_Frames_Max/2 then
  557.                     RS.C0=clerp(RS.C0,CFs.Readying_Throw_Right_Shoulder_C0,
  558.                         Move_To_Decimal);
  559.                     RS.C1=clerp(RS.C1,CFs.Readying_Throw_Right_Shoulder_C1,
  560.                         Move_To_Decimal);
  561.                 else
  562.                     RS.C0=clerp(RS.C0,CFs.Threw_Right_Shoulder_C0,Move_To_Decimal);
  563.                     RS.C1=clerp(RS.C1,CFs.Threw_Right_Shoulder_C1,Move_To_Decimal);
  564.                 end;
  565.                 if Step_Frame<=Frames_Max/2 then
  566.                     --// Step 1
  567.                     LH.C0=clerp(LH.C0,CFs.Run_Step_Forward_Left_Hip_C0,Move_To_Decimal);
  568.                     LH.C1=clerp(LH.C1,CFs.Run_Step_Forward_Left_Hip_C1,Move_To_Decimal);
  569.                     RH.C0=clerp(RH.C0,CFs.Run_Step_Backward_Right_Hip_C0,Move_To_Decimal);
  570.                     RH.C1=clerp(RH.C1,CFs.Run_Step_Backward_Right_Hip_C1,Move_To_Decimal);
  571.                 else
  572.                     --// Step 2
  573.                     LH.C0=clerp(LH.C0,CFs.Run_Step_Backward_Left_Hip_C0,Move_To_Decimal);
  574.                     LH.C1=clerp(LH.C1,CFs.Run_Step_Backward_Left_Hip_C1,Move_To_Decimal);
  575.                     RH.C0=clerp(RH.C0,CFs.Run_Step_Forward_Right_Hip_C0,Move_To_Decimal);
  576.                     RH.C1=clerp(RH.C1,CFs.Run_Step_Forward_Right_Hip_C1,Move_To_Decimal);
  577.                 end;
  578.                
  579.                 -- Naruto run here if you know what local variables are. -- end
  580.             else
  581.                 if state~=Enum.HumanoidStateType.Climbing then
  582.                     --// Idle
  583.                     Neck.C0=clerp(Neck.C0,Default_CFs.Neck_C0,Move_To_Decimal);
  584.                     Neck.C1=clerp(Neck.C1,Default_CFs.Neck_C1,Move_To_Decimal);
  585.                     RJ.C0=clerp(RJ.C0,Default_CFs.RootJoint_C0,Move_To_Decimal);
  586.                     RJ.C1=clerp(RJ.C1,Default_CFs.RootJoint_C1,Move_To_Decimal);
  587.                     LS.C0=clerp(LS.C0,Default_CFs.Left_Shoulder_C0,Move_To_Decimal);
  588.                     LS.C1=clerp(LS.C1,Default_CFs.Left_Shoulder_C1,Move_To_Decimal);
  589.                     if Is_Swinging then
  590.                         Swing_Frame=Swing_Frame+1;
  591.                         if Step_Swing_Frame<=Swing_Frames_Max/2 then
  592.                             RS.C0=clerp(RS.C0,CFs.Swing_1S_Right_Shoulder_C0,
  593.                                 Move_To_Decimal);
  594.                             RS.C1=clerp(RS.C1,CFs.Swing_1S_Right_Shoulder_C1,
  595.                                 Move_To_Decimal);
  596.                         else
  597.                             RS.C0=clerp(RS.C0,CFs.Swing_1F_Right_Shoulder_C0,
  598.                                 Move_To_Decimal);
  599.                             RS.C1=clerp(RS.C1,CFs.Swing_1F_Right_Shoulder_C1,
  600.                                 Move_To_Decimal);
  601.                         end
  602.                     elseif Char_Bools.Staff_Enabled=='Staff'then
  603.                         RS.C0=clerp(RS.C0,CFs.Staff_Out_Right_Shoulder_C0,
  604.                             Move_To_Decimal);
  605.                         RS.C1=clerp(RS.C1,CFs.Staff_Out_Right_Shoulder_C1,
  606.                             Move_To_Decimal);
  607.                     elseif Throw_Frame==0 then
  608.                         RS.C0=clerp(RS.C0,Default_CFs.Right_Shoulder_C0,Move_To_Decimal);
  609.                         RS.C1=clerp(RS.C1,Default_CFs.Right_Shoulder_C1,Move_To_Decimal);
  610.                     elseif Step_Throw_Frame<=Throw_Frames_Max/2 then
  611.                         RS.C0=clerp(RS.C0,CFs.Readying_Throw_Right_Shoulder_C0,
  612.                             Move_To_Decimal);
  613.                         RS.C1=clerp(RS.C1,CFs.Readying_Throw_Right_Shoulder_C1,
  614.                             Move_To_Decimal);
  615.                     else
  616.                         RS.C0=clerp(RS.C0,CFs.Threw_Right_Shoulder_C0,Move_To_Decimal);
  617.                         RS.C1=clerp(RS.C1,CFs.Threw_Right_Shoulder_C1,Move_To_Decimal);
  618.                     end;
  619.                     LH.C0=clerp(LH.C0,Default_CFs.Left_Hip_C0,Move_To_Decimal);
  620.                     LH.C1=clerp(LH.C1,Default_CFs.Left_Hip_C1,Move_To_Decimal);
  621.                     RH.C0=clerp(RH.C0,Default_CFs.Right_Hip_C0,Move_To_Decimal);
  622.                     RH.C1=clerp(RH.C1,Default_CFs.Right_Hip_C1,Move_To_Decimal);
  623.                 else
  624.                     if Throw_Frame~=0 then
  625.                         if Step_Throw_Frame<=Throw_Frames_Max/2 then
  626.                             RS.C0=clerp(RS.C0,CFs.Readying_Throw_Right_Shoulder_C0,
  627.                                 Move_To_Decimal);
  628.                             RS.C1=clerp(RS.C1,CFs.Readying_Throw_Right_Shoulder_C1,
  629.                                 Move_To_Decimal);
  630.                         else
  631.                             RS.C0=clerp(RS.C0,CFs.Threw_Right_Shoulder_C0,Move_To_Decimal);
  632.                             RS.C1=clerp(RS.C1,CFs.Threw_Right_Shoulder_C1,Move_To_Decimal);
  633.                         end;
  634.                     end;
  635.                 end;
  636.             end;
  637.             if velo.Y>moving_radius or velo.Y<-moving_radius or velo.X>moving_radius
  638.                 or velo.X<-moving_radius
  639.                 or velo.Z>moving_radius or velo.Z<-moving_radius then
  640.                 Frame=Frame+1 else Frame=0 end;
  641.             if Char_Bools.In_Throwing_Bullets_T1 then Throw_Frame=Throw_Frame+1;
  642.                 else Throw_Frame=0;end;
  643.             wait();
  644.         end;
  645.     end);
  646. end;
  647. wait(2)
  648. I_Robbed_Robins_Gear(owner)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement