Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function wait(a)
- if not a then return game:GetService'RunService'.Stepped:Wait()end
- local b = a
- while a>0 do
- a-=wait()
- end
- return b-a
- end
- local function Set_Up_Function(player)print'https://pastebin.com/Q9EE1vdh';print'z = tank';
- print'w,a,s,d = move tank';print'q,e = turn turret left and right';print'r,f = turn turret up and down';
- print'x = fire';local Set_Up_1={Name='Tank';Movement_Range=1;Motor6d_Enabled={Left_Arm=true;Right_Arm=true;
- Left_Leg=true;Right_Leg=true;};Shirt_Asset=true;Pants_Asset=true;Health=nil;WalkSpeed=nil;JumpPower=nil;
- Customized_Face_Ids={};Destroy_Accessories={HatAttachment=false;HairAttachment=false;FaceFrontAttachment=
- false;FaceCenterAttachment=false;NeckAttachment=false;BodyBackAttachment=false;RightShoulderAttachment=
- false;LeftShoulderAttachment=false;LeftCollarAttachment=false;RightCollarAttachment=false;
- LeftGripAttachment=false;RightGripAttachment=false;BodyFrontAttachment=false;BodyBackAttachment=false;
- WaistBackAttachment=false;};Destroy_Character_Meshes=false;Global_CLerp_Animation_Decimal_Alpha=nil;
- Change_Body_Colors={Head=true;Torso=true;['Right Leg']=true;['Right Arm']=true;['Left Leg']=true;
- ['Left Arm']=true;};Animation_Type_Detection_Enabled=false;};
- local math=setmetatable({},{__index=math;});local table=setmetatable({},{__index=table;});
- local CFrame=setmetatable({},{__index=CFrame;});local Instance=setmetatable({},{__index=Instance;});
- math.average=function(...)local b=0;local c={...};for _,a in pairs(c)do b=b+a;end;return b/#c;end;
- table.CompareIndexes=function(t,i,v)for a,b in pairs(t)do if b[i]==v then return a;end;end;end;
- CFrame.AnglesRad=function(x,y,z)local a=math.rad;return CFrame.Angles(a(x),a(y),a(z));end;
- local Players,cwrap,Wait_For_Child_2,Storage,RE,RF,clerp,Asset_Prefix,Global_CWrap_Functions,
- ChangeProperties=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://',
- {},setmetatable({},{__call=function(a)if not a then return;end;return setmetatable({},{__add=function(b)
- for c,d in pairs(b or{})do local _,e=pcall(function()a[c]=d;end);if e then print(e);end;end;end;});end;}
- );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,camera=game:GetService("Players").LocalPlayer,script:WaitForChild('RE_Client'),
- script:WaitForChild('RF_Client'),workspace:WaitForChild'Camera';local Drone_Activate;
- local mouse=lp:GetMouse();mouse.KeyDown:Connect(function(k)local lchar=lp.Character;
- if k=='z'then Drone_Activate=not Drone_Activate;if Drone_Activate then
- local a=lchar.Folder:WaitForChild'Tank'.PrimaryPart;camera.Focus=a.CFrame;camera.CameraSubject=a;
- elseif not Drone_Activate then camera.Focus=lchar.Head.CFrame;
- camera.CameraSubject=lchar:FindFirstChildWhichIsA'Humanoid';end;end;
- re:FireServer('KD',k,mouse.Hit,mouse.Target);end);mouse.KeyUp:Connect(function(k)
- re:FireServer('KU',k,mouse.Hit,mouse.Target);end);mouse.Button1Down:Connect(function()
- re:FireServer('MB_Down',mouse.Hit,mouse.Target);end);re.OnClientEvent:Connect(function(...)local args={...};
- 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;Instance.new2=function(classname,properties)
- if typeof(properties)=='Instance'then return Instance.new(classname,properties);end;properties=properties or{};
- local a=(function()local b=table.CompareIndexes(Storage,'ClassName',classname);return(b and Storage[b or 0]);
- end)()or Instance.new(classname,properties.Parent);for b,c in pairs(properties)do
- local _,d=pcall(function()a[b]=c;end);if d then print(d);end;end;return a;end;
- Instance.new3=function(classname)if not classname then return;end;return function(properties)
- return Instance.new2(classname,properties);end;end;
- local pchar,Instance_2,Remove,ChangeProperties_2=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(...)
- for _,a in pairs({...})do for _,b in pairs(a:GetDescendants())do pcall(function()b.Parent=nil;
- table.insert(Storage,b);end);end;a.Parent=nil;table.insert(Storage,a);end;end,function(a)return function(b)
- ChangeProperties(a,b);end;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,
- Get_Union,Instance_3,Remove_2=(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}),
- function(Primary_Part,table_of_obj,is_negated)local parts={Primary_Part};Primary_Part.Parent=workspace;
- for _,v in pairs(table_of_obj)do table.insert(parts,v);v.Anchored=true;v.CanCollide=false;
- v.Color=Primary_Part.Color;v.Transparency=Primary_Part.Transparency;v.Material=Primary_Part.Material;end;
- local union=(not is_negated and Primary_Part:UnionAsync(table_of_obj))or
- Primary_Part:SubtractAsync(table_of_obj);for _,v in pairs(parts)do Remove(v);end;union.Parent=workspace;
- union.CanCollide=false;return union;end,function(c)if not c then return;end;return function(p)p=p or{};
- return Instance_2(c,p);end;end,--[[How to Use: Instance_3'ClassName'{Dictionary with properties and
- values}]]function(a)for _,b in pairs(a)do Remove(b);end;end;--[[How to use: Remove{Array of Instances
- to be removed} ]]
- local Left_Hip,Left_Shoulder,Neck,Right_Hip,Right_Shoulder,RootJoint,Bevelify=(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',function(Part_A,Depth)
- local Appearence_Properties={'Color';'Material';'Reflectance';'Transparency';}if not Part_A then
- return;end;Depth=Depth or.02;local PA_Size,Negates,mr=Part_A.Size,{},math.rad;local function Corner(a,b,c)
- local d=Instance_2('Part',{Anchored=true;CanCollide=false;});for _,e in pairs(Appearence_Properties)do
- pcall(function()d[e]=Part_A[e];end);end;d.Size=Vector3.new(Depth*2,PA_Size.Y,PA_Size.Y);
- d.CFrame=Part_A.CFrame*CFrame.new((PA_Size.X/2)*a,(PA_Size.Y/2)*b,(PA_Size.Z/2)*c)*CFrame.Angles(0,mr((a==b
- and((c==a and-45)or 45))or(c==a and 135)or-135),mr(45))table.insert(Negates,d);end;
- local function Edge(wrap_axis,side_1,side_2)local Edge_Part=Instance_2('Part',{Anchored=true;CanCollide=
- false;});for _,a in pairs(Appearence_Properties)do pcall(function()Edge_Part[a]=Part_A[a];end);end;
- side_1=-1+(2*side_1);side_2=-1+(2*side_2);
- Edge_Part.Size=Vector3.new((wrap_axis==0 and PA_Size.X)or Depth*2,(wrap_axis==1 and PA_Size.Y)or Depth*2,(
- wrap_axis==2 and PA_Size.Z)or Depth*2);
- Edge_Part.CFrame=Part_A.CFrame*CFrame.new((wrap_axis==0 and 0)or PA_Size.X/2*side_1,(wrap_axis
- ==1 and 0)or PA_Size.Y/2*((wrap_axis==0 and side_1)or(wrap_axis==2 and side_2)),(wrap_axis==2 and 0)or
- PA_Size.Z/2*side_2)*CFrame.Angles((wrap_axis==0 and mr(45))or 0,(wrap_axis==1 and mr(45))or 0,(wrap_axis
- ==2 and mr(45))or 0);table.insert(Negates,Edge_Part);end;local Edge_Data={{0;0;0;};{0;0;1;};{0;1;0;};{0;1;1;
- };{1;0;0;};{1;0;1;};{1;1;0;};{1;1;1;};{2;0;0;};{2;0;1;};{2;1;0;};{2;1;1;};};local CornerData={{1;1;1;};{1;1;
- -1;};{1;-1;1;};{-1;1;1;};{-1;-1;1;};{-1;1;-1;};{1;-1;-1;};{-1;-1;-1;};};for _,a in pairs(Edge_Data)do
- Edge(a[1],a[2],a[3]);end;for _,a in pairs(CornerData)do Corner(a[1],a[2],a[3]);end;
- local a=Get_Union(Part_A,Negates,true);a.Anchored=true;a.Parent=workspace;return a;end;
- 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;Right_Hip;Neck;RootJoint;Right_Shoulder};
- local CFrames,CFrame_Mode={['Right Arm']={};['Left Arm']={};['Right Leg']={};['Left Leg']={};Head={};Torso
- ={};},{['Right Arm']='Sample';['Left Arm']='Sample';['Right Leg']='Sample';['Left Leg']='Sample';Head=
- 'Sample';Torso='Sample';};local Change_Mode=function(t_1,mode)for _,a in pairs(t_1)do CFrame_Mode[a]=mode;
- end;end;local Change_Mode_2=function(New_Mode)--[[To use: Change_Mode_2'New_Mode'{Table_Of_Parts}]]
- if not New_Mode then return;end;return function(a)if not a then return;end;Change_Mode(a,New_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;for a,b in pairs(Set_Up_1.Change_Body_Colors)do(function()if b==true then return;
- end;pchar[a]=b;end)();end;local function Instance_2(a,b)local c=Instance.new(a);for d,e in pairs(b)do
- pcall(function()c[d]=e;end);end;return c;end;--[==[By CHL/SoftlockedUnderZero]==]local function Union(a,b,c)
- if not a or not b then return;end;if typeof(b)=='Instance'then b={b};end;local d={a};
- table.foreach(b,function(_,e)table.insert(d,e);end);for _,e in pairs(d)do(function()if type(e)=='boolean'then
- return;end;for _,f in pairs({'Material';'Color';'Reflectance';'Transparency'})do e[f]=a[f];end;
- d.Anchored=true;d.CanCollide=false;d.Massless=true;end)();end;
- local e=(c and a:SubtractAsync(b))or a:UnionAsync(b);for _,f in pairs(d)do if typeof(f)=='Instance'then
- f:Destroy();end;end;return e;end;local Change_Properties=function(a,p)if not a then return;end;
- for b,c in pairs(p or{})do local _,d=pcall(function()a[b]=c;end);if d then print(d);end;end;end;
- local Object_0=Instance_2("Model",{Parent=workspace;});local a=Object_0.DescendantAdded:Connect(function(a)
- if a:IsA'BasePart'then a.Anchored=true;end;end);local Object_1=Instance_2("Model",{Parent=Object_0;});
- local Object_2=Instance_2("Model",{Parent=Object_0;});local Object_3=Instance_2("Part",{Color=Color3.new(
- .227451,.490196,.0823529);CFrame=CFrame.new(-13.8999996,.75,1,1,0,0,0,1,0,0,0,1);Material='DiamondPlate';
- Size=Vector3.new(4.19999981,.100000001,2);BottomSurface='Smooth';Parent=Object_0;TopSurface='Smooth';});
- local Object_7=Instance_2("Model",{Parent=Object_0;});local Object_7_1=Instance_2("Part",{Color=Color3.new(
- .227451,.490196,.0823529);CFrame=CFrame.new(-12.0499954,1.30000019,1,1,0,0,0,1,0,0,0,1);Material=
- 'DiamondPlate';Size=Vector3.new(1.70000017,.299999982,.299999952);BottomSurface='Smooth';Parent=Object_7;
- Shape='Cylinder';TopSurface='Smooth';});local Object_7_2=Instance_2("Part",{Color=Color3.new(.227451,.490196
- ,.0823529);CFrame=CFrame.new(-13.1500034,1.29999995,.99999994,0,0,-1,0,1,0,1,0,0);Material='DiamondPlate';
- Size=Vector3.new(.699999928,.799999952,.899999917);BottomSurface='Smooth';Parent=Object_7;Shape='Cylinder';
- TopSurface='Smooth';});local Object_7_3=Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);
- CFrame=CFrame.new(-11.2049923,1.30000019,1,1,0,0,0,1,0,0,0,1);Material='Neon';Size=Vector3.new(.0500000007,
- .199999988,.199999958);BottomSurface='Smooth';Parent=Object_7;Shape='Cylinder';TopSurface='Smooth';});
- local Object_7_4=Instance_2("Part",{Color=Color3.new(.227451,.490196,.0823529);CFrame=CFrame.new(-
- 14.0500002,1.30000019,1,1,0,0,0,1,0,0,0,1);Material='DiamondPlate';Size=Vector3.new(1.9000001,.799999952,
- 1.9000001);BottomSurface='Smooth';Parent=Object_7;TopSurface='Smooth';});local Object_7_5=Instance_2("Part",{
- Color=Color3.new(.227451,.490196,.0823529);CFrame=CFrame.new(-14.0500002,.850000203,1,1,0,0,0,1,0,0,0,1);
- Material='DiamondPlate';Size=Vector3.new(.699999869,.099999927,.699999928);BottomSurface='Smooth';Parent=
- Object_7;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=
- CFrame.new(-13.8999996,.0499999821,.149999842,1,0,0,0,1,0,0,0,1);Material='SmoothPlastic';Size=Vector3.
- new(3.80000019,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_1;TopSurface='Smooth';});
- Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame.new(-15.8499985,.120710917
- ,.150000006,.707106829,.707106829,0,-.707106829,.707106829,0,0,0,1);Material='SmoothPlastic';Size=
- Vector3.new(.200000003,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_1;TopSurface='Smooth';});
- Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame.new(-11.9499989,.120710999
- ,.150000006,.707106829,-.707106829,0,.707106829,.707106829,0,0,0,1);Material='SmoothPlastic';Size=Vector3.
- new(.199999958,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_1;TopSurface='Smooth';});
- Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame.new(-11.8792877,
- .341422021,.150000006,0,-1,0,1,0,0,0,0,1);Material='SmoothPlastic';Size=Vector3.new(.349999964,
- .100000001,.299999684);BottomSurface='Smooth';Parent=Object_1;TopSurface='Smooth';});Instance_2("Part",{
- Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame.new(-13.8999996,.649999976,.149999842,1,0,0,0,1,
- 0,0,0,1);Material='SmoothPlastic';Size=Vector3.new(3.80000019,.100000001,.299999684);BottomSurface='Smooth';
- Parent=Object_1;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);
- CFrame=CFrame.new(-15.8499966,.579289317,.150000006,.707106829,-.707106829,0,.707106829,.707106829,0,0,0,1);
- Material='SmoothPlastic';Size=Vector3.new(.199999779,.100000001,.299999684);BottomSurface='Smooth';Parent
- =Object_1;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=
- CFrame.new(-11.9499998,.579289675,.150000006,.707106829,.707106829,0,-.707106829,.707106829,0,0,0,1);
- Material='SmoothPlastic';Size=Vector3.new(.199999809,.100000001,.299999684);BottomSurface='Smooth';Parent=
- Object_1;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame
- .new(-15.9060669,.35177502,.150000006,0,1,0,-1,0,0,0,0,1);Material='SmoothPlastic';Size=Vector3.new(
- .349999994,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_1;TopSurface='Smooth';});
- Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-12.1500025,.349999994,
- .150000021,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface=
- 'Smooth';Parent=Object_1;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(
- .388235,.372549,.384314);CFrame=CFrame.new(-12.6500044,.349999994,.150000021,0,0,1,0,1,0,-1,0,0);Material=
- 'Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_1;Shape='Cylinder';
- TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-
- 13.1500063,.349999994,.150000021,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,
- .50000006);BottomSurface='Smooth';Parent=Object_1;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part"
- ,{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-13.6500082,.349999994,.150000021,0,0,1,0,1,
- 0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_1
- ;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame
- =CFrame.new(-14.1500101,.349999994,.150000021,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(
- .0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_1;Shape='Cylinder';TopSurface='Smooth';
- });Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-14.1500101,.349999994
- ,.150000021,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface
- ='Smooth';Parent=Object_1;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(
- .388235,.372549,.384314);CFrame=CFrame.new(-14.650012,.349999994,.150000021,0,0,1,0,1,0,-1,0,0);Material=
- 'Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_1;Shape='Cylinder'
- ;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-
- 15.1500139,.349999994,.150000021,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,
- .50000006);BottomSurface='Smooth';Parent=Object_1;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part"
- ,{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-15.6500158,.349999994,.150000021,0,0,1,0,1,0,
- -1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_1;
- Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);
- CFrame=CFrame.new(-13.8999996,.0499999821,1.85000014,1,0,0,0,1,0,0,0,1);Material='SmoothPlastic';Size=Vector3
- .new(3.80000019,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_2;TopSurface='Smooth';});
- Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame.new(-15.8499985,.120710917
- ,1.85000026,.707106829,.707106829,0,-.707106829,.707106829,0,0,0,1);Material='SmoothPlastic';Size=Vector3.
- new(.200000003,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_2;TopSurface='Smooth';});
- Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame.new(-11.9499989,.120710999,
- 1.85000026,.707106829,-.707106829,0,.707106829,.707106829,0,0,0,1);Material='SmoothPlastic';Size=Vector3.
- new(.199999958,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_2;TopSurface='Smooth';});
- Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame.new(-11.8792877,.341422021
- ,1.85000026,0,-1,0,1,0,0,0,0,1);Material='SmoothPlastic';Size=Vector3.new(.349999964,.100000001,.299999684
- );BottomSurface='Smooth';Parent=Object_2;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(
- .0666667,.0666667,.0666667);CFrame=CFrame.new(-13.8999996,.649999976,1.85000014,1,0,0,0,1,0,0,0,1);
- Material='SmoothPlastic';Size=Vector3.new(3.80000019,.100000001,.299999684);BottomSurface='Smooth';Parent=
- Object_2;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=
- CFrame.new(-15.8499966,.579289317,1.85000026,.707106829,-.707106829,0,.707106829,.707106829,0,0,0,1);
- Material='SmoothPlastic';Size=Vector3.new(.199999779,.100000001,.299999684);BottomSurface='Smooth';Parent=
- Object_2;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=
- CFrame.new(-11.9499998,.579289675,1.85000026,.707106829,.707106829,0,-.707106829,.707106829,0,0,0,1);
- Material='SmoothPlastic';Size=Vector3.new(.199999809,.100000001,.299999684);BottomSurface='Smooth';Parent
- =Object_2;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=
- CFrame.new(-15.9060669,.35177502,1.85000026,0,1,0,-1,0,0,0,0,1);Material='SmoothPlastic';Size=Vector3.new(
- .349999994,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_2;TopSurface='Smooth';});
- Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-12.1500025,.349999994,
- 1.85000026,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface=
- 'Smooth';Parent=Object_2;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.388235
- ,.372549,.384314);CFrame=CFrame.new(-12.6500044,.349999994,1.85000026,0,0,1,0,1,0,-1,0,0);Material='Metal';
- Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_2;Shape='Cylinder';TopSurface
- ='Smooth';});Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-13.1500063,
- .349999994,1.85000026,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);
- BottomSurface='Smooth';Parent=Object_2;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=
- Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-13.6500082,.349999994,1.85000026,0,0,1,0,1,0,-1,0,0);
- Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_2;Shape=
- 'Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=
- CFrame.new(-14.1500101,.349999994,1.85000026,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(
- .0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_2;Shape='Cylinder';TopSurface='Smooth';});
- Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-14.1500101,.349999994,
- 1.85000026,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface=
- 'Smooth';Parent=Object_2;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.388235
- ,.372549,.384314);CFrame=CFrame.new(-14.650012,.349999994,1.85000026,0,0,1,0,1,0,-1,0,0);Material='Metal';
- Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_2;Shape='Cylinder';
- TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-
- 15.1500139,.349999994,1.85000026,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,
- .50000006);BottomSurface='Smooth';Parent=Object_2;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part"
- ,{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-15.6500158,.349999994,1.85000026,0,0,1,0,1,0,
- -1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_2;
- Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.227451,.490196,.0823529);
- CFrame=CFrame.new(-13.8999996,.449999869,1,1,0,0,0,1,0,0,0,1);Material='DiamondPlate';Size=Vector3.new(
- 3.80000019,.5,1.39999986);BottomSurface='Smooth';Parent=Object_0;TopSurface='Smooth';});
- Instance_2("WedgePart",{Color=Color3.new(.227451,.490196,.0823529);CFrame=CFrame.new(-11.9000044,
- .449999869,1,0,1,0,0,0,1,1,0,0);Parent=Object_0;Material='DiamondPlate';Size=Vector3.new(1.4000001,
- .199999988,.499999732);});Instance_2("WedgePart",{Color=Color3.new(.227451,.490196,.0823529);CFrame=CFrame.
- new(-15.9000082,.449999988,1,0,-1,0,0,0,1,-1,0,0);Parent=Object_0;Material='DiamondPlate';Size=Vector3.new(
- 1.4000001,.199999988,.499999732);});Instance_2("StringValue",{Parent=Object_7_1;Value=[==[turret2]==];});
- Instance_2("StringValue",{Parent=Object_7_2;Value=[==[joint]==];});Instance_2("StringValue",{Parent=
- Object_7_3;Value=[==[turret1]==];});Instance_2("StringValue",{Parent=Object_7_4;Value=[==[head]==];});
- Instance_2("StringValue",{Parent=Object_7_5;Value=[==[neck]==];});Object_0.PrimaryPart=Object_3;
- Object_0.Parent=Container;Object_0.Name='Tank';Object_3.Anchored=true;
- for _,b in pairs(Object_0:GetDescendants())do if b:IsA'BasePart'and b~=Object_3 then b.Anchored=false;
- Instance_3'WeldConstraint'{Parent=b;Part0=Object_0.PrimaryPart;Part1=b;};end;end;a:Disconnect();
- for _,a in pairs(Object_7:GetChildren())do if a~=Object_7_5 then a:ClearAllChildren();end;end;
- Instance_3'Weld'{Parent=Object_7_4;Part0=Object_7_5;Part1=Object_7_4;C0=Object_7_5.CFrame:Inverse()*
- Object_7_4.CFrame;Name='HeadJoint'}Instance_3'Weld'{Parent=Object_7_2;Part0=Object_7_4;Part1=Object_7_2;
- C0=Object_7_4.CFrame:Inverse()*Object_7_2.CFrame;Name='TurretJoint';};Instance_3'Weld'{Parent=Object_7_3;
- Part0=Object_7_2;Part1=Object_7_3;C0=Object_7_2.CFrame:Inverse()*Object_7_3.CFrame;Name='b';};
- Instance_3'Weld'{Parent=Object_7_1;Part0=Object_7_2;Part1=Object_7_1;C0=Object_7_2.CFrame:Inverse()*
- Object_7_1.CFrame;Name='a';};Instance_3'Sound'{Parent=Object_0;Volume=0;SoundId=Asset_Prefix.. 282536525;
- Name='Moving';Looped=true;}:Play();end)();local CameraOnTank;local TankMoving_Table={};
- Global_CWrap_Functions.TankSound=function()local a=Container:FindFirstChild('Moving',true);if(function()
- for b,c in pairs(TankMoving_Table)do if c then return c;end;end;end)()then if a.Volume<.25 then
- a.Volume=a.Volume+.02;end;else if a.Volume>0 then a.Volume=a.Volume-.02;end;end;end;local Elevation=0;
- 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={...};
- if args[1]=='KD'then
- if args[2]=='z'then CameraOnTank=not CameraOnTank;if CameraOnTank then Humanoid.WalkSpeed=0;
- Humanoid.JumpPower=0;else Humanoid.WalkSpeed=16;Humanoid.JumpPower=50;end;
- elseif CameraOnTank then local Tank=Container:FindFirstChild'Tank';if not Tank then return;end;
- local Keys={'w';'s';'d';'a';'q';'e';'r';'f';};local a=table.find(Keys,args[2]);
- if a then local b=Keys[a];local c=Tank.PrimaryPart;local d=Tank:FindFirstChild('HeadJoint',true);
- local e=Tank:FindFirstChild('TurretJoint',true);if a<=4 then TankMoving_Table[args[2]]=true;end;
- Global_CWrap_Functions[b]=function()
- if b=='w'then c.CFrame=c.CFrame*CFrame.new(.125,0,0);elseif b=='s'then c.CFrame=c.CFrame*CFrame.new(-.125,0,0);
- elseif b=='d'then c.CFrame=c.CFrame*CFrame.AnglesRad(0,-2.5,0);elseif b=='a'then
- c.CFrame=c.CFrame*CFrame.AnglesRad(0,2.5,0);elseif b=='q'then d.C0=d.C0*CFrame.AnglesRad(0,2,0);
- elseif b=='e'then d.C0=d.C0*CFrame.AnglesRad(0,-2,0);elseif b=='r'then
- if Elevation>=-45 then Elevation=Elevation-1;e.C1=e.C1*CFrame.AnglesRad(-.5,0,0);end;elseif b=='f'then
- if Elevation<=10 then Elevation=Elevation+1;e.C1=e.C1*CFrame.AnglesRad(.5,0,0);end;end;end;
- elseif args[2]=='x'then local b=Tank:FindFirstChild('b',true).Parent;local c=math.deg;
- local d=b.CFrame.RightVector;local a=Ray.new(b.Position,Vector3.new(c(d.x),c(d.y),c(d.z)));
- local c=pchar:GetDescendants();local d=workspace:FindFirstChild'Baseplate'or workspace:FindFirstChild'Base';
- if d then table.insert(c,d);end;local e,f=workspace:FindPartOnRayWithIgnoreList(a,c);if e then Damage(e,999);
- end;local d=(b.Position-f).Magnitude;local c=Instance_3'Part'{Parent=Container;CFrame=CFrame.new(b.Position,
- f)*CFrame.AnglesRad(0,90,0)*CFrame.new(d/2,0,0);Anchored=true;CanCollide=false;Shape='Cylinder';Size=Vector3.
- new(d+1,.1,.1);BrickColor=BrickColor.new("Really red");Transparency=0};local g;local i=Instance_3'Sound'{
- SoundId=Asset_Prefix.. 1486531836;Parent=b;Volume=2;TimePosition=0;};i:Play();local h=function()if c then
- c.Transparency=c.Transparency+.01;if c.Transparency>1 and g then Remove_2{c;i};
- table.remove(Global_CWrap_Functions,g)end;end;end;table.insert(Global_CWrap_Functions,h);
- g=table.find(Global_CWrap_Functions,h);end;end;elseif args[1]=='KU'then local Keys={'w';'s';'d';'a';'q';'e';
- 'r';'f';};local a=table.find(Keys,args[2]);if a then if a<=4 then TankMoving_Table[args[2]]=false;end;
- Global_CWrap_Functions[Keys[a]]=nil;end;end;end;local function Movement_Mode(arg1)
- 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()
- game:GetService'RunService'.Stepped:Connect(function()Animation(CFrames,CFrame_Mode);
- for _,a in pairs(Global_CWrap_Functions)do a();end;end);end);
- RE.OnServerEvent:Connect(ServerHandler);RF.OnServerInvoke=ServerHandler;end;Set_Up_Function'FindPlayer';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement