Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print'https://pastebin.com/raw/pAYH7pzR'
- local function Set_Up_Function(player)
- local Set_Up_1={
- Name='Script_Name_Sample';
- Movement_Range=1;
- Motor6d_Enabled={
- Left_Arm=false;
- Right_Arm=false;
- Left_Leg=false;
- Right_Leg=false;
- };
- Shirt_Asset=true;
- Pants_Asset=true;
- Health=nil;
- WalkSpeed=nil;
- JumpPower=nil;
- Customized_Face_Ids={};
- Destroy_Accessories={
- };
- Destroy_Character_Meshes=false;
- Global_CLerp_Animation_Decimal_Alpha=nil;
- };
- local Players,cwrap,Wait_For_Child_2,Storage,RE,RF,clerp,Asset_Prefix=
- game:GetService("Players"),function(a)local b=coroutine.wrap(a);b();return b;end,
- function(p,c,wt)wt=wt or 1/60;local a;if not p or not c then return;end;
- if typeof(p)~='Instance'or typeof(c)~='string'then return;end;repeat
- a=p:FindFirstChild(c);wait(wt);until a;return a;end,{},nil,nil,function(cf,goal,al)
- return cf:Lerp(goal,al);end,'rbxassetid://';
- player=(player=='FindPlayer'and(loadstring('return owner')()or Players:
- GetPlayerFromCharacter(script.Parent)))or player;
- script.Name=Set_Up_1.Name;if not player or not Players then return;end;
- if loadstring('return owner')()then pcall(function()local NLS;NLS=loadstring('return NLS')();
- NLS([[local lp,re,rf=game:GetService'Players'.LocalPlayer,script:WaitForChild'RE_Client',
- script:WaitForChild'RF_Client';local mouse=lp:GetMouse();mouse.KeyDown:Connect(function(k)
- re:FireServer('KD',k,mouse.Hit,mouse.Target);end);mouse.Button1Down:Connect(function()re:
- FireServer('MB_Down',mouse.Hit,mouse.Target);end);rf.OnClientInvoke=function(...)local args={...};
- if args[1]=='Get_Mouse_CF'then return mouse.Hit;elseif args[1]=='Get_Mouse_Target'then
- return mouse.Target;end;end;]],script);script.Parent=loadstring('return owner')().Character;
- end);end;
- local pchar,Instance_2,Remove=player.Character or(function()repeat wait(1);player:LoadCharacter();
- until player.Character;return player.Character;end)(),function(c,p)
- local a=(function()for a,b in pairs(Storage)do if b.ClassName==c then
- table.remove(Storage,a);return b;end;end;end)()or Instance.new(c);if not a then
- print'No classname';return;end;for b,c in pairs(p)do local _,d= pcall(function()a[b]=c;end);
- if d then print(d);end;end;return a;end,function(a)a.Parent=nil;table.insert(Storage,a);end;
- if not pchar then return;end;local a=(function()if loadstring('return owner')()then return{
- Instance_2('RemoteEvent',{Name='RE_Client';Parent=script:GetChildren()[1];});
- Instance_2('RemoteFunction',{Name='RF_Client';Parent=script:GetChildren()[1];})};end;
- wait(2);return{script:FindFirstChildWhichIsA('RemoteEvent',true);script:
- FindFirstChildWhichIsA('RemoteFunction',true);}end)();RE,RF=unpack(a);if not RE or not RF then
- return;end;
- local Head,HRootPart,Torso,Humanoid,Left_Arm,Right_Arm,Left_Leg,Right_Leg,Damage,Container=
- (function()local a;repeat a=pchar:FindFirstChild'Head';if a then break;end;wait(1);until nil;
- return a;end)(),(function()local a;repeat a=pchar:FindFirstChild'HumanoidRootPart';if a then
- break;end;wait(1);until nil;return a;end)(),(function()local a;repeat
- a=pchar:FindFirstChild'Torso';if a then break;end;wait(1);until nil;return a;end)(),
- (function()local a;repeat a=pchar:FindFirstChildWhichIsA'Humanoid';if a then break;end;wait(1);
- until nil;return a;end)(),(function()local a;repeat a=pchar:FindFirstChild'Left Arm';if a then
- break;end;wait(1);until nil;return a;end)(),(function()local a;repeat
- a=pchar:FindFirstChild'Right Arm';if a then break;end;wait(1);until nil;return a;end)(),
- (function()local a;repeat a=pchar:FindFirstChild'Left Leg';if a then break;end;wait(1);until
- nil;return a;end)(),(function()local a;repeat a=pchar:FindFirstChild'Right Leg';if a then
- break;end;wait(1);until nil;return a;end)(),function(h,d,f)if not h then return;end;d=d or 10;
- f=f or function()end;local a=h:FindFirstAncestorWhichIsA'Model';
- if not a or a==workspace or a==pchar then return;end;
- local b,c=a:FindFirstChildWhichIsA'Humanoid',a:FindFirstChild'Head'or a:FindFirstChild'Torso'
- or a:FindFirstChild'UpperTorso'or a:FindFirstChild'HumanoidRootPart';
- if b then if b.Health>150 then b.Health=0;else b:TakeDamage(d);end;elseif c then
- Remove(c);else pcall(function()a:BreakJoints();end);end;end,Instance_2('Folder',{Parent=
- pchar});
- local Left_Hip,Left_Shoulder,Neck,Right_Hip,Right_Shoulder,RootJoint=
- (not Set_Up_1.Motor6d_Enabled.Left_Leg and(function()local a=Torso:FindFirstChild'Left Hip';
- if a then Remove(a)end;local b=Instance_2('Weld',{Part0=Torso;Part1=Left_Leg;Parent=Torso;});
- return b;end)())or Torso:FindFirstChild'Left Hip',(not Set_Up_1.Motor6d_Enabled.Left_Arm
- and(function()local a=Torso:FindFirstChild'Left Shoulder';if a then Remove(a)end;
- local b=Instance_2('Weld',{Part0=Torso;Part1=Left_Arm;Parent=Torso;});return b;end)())or
- Torso:FindFirstChild'Left Shoulder',Torso:FindFirstChild'Neck',(not Set_Up_1.Motor6d_Enabled.
- Right_Leg and(function()local a=Torso:FindFirstChild'Right Hip';if a then Remove(a)end;
- local b=Instance_2('Weld',{Part0=Torso;Part1=Right_Leg;Parent=Torso;});return b;end)())or
- Torso:FindFirstChild'Right Hip',(not Set_Up_1.Motor6d_Enabled.Right_Arm and(function()
- local a=Torso:FindFirstChild'Right Shoulder';if a then Remove(a)end;local b=Instance_2('Weld'
- ,{Part0=Torso;Part1=Right_Arm;Parent=Torso;});return b;end)())or Torso:FindFirstChild
- 'Right Shoulder',HRootPart:FindFirstChild'RootJoint';
- if not Left_Hip or not Left_Shoulder or not Neck or not Right_Hip or not Right_Shoulder or
- not RootJoint then return;end;local Joints={Left_Hip;Left_Shoulder;Neck;Right_Hip;RootJoint;
- Right_Shoulder};
- local CFrames,CFrame_Mode,Frames={
- ['Right Arm']={Idle={C0=CFrame.new(1,.5,0,-4.37113883e-08,0,1,0,.99999994,0,-1,0,-
- 4.37113883e-08);C1=CFrame.new(.199999809,.999998927,.200000763,-4.37113883e-08,0,1,-
- .642787457,.766044021,-2.80971335e-08,-.766044378,-.642787218,-3.34848664e-08);};Walking={C0=
- CFrame.new(1,.5,0,-4.37113883e-08,0,1,0,.99999994,0,-1,0,-4.37113883e-08);C1=CFrame.new(
- .400000066,.899999976,.100000009,-4.37113883e-08,0,1,-.965925813,.258818954,-4.22219593e-08,
- -.258819014,-.965925634,-1.13133387e-08);};Walk_Step_F={C0=CFrame.new(1,.5,0,-4.37113883e-08,
- 0,1,0,.99999994,0,-1,0,-4.37113883e-08);C1=CFrame.new(.400000095,.904785037,-.0784164071,-
- 4.37113883e-08,0,1,-.98480773,-.173647895,-4.30473115e-08,.17364797,-.984807312,7.59039409e-09)
- ;};Walk_Step_B={C0=CFrame.new(1,.5,0,-4.37113883e-08,0,1,0,.99999994,0,-1,0,-4.37113883e-08);C1
- =CFrame.new(.400000095,.82026124,.259678245,-4.37113883e-08,0,1,-.76604408,.642787397,-
- 3.34848487e-08,-.642787933,-.766043603,-2.8097153e-08);};Jumpping={C0=CFrame.new(1,.5,0,-
- 4.37113883e-08,0,1,0,.99999994,0,-1,0,-4.37113883e-08);C1= CFrame.new(-.0307519436,.663428426,
- .100000024,-.109381855,-.408217371,.906307697,-.234570041,-.875424922,-.42261824,.965925574,-
- .258818984,4.22219486e-08);};
- };
- ['Left Arm']={Idle={C0=CFrame.new(-1,.5,0,-4.37113883e-08,0,-1,0,.99999994,0,1,0,-
- 4.37113883e-08);C1=CFrame.new(-.199999988,1,.200000003,-4.37113883e-08,0,-1,.642787635,
- .766044021,-2.80971406e-08,.766044378,-.642787158,-3.34848629e-08);};Walking={C0=CFrame.new(-
- 1,.5,0,-4.37113883e-08,0,-1,0,.99999994,0,1,0,-4.37113883e-08);C1=CFrame.new(-.399999976,
- .900000036,.0999999791,-4.37113883e-08,0,-1,.965925813,.258818924,-4.22219593e-08,.258819014,-
- .965925515,-1.13133387e-08)};Walk_Step_F={C0=CFrame.new(-1,.5,0,-4.37113883e-08,0,-1,0,
- .99999994,0,1,0,-4.37113883e-08);C1=CFrame.new(-.399999976,.904784918,-.0784164667,-
- 4.37113883e-08,0,-1,.98480773,-.173647866,-4.30473115e-08,-.17364797,-.984807193,7.59039409e-09
- );};Walk_Step_B={C0=CFrame.new(-1,.5,0,-4.37113883e-08,0,-1,0,.99999994,0,1,0,-4.37113883e-08);
- C1= CFrame.new(-.399999976,.820261121,.259678125,-4.37113883e-08,0,-1,.76604408,.642787218,-
- 3.34848487e-08,.642787874,-.766043365,-2.80971495e-08);};Jumpping={C0=CFrame.new(-1,.5,0,-
- 4.37113883e-08,0,-1,0,.99999994,0,1,0,-4.37113883e-08);C1=CFrame.new(.0307520628,.663428366,
- .100000232,-.109381832,.408217221,-.906307697,.234569982,-.875424564,-.42261824,-.965925574,-
- .258818835,4.22219486e-08);};
- };
- ['Right Leg']={Idle={C0=CFrame.new(1,-1,0,-4.37113883e-08,0,1,0,.99999994,0,-1,0,-
- 4.37113883e-08);C1=CFrame.new(.301519275,.659259915,.0670924783,-.467662066,-.171838373,
- .867043018,-.779412746,-.382490724,-.496201962,.416902781,-.907838762,.0449434184);};Walking={
- C0=CFrame.new(1,-1,0,-4.37113883e-08,0,1,0,.99999994,0,-1,0,-4.37113883e-08);C1=CFrame.new(
- .5,.599999964,.200000003,-4.37113883e-08,0,1,-.965925813,.258818954,-4.22219593e-08,-
- .258819014,-.965925634,-1.13133387e-08);};Walk_Step_F={C0=CFrame.new(1,-1,0,-4.37113883e-08,0,1,
- 0,.99999994,0,-1,0,-4.37113883e-08);C1=CFrame.new(.5,.692526817,.324746668,-4.37113883e-08,0,1,-
- .996194661,-.0871553421,-4.35450502e-08,.0871553496,-.996194243,3.80968146e-09);};Walk_Step_B=
- {C0=CFrame.new(1,-1,0,-4.37113883e-08,0,1,0,.99999994,0,-1,0,-4.37113883e-08);C1=CFrame.new(
- .5,.552953005,.0122141838,-4.37113883e-08,0,1,-.76604408,.642787337,-3.34848487e-08,-
- .642787814,-.766043603,-2.80971477e-08);};Jumpping={C0=CFrame.new(1,-1,0,-4.37113883e-08,0,1,0,
- .99999994,0,-1,0,-4.37113883e-08);C1= CFrame.new(.448476374,.80779475,.0653932318,1.12914371e-08
- ,.173647955,.98480773,3.15760758e-07,.984806478,-.173648179,-.999999821,2.53319655e-07,-
- 4.37113812e-08);};
- };
- ['Left Leg']={Idle={C0=CFrame.new(-1,-1,0,-4.37113883e-08,0,-1,0,.99999994,0,1,0,-
- 4.37113883e-08);C1=CFrame.new(-.301519185,.659259558,.0670924783,-.467662066,.171838388,-
- .867043078,.779412687,-.382490844,-.496201962,-.4169029,-.907838583,.0449434742);};Walking={C0=
- CFrame.new(-1,-1,0,-4.37113883e-08,0,-1,0,.99999994,0,1,0,-4.37113883e-08);C1=CFrame.new(-
- .5,.599999964,.200000003,-4.37113883e-08,0,-1,.965925813,.258818895,-4.22219593e-08,.258819014,
- -.965925395,-1.13133387e-08);};Walk_Step_F={C0=CFrame.new(-1,-1,0,-4.37113883e-08,0,-1,0,
- .99999994,0,1,0,-4.37113883e-08);C1= CFrame.new(-.5,.692527056,.32474649,-4.37113883e-08,0,-1,
- .99619472,-.0871556029,-4.35450538e-08,-.0871556699,-.996193945,3.80969523e-09);};Walk_Step_B=
- {C0=CFrame.new(-1,-1,0,-4.37113883e-08,0,-1,0,.99999994,0,1,0,-4.37113883e-08);C1=CFrame.new(-
- .5,.552953362,.0122141838,-4.37113883e-08,0,-1,.766044378,.64278692,-3.34848629e-08,.642787695,
- -.766043603,-2.80971424e-08);};Jumpping={C0=CFrame.new(-1,-1,0,-4.37113883e-08,0,-1,0,.99999994,
- 0,1,0,-4.37113883e-08);C1= CFrame.new(-.448476404,.807795107,.0653935894,-3.78721907e-08,-
- .17364791,-.98480773,-3.69399586e-08,.98480624,-.173648179,1,-5.96046341e-08,-4.37113883e-08);};
- };
- Head={Idle={C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,0);C1=CFrame.new(0,-.5,0,-1,0,0,0,.422618032,
- .906307876,0,.906307876,-.422618032)};Walking={C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,0);C1=
- CFrame.new(0,-.699999988,-.199999973,-1,0,0,0,.965925753,.258819073,0,.258819073,-.965925753);};
- Jumpping={C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,0);C1=CFrame.new(0,-.699999988,-.199999973,-1,0,
- 0,0,.965925753,.258819073,0,.258819073,-.965925753);};
- };
- Torso={Idle={C0=CFrame.new(0,0,0,-1,0,0,0,0,1,0,1,0);C1=CFrame.new(0,1.54072285,.718450546,-1,
- 0,0,0,-.422617853,.906307936,0,.906307936,.422617853)};Walking={C0=CFrame.new(0,0,0,-1,0,0,0,0,1
- ,0,1,0);C1=CFrame.new(0,.0776481628,1.35229492,-.99999994,0,0,0,-.965925813,.258819014,0,
- .258819014,.965925813)};Jumpping={C0=CFrame.new(0,0,0,-1,0,0,0,0,1,0,1,0);C1=CFrame.new(0,
- .0776481628,1.35229492,-.99999994,0,0,0,-.965925813,.258819014,0,.258819014,.965925813);};
- Climbing={C0=CFrame.new(0,0,0,-1,0,0,0,0,1,0,1,0);C1=CFrame.new(0,0,0,-.999999881,0,0,0,
- .258819014,.965925753,0,.965925753,-.258819014);};
- };},{['Right Arm']='Idle';['Left Arm']='Idle';['Right Leg']='Idle';['Left Leg']='Idle';Head=
- 'Idle';Torso='Idle';},{WalkFrame=0};
- local Change_Mode=function(t_1,mode)for _,a in pairs(t_1)do CFrame_Mode[a]=mode;end;end;
- (function()--[[Appearence]]local a=pchar:FindFirstChildWhichIsA'Shirt'or Instance_2('Shirt',{
- Parent=pchar;});if Set_Up_1.Shirt_Asset==true then elseif Set_Up_1.Shirt_Asset then
- a.ShirtTemplate=Asset_Prefix..Set_Up_1.Shirt_Asset;else Remove(a);end;
- local a=pchar:FindFirstChildWhichIsA'Pants'or Instance_2('Pants',{Parent=pchar;});
- if Set_Up_1.Pants_Asset==true then elseif Set_Up_1.Pants_Asset then
- a.Pants=Asset_Prefix..Set_Up_1.Pants_Asset;else Remove(a);end;
- if #Set_Up_1.Customized_Face_Ids~=0 then for _,a in pairs(Head:GetChildren())do
- if a:IsA'Decal'then Remove(a);end;end;for _,a in pairs(Set_Up_1.Customized_Face_Ids)do
- local b=(typeof(a)=='table'and a)or{Color3=Color3.fromRGB(255,255,255);Transparency=0;Texture=
- Asset_Prefix..tostring(a)};b.Parent=Head;b.Face='Front';Instance_2('Decal',b);end;end;
- for a,b in pairs(Set_Up_1.Destroy_Accessories)do if b then
- for _,c in pairs(pchar:GetChildren())do(function()if not c:IsA'Accessory'then return;end;
- local d=c:FindFirstChildWhichIsA('Attachment',true);if not d then return;end;if a~=d.Name then
- return;end;c:Destroy();end)();end;end;end;if Set_Up_1.Destroy_Character_Meshes then
- for _,a in pairs(pchar:GetChildren())do if a:IsA'CharacterMesh'then Remove(a);end;end;end;
- end)();
- local function Animation(cfs,In_Action)for _,c in pairs(Joints)do for a,b in pairs(cfs)do
- if c.Part1.Name==a then for d,e in pairs(b)do if In_Action[a]==d then
- 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;
- local function ServerHandler(pl,...)local args={...};end;local function Movement_Mode(arg1)
- if arg1=='Walking'then local a=Frames.WalkFrame%20;
- if a==0 or a==10 then Change_Mode({'Left Arm';'Torso';'Head';'Right Arm';'Left Leg';'Right Leg';},'Walking');
- elseif a==5 then Change_Mode({'Left Arm';'Left Leg';},'Walk_Step_B');
- Change_Mode({'Right Arm';'Right Leg';},'Walk_Step_F');elseif a==15 then
- Change_Mode({'Left Arm';'Left Leg';},'Walk_Step_F');Change_Mode({'Right Arm';'Right Leg';},'Walk_Step_B');
- end;elseif arg1=='Idle'or arg1=='Sitting'then
- Change_Mode({'Left Arm';'Torso';'Head';'Right Arm';'Left Leg';'Right Leg';},'Idle');
- elseif arg1=='Jumpping'or arg1=='Falling'then
- Change_Mode({'Left Arm';'Torso';'Head';'Right Arm';'Left Leg';'Right Leg';},'Jumpping');
- elseif arg1=='Idle_Climb'then
- Change_Mode({'Left Arm';'Head';'Right Arm';'Left Leg';'Right Leg';},
- 'Walking');Change_Mode({'Torso'},'Climbing');elseif arg1=='Moving_Climb'then local a=Frames.WalkFrame%20;
- if a==0 or a==10 then Change_Mode({'Left Arm';'Head';'Right Arm';'Left Leg';'Right Leg';},'Walking');
- elseif a==5 then Change_Mode({'Left Arm';'Left Leg';},'Walk_Step_B');
- Change_Mode({'Right Arm';'Right Leg';},'Walk_Step_F');elseif a==15 then
- Change_Mode({'Left Arm';'Left Leg';},'Walk_Step_F');Change_Mode({'Right Arm';'Right Leg';},'Walk_Step_B');
- end;end;end;
- Humanoid.MaxHealth=Set_Up_1.Health or 100;Humanoid.WalkSpeed=Set_Up_1.WalkSpeed or 16;
- Humanoid.JumpPower=Set_Up_1.JumpPower or 50;Humanoid.Health=Humanoid.MaxHealth;cwrap(function()
- while true do wait();Animation(CFrames,CFrame_Mode);end;end);cwrap(function()while true do
- local velo=Torso.Velocity;for a in pairs(Frames)do Frames[a]=Frames[a]+1;end;local HState=Humanoid:GetState();
- Movement_Mode((Humanoid.Sit==true and'Sitting')or(velo.Y>Set_Up_1.Movement_Range and Humanoid.
- FloorMaterial==Enum.Material.Air and HState~=Enum.HumanoidStateType.Climbing and'Jumpping')or(velo.Y<-
- Set_Up_1.Movement_Range and Humanoid.FloorMaterial==Enum.Material.Air and HState~=
- Enum.HumanoidStateType.Climbing and'Falling')or((velo.X>Set_Up_1.Movement_Range or velo.X<-
- Set_Up_1.Movement_Range or velo.Z>Set_Up_1.Movement_Range or velo.Z<-Set_Up_1.Movement_Range)and'Walking')
- or(HState==Enum.HumanoidStateType.Climbing and not(velo.Y>Set_Up_1.Movement_Range or velo.Y<-
- Set_Up_1.Movement_Range)and'Idle_Climb')or(HState==Enum.HumanoidStateType.Climbing and(velo.Y>
- Set_Up_1.Movement_Range or velo.Y<-Set_Up_1.Movement_Range)and'Moving_Climb')or'Idle');wait();end;end);
- RE.OnServerEvent:Connect(ServerHandler);RF.OnServerInvoke=ServerHandler;
- end;
- Set_Up_Function'FindPlayer';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement