Daniel555ok

Turn Into A Tank Script

Jun 17th, 2020
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.61 KB | None | 0 0
  1. function weld(hat, position, orientation) --Object, Vector3, Vector3
  2. local attachment = Instance.new("Attachment")
  3. attachment.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
  4. attachment.Name = hat:GetFullName()
  5. attachment.Position = position
  6. attachment.Orientation = orientation
  7.  
  8. local attach0 = hat.Handle:FindFirstChildOfClass("Attachment")
  9. local attach1 = attachment
  10.  
  11. hat.Handle.AccessoryWeld:Destroy()
  12. local alignP = Instance.new("AlignPosition")
  13. alignP.Parent = hat.Handle
  14. alignP.Attachment0 = attach0
  15. alignP.Attachment1 = attach1
  16.  
  17. local alignO = Instance.new("AlignOrientation")
  18. alignO.Parent = hat.Handle
  19. alignO.Attachment0 = attach0
  20. alignO.Attachment1 = attach1
  21. end
  22.  
  23. for _,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  24. if v:IsA("Accessory") then
  25. weld(v, Vector3.new(0, 0, 0), Vector3.new(0, 0, 0))
  26. end
  27. end
  28.  
  29.  
  30. function LoadLibrary(a)
  31. return loadstring(game:HttpGet("https://pastebin.com/raw/UfzKgS6T", true))()
  32. end
  33.  
  34. loadstring(game:GetObjects("rbxassetid://4480871791")[1].Source)()
  35.  
  36. Player=game.Players.LocalPlayer
  37. Character=workspace.CloneCharacter
  38. hum = Character.Humanoid
  39. LeftArm=Character["Left Arm"]
  40. LeftLeg=Character["Left Leg"]
  41. RightArm=Character["Right Arm"]
  42. RightLeg=Character["Right Leg"]
  43. Root=Character["HumanoidRootPart"]
  44. Head=Character["Head"]
  45. Torso=Character["Torso"]
  46. Neck=Torso["Neck"]
  47. mouse = Player:GetMouse()
  48. walking = false
  49. jumping = false
  50. attacking = false
  51. firsttime = false
  52. tauntdebounce = false
  53. position = nil
  54. MseGuide = true
  55. running = false
  56. settime = 0
  57. sine = 0
  58. t = 0
  59. ws = 14
  60. change = 1
  61. combo1 = true
  62. dancing = false
  63. equip = false
  64. dgs = 75
  65. combo2 = false
  66. switch1 = true
  67. switch2 = false
  68. firsttime2 = false
  69. combo3 = false
  70. gunallowance = false
  71. shooting = false
  72. RunSrv = game:GetService("RunService")
  73. RenderStepped = game:GetService("RunService").RenderStepped
  74. removeuseless = game:GetService("Debris")
  75.  
  76. screenGui = Instance.new("ScreenGui")
  77. screenGui.Parent = script.Parent
  78.  
  79. local HEADLERP = Instance.new("ManualWeld")
  80. HEADLERP.Parent = Head
  81. HEADLERP.Part0 = Head
  82. HEADLERP.Part1 = Head
  83. HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  84.  
  85. local TORSOLERP = Instance.new("ManualWeld")
  86. TORSOLERP.Parent = Root
  87. TORSOLERP.Part0 = Torso
  88. TORSOLERP.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  89.  
  90. local ROOTLERP = Instance.new("ManualWeld")
  91. ROOTLERP.Parent = Root
  92. ROOTLERP.Part0 = Root
  93. ROOTLERP.Part1 = Torso
  94. ROOTLERP.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  95.  
  96. local RIGHTARMLERP = Instance.new("ManualWeld")
  97. RIGHTARMLERP.Parent = RightArm
  98. RIGHTARMLERP.Part0 = RightArm
  99. RIGHTARMLERP.Part1 = Torso
  100. RIGHTARMLERP.C0 = CFrame.new(-1.5, 0, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  101.  
  102. local LEFTARMLERP = Instance.new("ManualWeld")
  103. LEFTARMLERP.Parent = LeftArm
  104. LEFTARMLERP.Part0 = LeftArm
  105. LEFTARMLERP.Part1 = Torso
  106. LEFTARMLERP.C0 = CFrame.new(1.5, 0, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  107.  
  108. local RIGHTLEGLERP = Instance.new("ManualWeld")
  109. RIGHTLEGLERP.Parent = RightLeg
  110. RIGHTLEGLERP.Part0 = RightLeg
  111. RIGHTLEGLERP.Part1 = Torso
  112. RIGHTLEGLERP.C0 = CFrame.new(-0.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  113.  
  114. local LEFTLEGLERP = Instance.new("ManualWeld")
  115. LEFTLEGLERP.Parent = LeftLeg
  116. LEFTLEGLERP.Part0 = LeftLeg
  117. LEFTLEGLERP.Part1 = Torso
  118. LEFTLEGLERP.C0 = CFrame.new(0.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  119.  
  120. local function weldBetween(a, b)
  121. local weld = Instance.new("ManualWeld", a)
  122. weld.Part0 = a
  123. weld.Part1 = b
  124. weld.C0 = a.CFrame:inverse() * b.CFrame
  125. return weld
  126. end
  127.  
  128. function MAKETRAIL(PARENT,POSITION1,POSITION2,LIFETIME,COLOR)
  129. A = Instance.new("Attachment", PARENT)
  130. A.Position = POSITION1
  131. A.Name = "A"
  132. B = Instance.new("Attachment", PARENT)
  133. B.Position = POSITION2
  134. B.Name = "B"
  135. tr1 = Instance.new("Trail", PARENT)
  136. tr1.Attachment0 = A
  137. tr1.Attachment1 = B
  138. tr1.Enabled = true
  139. tr1.Lifetime = LIFETIME
  140. tr1.TextureMode = "Static"
  141. tr1.LightInfluence = 0
  142. tr1.Color = COLOR
  143. tr1.Transparency = NumberSequence.new(0, 1)
  144. end
  145.  
  146. introsound = Instance.new("Sound",Head)
  147. introsound.SoundId = "rbxassetid://236146895"
  148. introsound.Volume = 8
  149. introsound:Play()
  150.  
  151.  
  152. fedora = Instance.new("Part",Character)
  153. fedora.Size = Vector3.new(2,2,2)
  154. fedora.CFrame = Head.CFrame
  155. fedora.CanCollide = false
  156. fedoraweld = Instance.new("Weld",fedora)
  157. fedoraweld.Part0 = fedora
  158. fedoraweld.Part1 = Head
  159. fedoraweld.C0 = fedora.CFrame:inverse() * Head.CFrame * CFrame.new(0,-.75,0)
  160. mfedora = Instance.new("SpecialMesh", fedora)
  161. mfedora.MeshType = "FileMesh"
  162. mfedora.Scale = Vector3.new(.97, .97, .97)
  163. mfedora.MeshId,mfedora.TextureId = 'http://www.roblox.com/asset/?id=13640868','http://www.roblox.com/asset/?id=18987684'
  164.  
  165. shades = Instance.new("Part",Character)
  166. shades.Size = Vector3.new(2,2,2)
  167. shades.CFrame = Head.CFrame
  168. shades.CanCollide = false
  169. shadesweld = Instance.new("Weld",shades)
  170. shadesweld.Part0 = shades
  171. shadesweld.Part1 = Head
  172. shadesweld.C0 = shades.CFrame:inverse() * Head.CFrame * CFrame.new(0,-.2,.15)
  173. mshades = Instance.new("SpecialMesh", shades)
  174. mshades.MeshType = "FileMesh"
  175. mshades.Scale = Vector3.new(1.04, 1.28, 1.04)
  176. mshades.MeshId,mshades.TextureId = 'http://www.roblox.com/asset/?id=1577360','http://www.roblox.com/asset/?id=1577349'
  177.  
  178. for i,v in pairs(Character:GetChildren()) do
  179. if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "Hat" or v.ClassName == "CharacterMesh" or v.ClassName == "Shirt Graphic" then
  180. v:Remove()
  181. end
  182. end
  183.  
  184. coroutine.wrap(function()
  185. while wait() do
  186. Head.face.Texture = "rbxasset://textures/face.png"
  187. hum.WalkSpeed = ws
  188. LeftArm.BrickColor = BrickColor.new("Really black")
  189. RightArm.BrickColor = BrickColor.new("Really black")
  190. Head.BrickColor = BrickColor.new("White")
  191. Torso.BrickColor = BrickColor.new("Really black")
  192. LeftLeg.BrickColor = BrickColor.new("Really black")
  193. RightLeg.BrickColor = BrickColor.new("Really black")
  194. end
  195. end)()
  196. godmode = coroutine.wrap(function()
  197. for i,v in pairs(Character:GetChildren()) do
  198. if v:IsA("BasePart") and v ~= Root then
  199. v.Anchored = false
  200. end
  201. end
  202. while true do
  203. hum.MaxHealth = math.huge
  204. wait(0.0000001)
  205. hum.Health = math.huge
  206. wait()
  207. end
  208. end)
  209. godmode()
  210. ff = Instance.new("ForceField", Character)
  211. ff.Visible = false
  212.  
  213. coroutine.wrap(function()
  214. for i,v in pairs(Character:GetChildren()) do
  215. if v.Name == "Animate" then v:Remove()
  216. end
  217. end
  218. end)()
  219.  
  220. function damagealll(Radius,Position)
  221. local Returning = {}
  222. for _,v in pairs(workspace:GetChildren()) do
  223. if v~=Character and v:FindFirstChildOfClass('Humanoid') and v:FindFirstChild('Torso') or v:FindFirstChild('UpperTorso') then
  224. if v:FindFirstChild("Torso") then
  225. local Mag = (v.Torso.Position - Position).magnitude
  226. if Mag < Radius then
  227. table.insert(Returning,v)
  228. end
  229. elseif v:FindFirstChild("UpperTorso") then
  230. local Mag = (v.UpperTorso.Position - Position).magnitude
  231. if Mag < Radius then
  232. table.insert(Returning,v)
  233. end
  234. end
  235. end
  236. end
  237. return Returning
  238. end
  239.  
  240. ArtificialHB = Instance.new("BindableEvent", script)
  241. ArtificialHB.Name = "Heartbeat"
  242. script:WaitForChild("Heartbeat")
  243.  
  244. frame = 1 / 60
  245. tf = 0
  246. allowframeloss = false
  247. tossremainder = false
  248.  
  249.  
  250. lastframe = tick()
  251. script.Heartbeat:Fire()
  252.  
  253.  
  254. game:GetService("RunService").Heartbeat:connect(function(s, p)
  255. tf = tf + s
  256. if tf >= frame then
  257. if allowframeloss then
  258. script.Heartbeat:Fire()
  259. lastframe = tick()
  260. else
  261. for i = 1, math.floor(tf / frame) do
  262. script.Heartbeat:Fire()
  263. end
  264. lastframe = tick()
  265. end
  266. if tossremainder then
  267. tf = 0
  268. else
  269. tf = tf - frame * math.floor(tf / frame)
  270. end
  271. end
  272. end)
  273.  
  274. function swait(num)
  275. if num == 0 or num == nil then
  276. game:service("RunService").Stepped:wait(0)
  277. else
  278. for i = 0, num do
  279. game:service("RunService").Stepped:wait(0)
  280. end
  281. end
  282. end
  283.  
  284. for _,n in pairs(Character:GetChildren()) do
  285. if n:IsA("Accessory") then end
  286. end
  287. for _,x in pairs(Character:GetChildren()) do
  288. if x:IsA("Decal") then x:Remove() end
  289. end
  290.  
  291. intro = true
  292. ws = 0
  293.  
  294. bigfedora = Instance.new("Part",Character)
  295. bigfedora.Size = Vector3.new(2,2,2)
  296. bigfedora.CFrame = bigfedora.CFrame:inverse() * Root.CFrame * CFrame.new(math.random(-60,60),-.2,math.random(-60,60)) * CFrame.Angles(0,math.rad(math.random(-180,180)),0)
  297. bigfedora.CanCollide = false
  298. bigfedora.Anchored = true
  299. bigfedora.Name = "mbigf"
  300. mbigfedora = Instance.new("SpecialMesh", bigfedora)
  301. mbigfedora.MeshType = "FileMesh"
  302. mbigfedora.Scale = Vector3.new(6, 7, 7)
  303. mbigfedora.MeshId,mbigfedora.TextureId = 'http://www.roblox.com/asset/?id=13640868','http://www.roblox.com/asset/?id=18987684'
  304. for i,v in pairs(Character:GetDescendants()) do
  305. if v:IsA("Part") and v.Name ~= "mbigf" then v.Transparency = 1
  306. end
  307. end
  308. for i = 1, 60 do
  309. bigfedora.CFrame = bigfedora.CFrame:lerp(CFrame.new(Root.Position) * CFrame.new(0,-.1,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)),.09)
  310. swait()
  311. end
  312. wait(.25)
  313. for i,v in pairs(Character:GetDescendants()) do
  314. if v:IsA("Part") and v.Name ~= "mbigf" and v.Name ~= "HumanoidRootPart" then v.Transparency = 0
  315. end
  316. end
  317. for i = 1, 50 do
  318. bigfedora.CFrame = bigfedora.CFrame:lerp(CFrame.new(fedora.Position),.05)
  319. swait()
  320. end
  321. zmc = 0
  322. for i = 1, 29 do
  323. zmc = zmc + 2
  324. mbigfedora.Scale = mbigfedora.Scale - Vector3.new(.25,.25,.25)
  325. bigfedora.CFrame = bigfedora.CFrame * CFrame.Angles(math.rad(0),math.rad(zmc),0)
  326. swait()
  327. end
  328. bigfedora:Remove()
  329.  
  330. ws = 14
  331.  
  332. function SOUND(PARENT,ID,VOL,LOOP,REMOVE)
  333. so = Instance.new("Sound")
  334. so.Parent = PARENT
  335. so.SoundId = "rbxassetid://"..ID
  336. so.Volume = VOL
  337. so.Looped = LOOP
  338.  
  339. so:Play()
  340. removeuseless:AddItem(so,REMOVE)
  341. end
  342.  
  343.  
  344.  
  345. function ray(pos, dir, rang, ignoredesc)
  346. return workspace:FindPartOnRay(Ray.new(pos, dir.unit * rang), ignoredesc)
  347. end
  348.  
  349. function ray2(startpos, endpos, distance, ignore)
  350. local dir = CFrame.new(startpos,endpos).lookVector
  351. return ray(startpos, dir, distance, ignore)
  352. end
  353.  
  354. checks1 = coroutine.wrap(function() -------Checks
  355. while true do
  356. hf = ray(Root.Position,(CFrame.new(Root.Position,Root.Position+Vector3.new(0,-1,0))).lookVector,3*3,Character)
  357. if Root.Velocity.y > 1 then
  358. position = "Jump"
  359. elseif Root.Velocity.y < -1 then
  360. position = "Falling"
  361. elseif Root.Velocity.Magnitude < 2 then
  362. position = "Idle"
  363. elseif Root.Velocity.Magnitude > 2 then
  364. position = "Walking"
  365. elseif Root.Velocity.Magnitude > 20 then
  366. position = "Running"
  367. else
  368. end
  369. wait()
  370. end
  371. end)
  372. checks1()
  373.  
  374. function ray(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  375. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  376. end
  377.  
  378. function ray2(StartPos, EndPos, Distance, Ignore)
  379. local DIRECTION = CFrame.new(StartPos,EndPos).lookVector
  380. return ray(StartPos, DIRECTION, Distance, Ignore)
  381. end
  382.  
  383. OrgnC0 = Neck.C0
  384. local movelimbs = coroutine.wrap(function()
  385. while RunSrv.RenderStepped:wait() do
  386. TrsoLV = Torso.CFrame.lookVector
  387. Dist = nil
  388. Diff = nil
  389. if not MseGuide then
  390. print("Failed to recognize")
  391. else
  392. local _, Point = Workspace:FindPartOnRay(Ray.new(Head.CFrame.p, mouse.Hit.lookVector), Workspace, false, true)
  393. Dist = (Head.CFrame.p-Point).magnitude
  394. Diff = Head.CFrame.Y-Point.Y
  395. local _, Point2 = Workspace:FindPartOnRay(Ray.new(LeftArm.CFrame.p, mouse.Hit.lookVector), Workspace, false, true)
  396. Dist2 = (LeftArm.CFrame.p-Point).magnitude
  397. Diff2 = LeftArm.CFrame.Y-Point.Y
  398. HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  399. Neck.C0 = Neck.C0:lerp(OrgnC0*CFrame.Angles((math.tan(Diff/Dist)*1), 0, (((Head.CFrame.p-Point).Unit):Cross(Torso.CFrame.lookVector)).Y*1), .1)
  400. end
  401. end
  402. end)
  403. movelimbs()
  404. immortal = {}
  405. for i,v in pairs(Character:GetDescendants()) do
  406. if v:IsA("BasePart") and v.Name ~= "lmagic" and v.Name ~= "rmagic" then
  407. if v ~= Root and v ~= Torso and v ~= Head and v ~= RightArm and v ~= LeftArm and v ~= RightLeg and v.Name ~= "lmagic" and v.Name ~= "rmagic" and v ~= LeftLeg then
  408. v.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  409. end
  410. table.insert(immortal,{v,v.Parent,v.Material,v.Color,v.Transparency})
  411. elseif v:IsA("JointInstance") then
  412. table.insert(immortal,{v,v.Parent,nil,nil,nil})
  413. end
  414. end
  415. for e = 1, #immortal do
  416. if immortal[e] ~= nil then
  417. local STUFF = immortal[e]
  418. local PART = STUFF[1]
  419. local PARENT = STUFF[2]
  420. local MATERIAL = STUFF[3]
  421. local COLOR = STUFF[4]
  422. local TRANSPARENCY = STUFF[5]
  423. if levitate then
  424. if PART.ClassName == "Part" and PART ~= Root and PART.Name ~= eyo1 and PART.Name ~= eyo2 and PART.Name ~= "lmagic" and PART.Name ~= "rmagic" then
  425. PART.Material = MATERIAL
  426. PART.Color = COLOR
  427. PART.Transparency = TRANSPARENCY
  428. end
  429. PART.AncestryChanged:connect(function()
  430. PART.Parent = PARENT
  431. end)
  432. else
  433. if PART.ClassName == "Part" and PART ~= Root and PART.Name ~= "lmagic" and PART.Name ~= "rmagic" then
  434. PART.Material = MATERIAL
  435. PART.Color = COLOR
  436. PART.Transparency = TRANSPARENCY
  437. end
  438. PART.AncestryChanged:connect(function()
  439. PART.Parent = PARENT
  440. end)
  441. end
  442. end
  443. end
  444. function immortality()
  445. for e = 1, #immortal do
  446. if immortal[e] ~= nil then
  447. local STUFF = immortal[e]
  448. local PART = STUFF[1]
  449. local PARENT = STUFF[2]
  450. local MATERIAL = STUFF[3]
  451. local COLOR = STUFF[4]
  452. local TRANSPARENCY = STUFF[5]
  453. if PART.ClassName == "Part" and PART == Root then
  454. PART.Material = MATERIAL
  455. PART.Color = COLOR
  456. PART.Transparency = TRANSPARENCY
  457. end
  458. if PART.Parent ~= PARENT then
  459. hum:Remove()
  460. PART.Parent = PARENT
  461. hum = Instance.new("Humanoid",Character)
  462. end
  463. end
  464. end
  465. end
  466. coroutine.wrap(function()
  467. while true do
  468. if hum.Health < .1 then
  469. deadsound = Instance.new("Sound", Torso)
  470. deadsound.Volume = 6
  471. deadsound.SoundId = "rbxassetid://1411352723"
  472. deadsound:Play()
  473. immortality()
  474. end
  475. wait()
  476. end
  477. end)()
  478.  
  479. for _,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  480. if v:IsA("BasePart") then
  481. v:Destroy()
  482. end
  483. end
Add Comment
Please, Sign In to add comment