Advertisement
InTesting

It tanks time to make this

Jan 18th, 2020 (edited)
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 30.63 KB | None | 0 0
  1. local function wait(a)
  2. if not a then return game:GetService'RunService'.Stepped:Wait()end
  3. local b = a
  4. while a>0 do
  5.     a-=wait()
  6. end
  7. return b-a
  8. end
  9.  
  10. local function Set_Up_Function(player)print'https://pastebin.com/Q9EE1vdh';print'z = tank';
  11. print'w,a,s,d = move tank';print'q,e = turn turret left and right';print'r,f = turn turret up and down';
  12. print'x = fire';local Set_Up_1={Name='Tank';Movement_Range=1;Motor6d_Enabled={Left_Arm=true;Right_Arm=true;
  13. Left_Leg=true;Right_Leg=true;};Shirt_Asset=true;Pants_Asset=true;Health=nil;WalkSpeed=nil;JumpPower=nil;
  14. Customized_Face_Ids={};Destroy_Accessories={HatAttachment=false;HairAttachment=false;FaceFrontAttachment=
  15. false;FaceCenterAttachment=false;NeckAttachment=false;BodyBackAttachment=false;RightShoulderAttachment=
  16. false;LeftShoulderAttachment=false;LeftCollarAttachment=false;RightCollarAttachment=false;
  17. LeftGripAttachment=false;RightGripAttachment=false;BodyFrontAttachment=false;BodyBackAttachment=false;
  18. WaistBackAttachment=false;};Destroy_Character_Meshes=false;Global_CLerp_Animation_Decimal_Alpha=nil;
  19. Change_Body_Colors={Head=true;Torso=true;['Right Leg']=true;['Right Arm']=true;['Left Leg']=true;
  20. ['Left Arm']=true;};Animation_Type_Detection_Enabled=false;};
  21. local math=setmetatable({},{__index=math;});local table=setmetatable({},{__index=table;});
  22. local CFrame=setmetatable({},{__index=CFrame;});local Instance=setmetatable({},{__index=Instance;});
  23. math.average=function(...)local b=0;local c={...};for _,a in pairs(c)do b=b+a;end;return b/#c;end;
  24. table.CompareIndexes=function(t,i,v)for a,b in pairs(t)do if b[i]==v then return a;end;end;end;
  25. CFrame.AnglesRad=function(x,y,z)local a=math.rad;return CFrame.Angles(a(x),a(y),a(z));end;
  26. local Players,cwrap,Wait_For_Child_2,Storage,RE,RF,clerp,Asset_Prefix,Global_CWrap_Functions,
  27.     ChangeProperties=game:GetService("Players"),function(a)local b=coroutine.wrap(a);b();return b;end,
  28.     function(p,c,wt)wt=wt or 1/60;local a;if not p or not c then return;end;
  29.     if typeof(p)~='Instance'or typeof(c)~='string'then return;end;repeat a=p:FindFirstChild(c);wait(wt);
  30.     until a;return a;end,{},nil,nil,function(cf,goal,al)return cf:Lerp(goal,al);end,'rbxassetid://',
  31.     {},setmetatable({},{__call=function(a)if not a then return;end;return setmetatable({},{__add=function(b)
  32.     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;}
  33.     );player=(player=='FindPlayer'and(loadstring('return owner')()or Players:
  34. GetPlayerFromCharacter(script.Parent)))or player;script.Name=Set_Up_1.Name;if not player or not Players then
  35. return;end;if loadstring'return owner'()then pcall(function()local NLS;NLS=loadstring'return NLS'();
  36. NLS([[local lp,re,rf,camera=game:GetService("Players").LocalPlayer,script:WaitForChild('RE_Client'),
  37.     script:WaitForChild('RF_Client'),workspace:WaitForChild'Camera';local Drone_Activate;  
  38. local mouse=lp:GetMouse();mouse.KeyDown:Connect(function(k)local lchar=lp.Character;
  39. if k=='z'then Drone_Activate=not Drone_Activate;if Drone_Activate then
  40. local a=lchar.Folder:WaitForChild'Tank'.PrimaryPart;camera.Focus=a.CFrame;camera.CameraSubject=a;
  41. elseif not Drone_Activate then camera.Focus=lchar.Head.CFrame;
  42. camera.CameraSubject=lchar:FindFirstChildWhichIsA'Humanoid';end;end;
  43. re:FireServer('KD',k,mouse.Hit,mouse.Target);end);mouse.KeyUp:Connect(function(k)
  44. re:FireServer('KU',k,mouse.Hit,mouse.Target);end);mouse.Button1Down:Connect(function()
  45. re:FireServer('MB_Down',mouse.Hit,mouse.Target);end);re.OnClientEvent:Connect(function(...)local args={...};
  46. end);rf.OnClientInvoke=function(...)local args={...};if args[1]=='Get_Mouse_CF'then return mouse.Hit;
  47. elseif args[1]=='Get_Mouse_Target'then return mouse.Target;end;end;]],script);
  48. script.Parent=loadstring'return owner'().Character;end);end;Instance.new2=function(classname,properties)
  49. if typeof(properties)=='Instance'then return Instance.new(classname,properties);end;properties=properties or{};
  50. local a=(function()local b=table.CompareIndexes(Storage,'ClassName',classname);return(b and Storage[b or 0]);
  51. end)()or Instance.new(classname,properties.Parent);for b,c in pairs(properties)do
  52. local _,d=pcall(function()a[b]=c;end);if d then print(d);end;end;return a;end;
  53. Instance.new3=function(classname)if not classname then return;end;return function(properties)
  54. return Instance.new2(classname,properties);end;end;
  55. local pchar,Instance_2,Remove,ChangeProperties_2=player.Character or(function()repeat
  56. wait(1);player:LoadCharacter();until player.Character;return player.Character;end)(),function(c,p)
  57. local a=(function()for a,b in pairs(Storage)do if b.ClassName==c then table.remove(Storage,a);return b;
  58. end;end;end)()or Instance.new(c);if not a then print'No classname';return;end;for b,c in pairs(p)do
  59. local _,d= pcall(function()a[b]=c;end);if d then print(d);end;end;return a;end,function(...)
  60. for _,a in pairs({...})do for _,b in pairs(a:GetDescendants())do pcall(function()b.Parent=nil;
  61. table.insert(Storage,b);end);end;a.Parent=nil;table.insert(Storage,a);end;end,function(a)return function(b)
  62. ChangeProperties(a,b);end;end;if not pchar then return;end;local a=(function()
  63. if loadstring'return owner'()then return{Instance_2('RemoteEvent',{Name='RE_Client';
  64. Parent=script:GetChildren()[1];});Instance_2('RemoteFunction',{Name='RF_Client';Parent=script:GetChildren()
  65. [1];})};end;wait(2);return{script:FindFirstChildWhichIsA('RemoteEvent',true);script:
  66. FindFirstChildWhichIsA('RemoteFunction',true);}end)();RE,RF=unpack(a);if not RE or not RF then return;end;
  67. local Head,HRootPart,Torso,Humanoid,Left_Arm,Right_Arm,Left_Leg,Right_Leg,Damage,Container,
  68.     Get_Union,Instance_3,Remove_2=(function()local a;repeat a=pchar:FindFirstChild'Head';if a then break;
  69.     end;wait(1);until nil;return a;end)(),(function()local a;repeat
  70.     a=pchar:FindFirstChild'HumanoidRootPart';if a then break;end;wait(1);until nil;return a;end)(),(
  71.     function()local a;repeat a=pchar:FindFirstChild'Torso';if a then break;end;wait(1);until nil;return a;
  72. end)(),(function()local a;repeat a=pchar:FindFirstChildWhichIsA'Humanoid';if a then break;end;wait(1);
  73. until nil;return a;end)(),(function()local a;repeat a=pchar:FindFirstChild'Left Arm';if a then break;end;
  74. wait(1);until nil;return a;end)(),(function()local a;repeat a=pchar:FindFirstChild'Right Arm';if a then
  75. break;end;wait(1);until nil;return a;end)(),(function()local a;repeat a=pchar:FindFirstChild'Left Leg';
  76. if a then break;end;wait(1);until nil;return a;end)(),(function()local a;repeat
  77. a=pchar:FindFirstChild'Right Leg';if a then break;end;wait(1);until nil;return a;end)(),function(h,d,f)
  78. if not h then return;end;d=d or 10;f=f or function()end;local a=h:FindFirstAncestorWhichIsA'Model';
  79. if not a or a==workspace or a==pchar then return;end;
  80. local b,c=a:FindFirstChildWhichIsA'Humanoid',a:FindFirstChild'Head'or a:FindFirstChild'Torso'or a:
  81. FindFirstChild'UpperTorso'or a:FindFirstChild'HumanoidRootPart';
  82. if b then if b.Health>150 then b.Health=0;else b:TakeDamage(d);end;elseif c then Remove(c);else
  83. pcall(function()a:BreakJoints();end);end;end,Instance_2('Folder',{Parent=pchar}),
  84.     function(Primary_Part,table_of_obj,is_negated)local parts={Primary_Part};Primary_Part.Parent=workspace;
  85. for _,v in pairs(table_of_obj)do table.insert(parts,v);v.Anchored=true;v.CanCollide=false;
  86. v.Color=Primary_Part.Color;v.Transparency=Primary_Part.Transparency;v.Material=Primary_Part.Material;end;
  87. local union=(not is_negated and Primary_Part:UnionAsync(table_of_obj))or
  88.     Primary_Part:SubtractAsync(table_of_obj);for _,v in pairs(parts)do Remove(v);end;union.Parent=workspace;
  89. union.CanCollide=false;return union;end,function(c)if not c then return;end;return function(p)p=p or{};
  90. return Instance_2(c,p);end;end,--[[How to Use: Instance_3'ClassName'{Dictionary with properties and
  91.     values}]]function(a)for _,b in pairs(a)do Remove(b);end;end;--[[How to use: Remove{Array of Instances
  92. to be removed} ]]
  93. local Left_Hip,Left_Shoulder,Neck,Right_Hip,Right_Shoulder,RootJoint,Bevelify=(not Set_Up_1.
  94. Motor6d_Enabled.Left_Leg and(function()local a=Torso:FindFirstChild'Left Hip';if a then Remove(a)end;
  95. local b=Instance_2('Weld',{Part0=Torso;Part1=Left_Leg;Parent=Torso;});return b;end)())or Torso:
  96. FindFirstChild'Left Hip',(not Set_Up_1.Motor6d_Enabled.Left_Arm and(function()
  97. local a=Torso:FindFirstChild'Left Shoulder';if a then Remove(a)end;local b=Instance_2('Weld',{Part0=Torso;
  98. Part1=Left_Arm;Parent=Torso;});return b;end)())or Torso:FindFirstChild'Left Shoulder',Torso:
  99. FindFirstChild'Neck',(not Set_Up_1.Motor6d_Enabled.Right_Leg and(function()
  100. local a=Torso:FindFirstChild'Right Hip';if a then Remove(a)end;local b=Instance_2('Weld',{Part0=Torso;
  101. Part1=Right_Leg;Parent=Torso;});return b;end)())or Torso:FindFirstChild'Right Hip',(not Set_Up_1.
  102. Motor6d_Enabled.Right_Arm and(function()local a=Torso:FindFirstChild'Right Shoulder';if a then Remove(a);
  103. end;local b=Instance_2('Weld',{Part0=Torso;Part1=Right_Arm;Parent=Torso;});return b;end)())or Torso:
  104. FindFirstChild'Right Shoulder',HRootPart:FindFirstChild'RootJoint',function(Part_A,Depth)
  105. local Appearence_Properties={'Color';'Material';'Reflectance';'Transparency';}if not Part_A then
  106. return;end;Depth=Depth or.02;local PA_Size,Negates,mr=Part_A.Size,{},math.rad;local function Corner(a,b,c)
  107. local d=Instance_2('Part',{Anchored=true;CanCollide=false;});for _,e in pairs(Appearence_Properties)do
  108. pcall(function()d[e]=Part_A[e];end);end;d.Size=Vector3.new(Depth*2,PA_Size.Y,PA_Size.Y);
  109. 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
  110. and((c==a and-45)or 45))or(c==a and 135)or-135),mr(45))table.insert(Negates,d);end;
  111. local function Edge(wrap_axis,side_1,side_2)local Edge_Part=Instance_2('Part',{Anchored=true;CanCollide=
  112. false;});for _,a in pairs(Appearence_Properties)do pcall(function()Edge_Part[a]=Part_A[a];end);end;
  113. side_1=-1+(2*side_1);side_2=-1+(2*side_2);
  114. 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,(
  115.     wrap_axis==2 and PA_Size.Z)or Depth*2);
  116. Edge_Part.CFrame=Part_A.CFrame*CFrame.new((wrap_axis==0 and 0)or PA_Size.X/2*side_1,(wrap_axis
  117. ==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
  118.     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
  119. ==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;
  120. };{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;
  121. -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
  122. Edge(a[1],a[2],a[3]);end;for _,a in pairs(CornerData)do Corner(a[1],a[2],a[3]);end;
  123. local a=Get_Union(Part_A,Negates,true);a.Anchored=true;a.Parent=workspace;return a;end;
  124. if not Left_Hip or not Left_Shoulder or not Neck or not Right_Hip or not Right_Shoulder or not RootJoint
  125. then return;end;local Joints={Left_Hip;Left_Shoulder;Right_Hip;Neck;RootJoint;Right_Shoulder}; 
  126. local CFrames,CFrame_Mode={['Right Arm']={};['Left Arm']={};['Right Leg']={};['Left Leg']={};Head={};Torso
  127. ={};},{['Right Arm']='Sample';['Left Arm']='Sample';['Right Leg']='Sample';['Left Leg']='Sample';Head=
  128. 'Sample';Torso='Sample';};local Change_Mode=function(t_1,mode)for _,a in pairs(t_1)do CFrame_Mode[a]=mode;
  129. end;end;local Change_Mode_2=function(New_Mode)--[[To use: Change_Mode_2'New_Mode'{Table_Of_Parts}]]
  130. if not New_Mode then return;end;return function(a)if not a then return;end;Change_Mode(a,New_Mode);end;
  131. end;(function()--[[Appearence]]local a=pchar:FindFirstChildWhichIsA'Shirt'or Instance_2('Shirt',{Parent=
  132. pchar;});if Set_Up_1.Shirt_Asset==true then elseif Set_Up_1.Shirt_Asset then
  133. a.ShirtTemplate=Asset_Prefix..Set_Up_1.Shirt_Asset;else Remove(a);end;
  134. local a=pchar:FindFirstChildWhichIsA'Pants'or Instance_2('Pants',{Parent=pchar;});
  135. if Set_Up_1.Pants_Asset==true then elseif Set_Up_1.Pants_Asset then
  136. a.Pants=Asset_Prefix..Set_Up_1.Pants_Asset;else Remove(a);end;if #Set_Up_1.Customized_Face_Ids~=0 then
  137. for _,a in pairs(Head:GetChildren())do if a:IsA'Decal'then Remove(a);end;end;
  138. for _,a in pairs(Set_Up_1.Customized_Face_Ids)do
  139. local b=(typeof(a)=='table'and a)or{Color3=Color3.fromRGB(255,255,255);Transparency=0;Texture=
  140.     Asset_Prefix..tostring(a)};b.Parent=Head;b.Face='Front';Instance_2('Decal',b);end;end;
  141. for a,b in pairs(Set_Up_1.Destroy_Accessories)do if b then for _,c in pairs(pchar:GetChildren())do
  142. (function()if not c:IsA'Accessory'then return;end;local d=c:FindFirstChildWhichIsA('Attachment',true);
  143. if not d then return;end;if a~=d.Name then return;end;c:Destroy();end)();end;end;end;
  144. if Set_Up_1.Destroy_Character_Meshes then for _,a in pairs(pchar:GetChildren())do if a:IsA'CharacterMesh'then
  145. Remove(a);end;end;end;for a,b in pairs(Set_Up_1.Change_Body_Colors)do(function()if b==true then return;
  146. end;pchar[a]=b;end)();end;local function Instance_2(a,b)local c=Instance.new(a);for d,e in pairs(b)do  
  147. pcall(function()c[d]=e;end);end;return c;end;--[==[By CHL/SoftlockedUnderZero]==]local function Union(a,b,c)
  148. if not a or not b then return;end;if typeof(b)=='Instance'then b={b};end;local d={a};
  149. table.foreach(b,function(_,e)table.insert(d,e);end);for _,e in pairs(d)do(function()if type(e)=='boolean'then
  150. return;end;for _,f in pairs({'Material';'Color';'Reflectance';'Transparency'})do e[f]=a[f];end;
  151. d.Anchored=true;d.CanCollide=false;d.Massless=true;end)();end;
  152. local e=(c and a:SubtractAsync(b))or a:UnionAsync(b);for _,f in pairs(d)do if typeof(f)=='Instance'then
  153. f:Destroy();end;end;return e;end;local Change_Properties=function(a,p)if not a then return;end;
  154. for b,c in pairs(p or{})do local _,d=pcall(function()a[b]=c;end);if d then print(d);end;end;end;       
  155. local Object_0=Instance_2("Model",{Parent=workspace;});local a=Object_0.DescendantAdded:Connect(function(a)
  156. if a:IsA'BasePart'then a.Anchored=true;end;end);local Object_1=Instance_2("Model",{Parent=Object_0;});
  157. local Object_2=Instance_2("Model",{Parent=Object_0;});local Object_3=Instance_2("Part",{Color=Color3.new(
  158. .227451,.490196,.0823529);CFrame=CFrame.new(-13.8999996,.75,1,1,0,0,0,1,0,0,0,1);Material='DiamondPlate';
  159. Size=Vector3.new(4.19999981,.100000001,2);BottomSurface='Smooth';Parent=Object_0;TopSurface='Smooth';});
  160. local Object_7=Instance_2("Model",{Parent=Object_0;});local Object_7_1=Instance_2("Part",{Color=Color3.new(
  161. .227451,.490196,.0823529);CFrame=CFrame.new(-12.0499954,1.30000019,1,1,0,0,0,1,0,0,0,1);Material=
  162. 'DiamondPlate';Size=Vector3.new(1.70000017,.299999982,.299999952);BottomSurface='Smooth';Parent=Object_7;
  163. Shape='Cylinder';TopSurface='Smooth';});local Object_7_2=Instance_2("Part",{Color=Color3.new(.227451,.490196
  164. ,.0823529);CFrame=CFrame.new(-13.1500034,1.29999995,.99999994,0,0,-1,0,1,0,1,0,0);Material='DiamondPlate';
  165. Size=Vector3.new(.699999928,.799999952,.899999917);BottomSurface='Smooth';Parent=Object_7;Shape='Cylinder';
  166. TopSurface='Smooth';});local Object_7_3=Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);
  167. CFrame=CFrame.new(-11.2049923,1.30000019,1,1,0,0,0,1,0,0,0,1);Material='Neon';Size=Vector3.new(.0500000007,
  168. .199999988,.199999958);BottomSurface='Smooth';Parent=Object_7;Shape='Cylinder';TopSurface='Smooth';});
  169. local Object_7_4=Instance_2("Part",{Color=Color3.new(.227451,.490196,.0823529);CFrame=CFrame.new(-
  170. 14.0500002,1.30000019,1,1,0,0,0,1,0,0,0,1);Material='DiamondPlate';Size=Vector3.new(1.9000001,.799999952,
  171. 1.9000001);BottomSurface='Smooth';Parent=Object_7;TopSurface='Smooth';});local Object_7_5=Instance_2("Part",{
  172. Color=Color3.new(.227451,.490196,.0823529);CFrame=CFrame.new(-14.0500002,.850000203,1,1,0,0,0,1,0,0,0,1);
  173. Material='DiamondPlate';Size=Vector3.new(.699999869,.099999927,.699999928);BottomSurface='Smooth';Parent=
  174. Object_7;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=
  175. CFrame.new(-13.8999996,.0499999821,.149999842,1,0,0,0,1,0,0,0,1);Material='SmoothPlastic';Size=Vector3.
  176. new(3.80000019,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_1;TopSurface='Smooth';});
  177. Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame.new(-15.8499985,.120710917
  178. ,.150000006,.707106829,.707106829,0,-.707106829,.707106829,0,0,0,1);Material='SmoothPlastic';Size=
  179. Vector3.new(.200000003,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_1;TopSurface='Smooth';});
  180. Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame.new(-11.9499989,.120710999
  181. ,.150000006,.707106829,-.707106829,0,.707106829,.707106829,0,0,0,1);Material='SmoothPlastic';Size=Vector3.
  182. new(.199999958,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_1;TopSurface='Smooth';});
  183. Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame.new(-11.8792877,
  184. .341422021,.150000006,0,-1,0,1,0,0,0,0,1);Material='SmoothPlastic';Size=Vector3.new(.349999964,
  185. .100000001,.299999684);BottomSurface='Smooth';Parent=Object_1;TopSurface='Smooth';});Instance_2("Part",{
  186. Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame.new(-13.8999996,.649999976,.149999842,1,0,0,0,1,
  187. 0,0,0,1);Material='SmoothPlastic';Size=Vector3.new(3.80000019,.100000001,.299999684);BottomSurface='Smooth';
  188. Parent=Object_1;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);
  189. CFrame=CFrame.new(-15.8499966,.579289317,.150000006,.707106829,-.707106829,0,.707106829,.707106829,0,0,0,1);
  190. Material='SmoothPlastic';Size=Vector3.new(.199999779,.100000001,.299999684);BottomSurface='Smooth';Parent
  191. =Object_1;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=
  192. CFrame.new(-11.9499998,.579289675,.150000006,.707106829,.707106829,0,-.707106829,.707106829,0,0,0,1);
  193. Material='SmoothPlastic';Size=Vector3.new(.199999809,.100000001,.299999684);BottomSurface='Smooth';Parent=
  194. Object_1;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame
  195. .new(-15.9060669,.35177502,.150000006,0,1,0,-1,0,0,0,0,1);Material='SmoothPlastic';Size=Vector3.new(
  196. .349999994,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_1;TopSurface='Smooth';});
  197. Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-12.1500025,.349999994,
  198. .150000021,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface=
  199. 'Smooth';Parent=Object_1;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(
  200. .388235,.372549,.384314);CFrame=CFrame.new(-12.6500044,.349999994,.150000021,0,0,1,0,1,0,-1,0,0);Material=
  201. 'Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_1;Shape='Cylinder';
  202. TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-
  203. 13.1500063,.349999994,.150000021,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,
  204. .50000006);BottomSurface='Smooth';Parent=Object_1;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part"
  205. ,{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-13.6500082,.349999994,.150000021,0,0,1,0,1,
  206. 0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_1
  207. ;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame
  208. =CFrame.new(-14.1500101,.349999994,.150000021,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(
  209. .0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_1;Shape='Cylinder';TopSurface='Smooth';
  210. });Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-14.1500101,.349999994
  211. ,.150000021,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface
  212. ='Smooth';Parent=Object_1;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(
  213. .388235,.372549,.384314);CFrame=CFrame.new(-14.650012,.349999994,.150000021,0,0,1,0,1,0,-1,0,0);Material=
  214. 'Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_1;Shape='Cylinder'
  215. ;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-
  216. 15.1500139,.349999994,.150000021,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,
  217. .50000006);BottomSurface='Smooth';Parent=Object_1;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part"
  218. ,{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-15.6500158,.349999994,.150000021,0,0,1,0,1,0,
  219. -1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_1;
  220. Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);
  221. CFrame=CFrame.new(-13.8999996,.0499999821,1.85000014,1,0,0,0,1,0,0,0,1);Material='SmoothPlastic';Size=Vector3
  222. .new(3.80000019,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_2;TopSurface='Smooth';});
  223. Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame.new(-15.8499985,.120710917
  224. ,1.85000026,.707106829,.707106829,0,-.707106829,.707106829,0,0,0,1);Material='SmoothPlastic';Size=Vector3.
  225. new(.200000003,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_2;TopSurface='Smooth';});
  226. Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame.new(-11.9499989,.120710999,
  227. 1.85000026,.707106829,-.707106829,0,.707106829,.707106829,0,0,0,1);Material='SmoothPlastic';Size=Vector3.
  228. new(.199999958,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_2;TopSurface='Smooth';});
  229. Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=CFrame.new(-11.8792877,.341422021
  230. ,1.85000026,0,-1,0,1,0,0,0,0,1);Material='SmoothPlastic';Size=Vector3.new(.349999964,.100000001,.299999684
  231. );BottomSurface='Smooth';Parent=Object_2;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(
  232. .0666667,.0666667,.0666667);CFrame=CFrame.new(-13.8999996,.649999976,1.85000014,1,0,0,0,1,0,0,0,1);
  233. Material='SmoothPlastic';Size=Vector3.new(3.80000019,.100000001,.299999684);BottomSurface='Smooth';Parent=
  234. Object_2;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=
  235. CFrame.new(-15.8499966,.579289317,1.85000026,.707106829,-.707106829,0,.707106829,.707106829,0,0,0,1);
  236. Material='SmoothPlastic';Size=Vector3.new(.199999779,.100000001,.299999684);BottomSurface='Smooth';Parent=
  237. Object_2;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=
  238. CFrame.new(-11.9499998,.579289675,1.85000026,.707106829,.707106829,0,-.707106829,.707106829,0,0,0,1);
  239. Material='SmoothPlastic';Size=Vector3.new(.199999809,.100000001,.299999684);BottomSurface='Smooth';Parent
  240. =Object_2;TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.0666667,.0666667,.0666667);CFrame=
  241. CFrame.new(-15.9060669,.35177502,1.85000026,0,1,0,-1,0,0,0,0,1);Material='SmoothPlastic';Size=Vector3.new(
  242. .349999994,.100000001,.299999684);BottomSurface='Smooth';Parent=Object_2;TopSurface='Smooth';});
  243. Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-12.1500025,.349999994,
  244. 1.85000026,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface=
  245. 'Smooth';Parent=Object_2;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.388235
  246. ,.372549,.384314);CFrame=CFrame.new(-12.6500044,.349999994,1.85000026,0,0,1,0,1,0,-1,0,0);Material='Metal';
  247. Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_2;Shape='Cylinder';TopSurface
  248. ='Smooth';});Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-13.1500063,
  249. .349999994,1.85000026,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);
  250. BottomSurface='Smooth';Parent=Object_2;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=
  251. Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-13.6500082,.349999994,1.85000026,0,0,1,0,1,0,-1,0,0);
  252. Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_2;Shape=
  253. 'Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=
  254. CFrame.new(-14.1500101,.349999994,1.85000026,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(
  255. .0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_2;Shape='Cylinder';TopSurface='Smooth';});
  256. Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-14.1500101,.349999994,
  257. 1.85000026,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface=
  258. 'Smooth';Parent=Object_2;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.388235
  259. ,.372549,.384314);CFrame=CFrame.new(-14.650012,.349999994,1.85000026,0,0,1,0,1,0,-1,0,0);Material='Metal';
  260. Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_2;Shape='Cylinder';
  261. TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-
  262. 15.1500139,.349999994,1.85000026,0,0,1,0,1,0,-1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,
  263. .50000006);BottomSurface='Smooth';Parent=Object_2;Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part"
  264. ,{Color=Color3.new(.388235,.372549,.384314);CFrame=CFrame.new(-15.6500158,.349999994,1.85000026,0,0,1,0,1,0,
  265. -1,0,0);Material='Metal';Size=Vector3.new(.0999999493,.5,.50000006);BottomSurface='Smooth';Parent=Object_2;
  266. Shape='Cylinder';TopSurface='Smooth';});Instance_2("Part",{Color=Color3.new(.227451,.490196,.0823529);
  267. CFrame=CFrame.new(-13.8999996,.449999869,1,1,0,0,0,1,0,0,0,1);Material='DiamondPlate';Size=Vector3.new(
  268. 3.80000019,.5,1.39999986);BottomSurface='Smooth';Parent=Object_0;TopSurface='Smooth';});
  269. Instance_2("WedgePart",{Color=Color3.new(.227451,.490196,.0823529);CFrame=CFrame.new(-11.9000044,
  270. .449999869,1,0,1,0,0,0,1,1,0,0);Parent=Object_0;Material='DiamondPlate';Size=Vector3.new(1.4000001,
  271. .199999988,.499999732);});Instance_2("WedgePart",{Color=Color3.new(.227451,.490196,.0823529);CFrame=CFrame.
  272. new(-15.9000082,.449999988,1,0,-1,0,0,0,1,-1,0,0);Parent=Object_0;Material='DiamondPlate';Size=Vector3.new(
  273. 1.4000001,.199999988,.499999732);});Instance_2("StringValue",{Parent=Object_7_1;Value=[==[turret2]==];});
  274. Instance_2("StringValue",{Parent=Object_7_2;Value=[==[joint]==];});Instance_2("StringValue",{Parent=
  275. Object_7_3;Value=[==[turret1]==];});Instance_2("StringValue",{Parent=Object_7_4;Value=[==[head]==];});
  276. Instance_2("StringValue",{Parent=Object_7_5;Value=[==[neck]==];});Object_0.PrimaryPart=Object_3;
  277. Object_0.Parent=Container;Object_0.Name='Tank';Object_3.Anchored=true;
  278. for _,b in pairs(Object_0:GetDescendants())do if b:IsA'BasePart'and b~=Object_3 then b.Anchored=false;
  279. Instance_3'WeldConstraint'{Parent=b;Part0=Object_0.PrimaryPart;Part1=b;};end;end;a:Disconnect();
  280. for _,a in pairs(Object_7:GetChildren())do if a~=Object_7_5 then a:ClearAllChildren();end;end;
  281. Instance_3'Weld'{Parent=Object_7_4;Part0=Object_7_5;Part1=Object_7_4;C0=Object_7_5.CFrame:Inverse()*
  282. Object_7_4.CFrame;Name='HeadJoint'}Instance_3'Weld'{Parent=Object_7_2;Part0=Object_7_4;Part1=Object_7_2;
  283. C0=Object_7_4.CFrame:Inverse()*Object_7_2.CFrame;Name='TurretJoint';};Instance_3'Weld'{Parent=Object_7_3;
  284. Part0=Object_7_2;Part1=Object_7_3;C0=Object_7_2.CFrame:Inverse()*Object_7_3.CFrame;Name='b';};
  285. Instance_3'Weld'{Parent=Object_7_1;Part0=Object_7_2;Part1=Object_7_1;C0=Object_7_2.CFrame:Inverse()*
  286. Object_7_1.CFrame;Name='a';};Instance_3'Sound'{Parent=Object_0;Volume=0;SoundId=Asset_Prefix.. 282536525;
  287. Name='Moving';Looped=true;}:Play();end)();local CameraOnTank;local TankMoving_Table={};
  288. Global_CWrap_Functions.TankSound=function()local a=Container:FindFirstChild('Moving',true);if(function()
  289. for b,c in pairs(TankMoving_Table)do if c then return c;end;end;end)()then if a.Volume<.25 then
  290. a.Volume=a.Volume+.02;end;else if a.Volume>0 then a.Volume=a.Volume-.02;end;end;end;local Elevation=0;
  291. local function Animation(cfs,In_Action)for _,c in pairs(Joints)do for a,b in pairs(cfs)do
  292. if c.Part1.Name==a then for d,e in pairs(b)do if In_Action[a]==d then
  293. 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;
  294. local function ServerHandler(pl,...)local args={...};
  295. if args[1]=='KD'then
  296. if args[2]=='z'then CameraOnTank=not CameraOnTank;if CameraOnTank then Humanoid.WalkSpeed=0;
  297. Humanoid.JumpPower=0;else Humanoid.WalkSpeed=16;Humanoid.JumpPower=50;end;
  298. elseif CameraOnTank then local Tank=Container:FindFirstChild'Tank';if not Tank then return;end;
  299. local Keys={'w';'s';'d';'a';'q';'e';'r';'f';};local a=table.find(Keys,args[2]);
  300. if a then local b=Keys[a];local c=Tank.PrimaryPart;local d=Tank:FindFirstChild('HeadJoint',true);
  301. local e=Tank:FindFirstChild('TurretJoint',true);if a<=4 then TankMoving_Table[args[2]]=true;end;
  302. Global_CWrap_Functions[b]=function()
  303. 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);
  304. elseif b=='d'then c.CFrame=c.CFrame*CFrame.AnglesRad(0,-2.5,0);elseif b=='a'then
  305. c.CFrame=c.CFrame*CFrame.AnglesRad(0,2.5,0);elseif b=='q'then d.C0=d.C0*CFrame.AnglesRad(0,2,0);
  306. elseif b=='e'then d.C0=d.C0*CFrame.AnglesRad(0,-2,0);elseif b=='r'then
  307. if Elevation>=-45 then Elevation=Elevation-1;e.C1=e.C1*CFrame.AnglesRad(-.5,0,0);end;elseif b=='f'then
  308. if Elevation<=10 then Elevation=Elevation+1;e.C1=e.C1*CFrame.AnglesRad(.5,0,0);end;end;end;
  309. elseif args[2]=='x'then local b=Tank:FindFirstChild('b',true).Parent;local c=math.deg;
  310. local d=b.CFrame.RightVector;local a=Ray.new(b.Position,Vector3.new(c(d.x),c(d.y),c(d.z)));
  311. local c=pchar:GetDescendants();local d=workspace:FindFirstChild'Baseplate'or workspace:FindFirstChild'Base';
  312. if d then table.insert(c,d);end;local e,f=workspace:FindPartOnRayWithIgnoreList(a,c);if e then Damage(e,999);
  313. end;local d=(b.Position-f).Magnitude;local c=Instance_3'Part'{Parent=Container;CFrame=CFrame.new(b.Position,
  314. f)*CFrame.AnglesRad(0,90,0)*CFrame.new(d/2,0,0);Anchored=true;CanCollide=false;Shape='Cylinder';Size=Vector3.
  315. new(d+1,.1,.1);BrickColor=BrickColor.new("Really red");Transparency=0};local g;local i=Instance_3'Sound'{
  316. SoundId=Asset_Prefix.. 1486531836;Parent=b;Volume=2;TimePosition=0;};i:Play();local h=function()if c then
  317. c.Transparency=c.Transparency+.01;if c.Transparency>1 and g then Remove_2{c;i};
  318. table.remove(Global_CWrap_Functions,g)end;end;end;table.insert(Global_CWrap_Functions,h);
  319. g=table.find(Global_CWrap_Functions,h);end;end;elseif args[1]=='KU'then local Keys={'w';'s';'d';'a';'q';'e';
  320. 'r';'f';};local a=table.find(Keys,args[2]);if a then if a<=4 then TankMoving_Table[args[2]]=false;end;
  321. Global_CWrap_Functions[Keys[a]]=nil;end;end;end;local function Movement_Mode(arg1)
  322. end;Humanoid.MaxHealth=Set_Up_1.Health or 100;Humanoid.WalkSpeed=Set_Up_1.WalkSpeed or 16;
  323. Humanoid.JumpPower=Set_Up_1.JumpPower or 50;Humanoid.Health=Humanoid.MaxHealth;cwrap(function()
  324. game:GetService'RunService'.Stepped:Connect(function()Animation(CFrames,CFrame_Mode);
  325. for _,a in pairs(Global_CWrap_Functions)do a();end;end);end);
  326. RE.OnServerEvent:Connect(ServerHandler);RF.OnServerInvoke=ServerHandler;end;Set_Up_Function'FindPlayer';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement