Advertisement
astronaut32

DBH grapples

Jul 5th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.93 KB | None | 0 0
  1.  
  2.  
  3. --[[
  4. Made by Kiriot22
  5. lel
  6. --]]
  7. local plr = game:GetService("Players").LocalPlayer
  8. local char = plr.Character
  9.  
  10. function FindInTable(t, n)
  11. for i,v in pairs(t) do
  12. if v == n then
  13. return true
  14. end
  15. end
  16. return false
  17. end
  18. --Transformaaaaation--
  19. char["Left Arm"].BrickColor = BrickColor.new("Pastel brown")
  20. char["Right Arm"].BrickColor = BrickColor.new("Pastel brown")
  21. char.Head.BrickColor = BrickColor.new("Pastel brown")
  22. char["Left Leg"].BrickColor = BrickColor.new("Pastel brown")
  23. char["Right Leg"].BrickColor = BrickColor.new("Pastel brown")
  24.  
  25. for i,v in pairs(char:children'') do
  26. local toremove = {"CharacterMesh", "Shirt", "Pants", "ShirtGraphic",}
  27. if FindInTable(toremove, v.ClassName) then v:Destroy() end
  28. if v.ClassName == "BodyColors" then
  29. v.HeadColor = BrickColor.new("Pastel brown")
  30. v.LeftArmColor = BrickColor.new("Pastel brown")
  31. v.LeftLegColor = BrickColor.new("Pastel brown")
  32. v.RightArmColor = BrickColor.new("Pastel brown")
  33. v.RightLegColor = BrickColor.new("Pastel brown")
  34. v.TorsoColor = BrickColor.new("Pastel brown")
  35. end
  36. end
  37.  
  38. Instance.new("Shirt", char).ShirtTemplate = "http://www.roblox.com/asset/?id=1995394598"
  39. Instance.new("Pants", char).PantsTemplate = "http://www.roblox.com/asset/?id=1995395268"
  40. local function CreateHat(name, meshid, textureid)
  41. local h = Instance.new("Accessory")
  42. h.Name = name
  43. local han = Instance.new("Part", h)
  44. han.Name = "Handle"
  45. local mesh = Instance.new("SpecialMesh", han)
  46. mesh.Name = "Mesh"
  47. mesh.MeshId = meshid
  48. mesh.TextureId = textureid
  49. return h,han,mesh
  50. end
  51. --3DG
  52. --three dimensional grapples
  53. function clerp(c1,c2,al)
  54. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  55. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  56. for i,v in pairs(com1) do
  57. com1[i] = v+(com2[i]-v)*al
  58. end
  59. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  60. end
  61.  
  62. plr = game:service'Players'.LocalPlayer
  63. plrgui = plr.PlayerGui
  64. char = plr.Character
  65. mouse = plr:GetMouse()
  66. humanoid = char:findFirstChild("Humanoid")
  67. torso = char:findFirstChild("Torso")
  68. head = char.Head
  69. ra = char:findFirstChild("Right Arm")
  70. la = char:findFirstChild("Left Arm")
  71. rl = char:findFirstChild("Right Leg")
  72. ll = char:findFirstChild("Left Leg")
  73. rs = torso:findFirstChild("Right Shoulder")
  74. ls = torso:findFirstChild("Left Shoulder")
  75. rh = torso:findFirstChild("Right Hip")
  76. lh = torso:findFirstChild("Left Hip")
  77. neck = torso:findFirstChild("Neck")
  78. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  79. rootpart = char:findFirstChild("HumanoidRootPart")
  80. camera = workspace.CurrentCamera
  81. anim = char:findFirstChild("Animate")
  82. if anim then
  83. anim:Destroy()
  84. end
  85.  
  86. local rm = Instance.new("Weld", torso)
  87. rm.C0 = CFrame.new(1.5, 0.5, 0)
  88. rm.C1 = CFrame.new(0, 0.5, 0)
  89. rm.Part0 = torso
  90. rm.Part1 = ra
  91. rm.Name = 'Right Shoulder'
  92.  
  93. local lm = Instance.new("Weld", torso)
  94. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  95. lm.C1 = CFrame.new(0, 0.5, 0)
  96. lm.Part0 = torso
  97. lm.Part1 = la
  98. lm.Name = 'Left Shoulder'
  99.  
  100. local rlegm = Instance.new("Weld", torso)
  101. rlegm.C0 = CFrame.new(0.5, -1, 0)
  102. rlegm.C1 = CFrame.new(0, 1, 0)
  103. rlegm.Part0 = torso
  104. rlegm.Part1 = rl
  105.  
  106. local llegm = Instance.new("Weld", torso)
  107. llegm.C0 = CFrame.new(-0.5, -1, 0)
  108. llegm.C1 = CFrame.new(0, 1, 0)
  109. llegm.Part0 = torso
  110. llegm.Part1 = ll
  111.  
  112. rj.C0 = CFrame.new()
  113. rj.C1 = CFrame.new()
  114.  
  115. neck.C0 = CFrame.new(0, 1, 0)
  116. neck.C1 = CFrame.new(0, -0.5, 0)
  117.  
  118.  
  119. local speed = 0.3
  120. local angle = 0
  121. local anglespeed = 1
  122. rsc0 = rm.C0
  123. lsc0 = lm.C0
  124. llc0 = llegm.C0
  125. rlc0 = rlegm.C0
  126. rootc0 = rj.C0
  127. neckc0 = neck.C0
  128.  
  129. model = Instance.new('Model', char)
  130. model.Name = '3DG'
  131. function Weld(part0,part1,c1,c0)
  132. local w = Instance.new('Weld', model)
  133. w.Part0 = part0
  134. w.Part1 = part1
  135. w.C0 = c0 or CFrame.new()
  136. w.C1 = c1 or CFrame.new()
  137. end
  138.  
  139. local BasePart = Instance.new('Part')
  140. BasePart.FormFactor = 'Custom'
  141. BasePart.Material = 'Neon'
  142. BasePart.CanCollide = false
  143. BasePart.Locked = true
  144. BasePart.TopSurface = 10
  145. BasePart.BottomSurface = 10
  146. BasePart.LeftSurface = 10
  147. BasePart.RightSurface = 10
  148. BasePart.FrontSurface = 10
  149. BasePart.BackSurface = 10
  150. BasePart:breakJoints()
  151.  
  152.  
  153. for i = 1,2 do
  154. local strap = BasePart:clone()
  155. strap.Size = Vector3.new(1.025,.2,1.025)
  156. strap.Parent = model
  157. strap.BrickColor = BrickColor.new()
  158. strap:BreakJoints()
  159. Weld(strap, la, CFrame.new(0, .1 - i/3,0))
  160. end
  161.  
  162. for i = 1,2 do
  163. local strap = BasePart:clone()
  164. strap.Size = Vector3.new(1.025,.2,1.025)
  165. strap.Parent = model
  166. strap.BrickColor = BrickColor.new()
  167. strap:BreakJoints()
  168. Weld(strap, ra, CFrame.new(0, .1 - i/3,0))
  169. end
  170.  
  171. local ropeStart = BasePart:clone()
  172. ropeStart.Size = Vector3.new(.2,1.75,.2)
  173. ropeStart.Parent = model
  174. ropeStart.BrickColor = BrickColor.new()
  175. ropeStart:BreakJoints()
  176. Weld(ropeStart, ra, CFrame.new(-.45, -.5, 0))
  177. local ropeStart2 = BasePart:clone()
  178. ropeStart2.Size = Vector3.new(.2,1.75,.2)
  179. ropeStart2.Parent = model
  180. ropeStart2.BrickColor = BrickColor.new()
  181. ropeStart2:BreakJoints()
  182. Weld(ropeStart2, la, CFrame.new(.45, -.5, 0))
  183.  
  184. local ropeCont = BasePart:clone()
  185. ropeCont.Size = Vector3.new(.8,.2,.8)
  186. ropeCont.Parent = model
  187. ropeCont.BrickColor = BrickColor.new(199)
  188. ropeCont:BreakJoints()
  189. Instance.new('CylinderMesh', ropeCont)
  190. Weld(ropeCont, la, CFrame.new(.5, .05, 0), CFrame.Angles(math.pi/2, math.pi/2, 0))
  191. local ropeCont2 = BasePart:clone()
  192. ropeCont2.Size = Vector3.new(.8,.2,.8)
  193. ropeCont2.Parent = model
  194. ropeCont2.BrickColor = BrickColor.new(199)
  195. ropeCont2:BreakJoints()
  196. Instance.new('CylinderMesh', ropeCont2)
  197. Weld(ropeCont2, ra, CFrame.new(-.5, .05, 0), CFrame.Angles(math.pi/2, math.pi/2, 0))
  198.  
  199. local GasTank = BasePart:clone()
  200. GasTank.Size = Vector3.new(.8,1.4,.8)
  201. GasTank.Parent = model
  202. GasTank.BrickColor = BrickColor.new(194)
  203. GasTank:BreakJoints()
  204. Instance.new('SpecialMesh', GasTank)
  205. Weld(GasTank, ra, CFrame.new(0, -.25, .5))
  206. local GasTank2 = BasePart:clone()
  207. GasTank2.Size = Vector3.new(.8,1.4,.8)
  208. GasTank2.Parent = model
  209. GasTank2.BrickColor = BrickColor.new(194)
  210. GasTank2:BreakJoints()
  211. Instance.new('SpecialMesh', GasTank2)
  212. Weld(GasTank2, la, CFrame.new(0, -.25, .5))
  213.  
  214. local pa = BasePart:clone()
  215. pa.BrickColor = BrickColor.new()
  216. pa.Anchored = true
  217. pa.Size = Vector3.new(.5,1,.5)
  218. local special = Instance.new('SpecialMesh', pa)
  219. special.MeshId = "rbxassetid://1033714"
  220. special.Scale = Vector3.new(.25,2,.25)
  221. local ropePA = BasePart:clone()
  222. ropePA.Parent = pa
  223. ropePA.Anchored = true
  224. ropePA.BrickColor = BrickColor.new'Cyan'
  225. Instance.new('CylinderMesh', ropePA).Scale = Vector3.new(.25,1,.25)
  226.  
  227. local pa2 = BasePart:clone()
  228. pa2.BrickColor = BrickColor.new()
  229. pa2.Anchored = true
  230. pa2.Size = Vector3.new(.5,1,.5)
  231. local special = Instance.new('SpecialMesh', pa2)
  232. special.MeshId = "rbxassetid://1033714"
  233. special.Scale = Vector3.new(.25,2,.25)
  234. local ropePA2 = BasePart:clone()
  235. ropePA2.Parent = pa2
  236. ropePA2.Anchored = true
  237. ropePA2.BrickColor = BrickColor.new'Cyan'
  238. Instance.new('CylinderMesh', ropePA2).Scale = Vector3.new(.25,1,.25)
  239.  
  240. local pa3 = BasePart:clone()
  241. pa3.Transparency = 1
  242. pa3.Anchored = true
  243. pa3.Size = Vector3.new(2,2,2)
  244.  
  245. local torso3 = Instance.new('Part', char)
  246. torso3.Name = 'FakeTorsoForStuff'
  247. torso3.Size = torso.Size
  248. torso3.Transparency = 1
  249. torso3:breakJoints()
  250. Weld(torso3, torso)
  251.  
  252. Instance.new('PointLight', torso)
  253.  
  254. local jumpmode
  255.  
  256. local SGui = Instance.new('ScreenGui', plr.PlayerGui)
  257. local JumpButton = Instance.new('TextButton', SGui)
  258. JumpButton.BackgroundColor = BrickColor.new('Dark stone grey')
  259. JumpButton.BorderSizePixel = 4
  260. JumpButton.TextColor3 = Color3.new(1,1,1)
  261. JumpButton.BorderColor3 = Color3.new()
  262. JumpButton.TextStrokeTransparency = .5
  263. JumpButton.FontSize = 'Size12'
  264. JumpButton.Text = 'Thrust up when grappled'
  265. JumpButton.Size = UDim2.new(0, 250, 0, 50)
  266. JumpButton.Position = UDim2.new(1, -250, 1, -50)
  267. local OnOff = Instance.new('Frame', JumpButton)
  268. OnOff.BackgroundColor3 = Color3.new()
  269. OnOff.BorderSizePixel = 0
  270. OnOff.Size = UDim2.new(.8, 0, 0, 5)
  271. OnOff.Position = UDim2.new(.1, 0, 1, -10)
  272. JumpButton.MouseButton1Down:connect(function()
  273. jumpmode = not jumpmode
  274. if jumpmode then
  275. OnOff.BackgroundColor3 = Color3.new(0,1,0)
  276. else
  277. OnOff.BackgroundColor3 = Color3.new()
  278. end
  279. end)
  280.  
  281.  
  282.  
  283. local bodygyro = Instance.new('BodyGyro', torso)
  284. bodygyro.maxTorque = Vector3.new(14e16,14e16,14e16)
  285. bodygyro.P = 10000
  286.  
  287. ro=Instance.new("RocketPropulsion",rootpart)
  288. ro.Name = 'RockatPropoolsun'
  289. ro.MaxSpeed=200
  290. ro.MaxThrust=8000
  291. ro.TurnP = 0
  292. ro.MaxTorque=Vector3.new(14e16,14e16,14e16)
  293.  
  294. ro2=Instance.new("RocketPropulsion",torso)
  295. ro2.Name = 'RockatPropoolsun2'
  296. ro2.MaxSpeed=200
  297. ro2.MaxThrust=8000
  298. ro2.TurnP = 0
  299. ro2.MaxTorque=Vector3.new(14e16,14e16,14e16)
  300. local run
  301. mouse.KeyDown:connect(function(k)
  302. if k:byte() == 48 then
  303. run = not run
  304. if run then
  305. humanoid.WalkSpeed = 22
  306. else
  307. humanoid.WalkSpeed = 16
  308. end
  309. end
  310. if k:byte() == 32 then
  311. if Grapple1 or Grapple2 then
  312. wait()
  313. humanoid.PlatformStand = true
  314. rlegm.C0 = rlc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, .1)
  315. llegm.C0 = llc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, -.1)
  316. if pa3.Parent ~= nil then
  317. ro3:Fire()
  318. end
  319. if Grapple1 then
  320. ro:Fire()
  321. end
  322. if Grapple2 then
  323. ro2:Fire()
  324. end
  325. end
  326. end
  327. if k=="q" then
  328. local sound = Instance.new('Sound', head)
  329. sound.SoundId = "rbxassetid://160248505"
  330. sound.Pitch = 3+math.random()/3
  331. sound.Volume = .8
  332. sound:play()
  333. game:service'Debris':AddItem(sound,4)
  334. lm.Parent = torso
  335. pa.CFrame = la.CFrame
  336. local grapplepos = pa.Position
  337. local grapplevelocity = (mouse.Hit.p - grapplepos).unit*50
  338. local lastgrapplepos = pa.Position
  339. while wait() do
  340. lastgrapplepos = grapplepos
  341. grapplepos = grapplepos + grapplevelocity
  342. local RayCast = Ray.new(lastgrapplepos, (grapplepos - lastgrapplepos))
  343. local hit, hitpos = workspace:FindPartOnRay(RayCast, char)
  344. if (torso.Position - pa.Position).magnitude > 900 then
  345. pa.Parent = nil
  346. break
  347. end
  348. pa.Anchored = true
  349. pa.CFrame = CFrame.new(grapplepos, grapplepos+grapplevelocity) * CFrame.Angles(math.pi/2, 0, 0)
  350. pa.Parent = char
  351. if hit then
  352. local rotX,rotY,rotZ = pa.CFrame:toEulerAnglesXYZ()
  353. local sound = Instance.new('Sound', head)
  354. sound.SoundId = "rbxassetid://146466021"
  355. sound.Pitch = 1.2+math.random()/3
  356. sound.Volume = .25
  357. sound:play()
  358. game:service'Debris':AddItem(sound,4)
  359. pa.Parent = char
  360. pa.CFrame=CFrame.new(hitpos.x, hitpos.y, hitpos.z)*CFrame.Angles(rotX,rotY,rotZ)*CFrame.Angles(math.pi,0,0)
  361. ro.Target=pa
  362. lm.Parent = torso
  363. local ray = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  364. local hitz, enz = workspace:FindPartOnRay(ray, char)
  365. local hum = hit and hit.Parent and hit.Parent:findFirstChild'Humanoid'
  366. if hum then
  367. hum:TakeDamage(math.random(7,11))
  368. end
  369. local hum = hit and hit.Parent and hit.Parent.Parent and hit.Parent.Parent:findFirstChild'Humanoid'
  370. if hum then
  371. hum:TakeDamage(math.random(7,11))
  372. end
  373. if pa.Parent ~= nil and humanoid.PlatformStand or not (hitz and hitz.CanCollide) then
  374. ro:Fire()
  375. if jumpmode then
  376. humanoid.Jump = true
  377. end
  378. end
  379. Gweld = Instance.new("Weld", char)
  380. Gweld.C0 = hit.CFrame:toObjectSpace(pa.CFrame)
  381. Gweld.Part0 = hit
  382. Gweld.Part1 = pa
  383. pa.Anchored = false
  384. Grapple1Hit = hit
  385. Grapple1 = true
  386. break
  387. end
  388. pa.Anchored = true
  389. pa.CFrame = CFrame.new(grapplepos, grapplepos+grapplevelocity) * CFrame.Angles(math.pi/2, 0, 0)
  390. end
  391. end
  392. if k=="e" then
  393. local sound = Instance.new('Sound', head)
  394. sound.SoundId = "rbxassetid://160248505"
  395. sound.Pitch = 3+math.random()/3
  396. sound.Volume = .8
  397. sound:play()
  398. game:service'Debris':AddItem(sound,4)
  399. pa2.CFrame = ra.CFrame
  400. rm.Parent = torso
  401. local grapplepos = pa2.Position
  402. local grapplevelocity = (mouse.Hit.p - grapplepos).unit*50
  403. local lastgrapplepos = pa2.Position
  404. while wait() do
  405. lastgrapplepos = grapplepos
  406. grapplepos = grapplepos + grapplevelocity
  407. local RayCast = Ray.new(lastgrapplepos, (grapplepos - lastgrapplepos))
  408. local hit, hitpos = workspace:FindPartOnRay(RayCast, char)
  409. if (torso.Position - pa2.Position).magnitude > 900 then
  410. pa2.Parent = nil
  411. break
  412. end
  413. pa2.Anchored = true
  414. pa2.CFrame = CFrame.new(grapplepos, grapplepos+grapplevelocity) * CFrame.Angles(math.pi/2, 0, 0)
  415. pa2.Parent = char
  416. if hit then
  417. local rotX,rotY,rotZ = pa2.CFrame:toEulerAnglesXYZ()
  418. local sound = Instance.new('Sound', head)
  419. sound.SoundId = "rbxassetid://146466021"
  420. sound.Pitch = 1.2+math.random()/3
  421. sound.Volume = .25
  422. sound:play()
  423. game:service'Debris':AddItem(sound,4)
  424. pa2.Parent = char
  425. pa2.CFrame=CFrame.new(hitpos.x, hitpos.y, hitpos.z)*CFrame.Angles(rotX,rotY,rotZ)*CFrame.Angles(math.pi,0,0)
  426. ro2.Target=pa2
  427. rm.Parent = torso
  428. local ray = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  429. local hitz, enz = workspace:FindPartOnRay(ray, char)
  430. local hum = hit and hit.Parent and hit.Parent:findFirstChild'Humanoid'
  431. if hum then
  432. hum:TakeDamage(math.random(7,11))
  433. end
  434. local hum = hit and hit.Parent and hit.Parent.Parent and hit.Parent.Parent:findFirstChild'Humanoid'
  435. if hum then
  436. hum:TakeDamage(math.random(7,11))
  437. end
  438. if pa2.Parent ~= nil and humanoid.PlatformStand or not (hitz and hitz.CanCollide) then
  439. if jumpmode then
  440. humanoid.Jump = true
  441. end
  442. ro2:Fire()
  443. end
  444. Gweld2 = Instance.new("Weld", char)
  445. Gweld2.C0 = hit.CFrame:toObjectSpace(pa2.CFrame)
  446. Gweld2.Part0 = hit
  447. Gweld2.Part1 = pa2
  448. pa2.Anchored = false
  449. Grapple2Hit = hit
  450. Grapple2 = true
  451. break
  452. end
  453. pa2.Anchored = true
  454. pa2.CFrame = CFrame.new(grapplepos, grapplepos+grapplevelocity) * CFrame.Angles(math.pi/2, 0, 0)
  455. end
  456. end
  457. end)
  458.  
  459. mouse.KeyUp:connect(function(k)
  460. if k=="q" then
  461. pcall(function() Gweld:remove() end)
  462. game:service'RunService'.RenderStepped:wait()
  463. pcall(function() pa.Parent = nil Grapple1 = false end)
  464. pcall(function() ro:Abort() end)
  465. game:service'RunService'.RenderStepped:wait()
  466. pcall(function() ro2.Target=pa2 if Grapple2 and humanoid.PlatformStand or Grapple2 and not hitz then ro2:Fire() end end)
  467. elseif k=="e" then
  468. pcall(function() Gweld2:remove() end)
  469. game:service'RunService'.RenderStepped:wait()
  470. pcall(function() pa2.Parent = nil Grapple2 = false end)
  471. pcall(function() ro2:Abort() end)
  472. game:service'RunService'.RenderStepped:wait()
  473. pcall(function() ro.Target=pa if Grapple1 and humanoid.PlatformStand or Grapple1 and not hitz then ro:Fire() end end)
  474. end
  475. end)
  476.  
  477.  
  478. local MidPointUsed = false
  479. local TorsoSmoke = Instance.new('Smoke', torso)
  480.  
  481.  
  482. game:service'RunService'.RenderStepped:connect(function()
  483. angle = (angle % 100) + anglespeed/10
  484. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  485. local rscf = rsc0
  486. local lscf = lsc0
  487. local rlcf = rlc0
  488. local llcf = llc0
  489. local rjcf = rootc0
  490. local ncf = neckc0
  491. for i,object in pairs(char:children()) do
  492. if object:IsA("Tool") then
  493. tool = true
  494. if not debounce then
  495. for x,value in pairs(object:children()) do
  496. if value:IsA("StringValue") and value.Name == "toolanim" and value.Value == "Slash" then
  497. debounce = true
  498. coroutine.wrap(function()
  499. slashing = true
  500. wait(.25)
  501. slashing = false
  502. debounce = false
  503. end)()
  504. value:Destroy()
  505. end
  506. end
  507. end
  508. elseif not object:IsA'Tool' then
  509. tool = false
  510. end
  511. end
  512. if not humanoid.PlatformStand then
  513. if humanoid.Sit == true then
  514. speed = 0.2
  515. anglespeed = 1/4
  516. ncf = neckc0 * CFrame.Angles(0, 0, 0)
  517. rjcf = rootc0
  518. rscf = rsc0 * CFrame.Angles(math.pi/2+math.sin(-angle)*0.05, 0, 0)
  519. lscf = lsc0 * CFrame.Angles(math.pi/2+math.sin(-angle)*0.05, 0, 0)
  520. rlcf = rlc0 * CFrame.Angles(math.pi/2+-math.rad(.2), 0, math.rad(.2))
  521. llcf = llc0 * CFrame.Angles(math.pi/2+math.rad(.2), 0, -math.rad(.2))
  522. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  523. anglespeed = 1/4
  524. speed = 0.2
  525. ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.075, 0, 0)
  526. rjcf = rootc0
  527. rscf = rsc0 * CFrame.new(0, math.sin(angle)*0.05, 0) * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
  528. lscf = lsc0 * CFrame.new(0, math.sin(angle)*0.05, 0) * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
  529. rlcf = rlc0 * CFrame.Angles(-math.rad(.2), 0, math.rad(.2))
  530. llcf = llc0 * CFrame.Angles(math.rad(.2), 0, -math.rad(.2))
  531. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 20 then
  532. anglespeed = 1.7
  533. speed = 0.25
  534. anglespeed = 2.2
  535. speed = 0.25
  536. ncf = neckc0 * CFrame.Angles(0, 0, 0)
  537. rjcf = rootc0 * CFrame.new(0, math.abs(math.sin(angle))*.055, 0) * CFrame.Angles(-math.rad(1), 0, 0)
  538. rscf = rsc0 * CFrame.Angles(math.sin(angle)*.5, 0, -math.rad(1))
  539. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*.5, 0, math.rad(1))
  540. rlcf = rlc0 * CFrame.new(0, .075 + -math.cos(-angle)*.075, math.sin(angle)*0.1) * CFrame.Angles(math.sin(-angle)*.45, 0, math.rad(.5))
  541. llcf = llc0 * CFrame.new(0, .075 - -math.cos(angle)*.075, -math.sin(angle)*0.1) * CFrame.Angles(math.sin(angle)*.45, 0, -math.rad(.5))
  542. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
  543. local RotVelocityZ = torso.RotVelocity.Y
  544. if RotVelocityZ >= 15 then
  545. RotVelocityZ = 15
  546. elseif RotVelocityZ <= -15 then
  547. RotVelocityZ = -15
  548. end
  549. speed = 0.25
  550. anglespeed = 2.7
  551. ncf = neckc0 * CFrame.Angles(0, 0, -math.sin(angle)*.045)
  552. rscf = rsc0 * CFrame.new(0, 0, -math.sin(angle)*0.125) * CFrame.Angles(math.pi/14+math.sin(angle)*1.5, 0, -math.sin(math.abs(angle))*0.3)
  553. lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/14+math.sin(-angle)*1.5, 0, -math.sin(math.abs(angle))*0.3)
  554. rjcf = rootc0 * CFrame.new(0, math.abs(math.sin(angle))*.175 - .2, 0) * CFrame.Angles(math.abs(math.sin(angle))*0.055 + -math.pi/18, 0, math.rad(RotVelocityZ) + math.sin(angle)*.045)
  555. rlcf = rlc0 * CFrame.new(0, .3 + -math.cos(-angle)*.3, -.2+math.sin(angle)*0.25) * CFrame.Angles(-math.pi/18+math.sin(-angle)*1.3, 0, math.rad(.5))
  556. llcf = llc0 * CFrame.new(0, .3 - -math.cos(angle)*.3, -.05-math.sin(angle)*0.25) * CFrame.Angles(-math.pi/18+math.sin(angle)*1.3, 0, -math.rad(.5))
  557. end
  558. if tool then
  559. rscf = rsc0 * CFrame.Angles(math.pi/2, 0, 0)
  560. if slashing then
  561. rscf = rsc0
  562. end
  563. end
  564. end
  565. if pa2.Parent == nil then
  566. rm.C0 = clerp(rm.C0,rscf,speed)
  567. end
  568. if pa.Parent == nil then
  569. lm.C0 = clerp(lm.C0,lscf,speed)
  570. end
  571. rj.C0 = clerp(rj.C0,rjcf,speed)
  572. neck.C0 = clerp(neck.C0,ncf,speed)
  573. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  574. llegm.C0 = clerp(llegm.C0,llcf,speed)
  575. end)
  576.  
  577.  
  578.  
  579. game:service'RunService'.RenderStepped:connect(function()
  580. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 225 then
  581. TorsoSmoke.Enabled = true
  582. else
  583. TorsoSmoke.Enabled = false
  584. end
  585. local ray = Ray.new(rootpart.Position, Vector3.new(0, -7, 0))
  586. local hitz, enz = workspace:FindPartOnRay(ray, char)
  587. if hitz and hitz.CanCollide and pa.Parent ~= char and pa2.Parent ~= char then
  588. bodygyro.Parent = nil
  589. humanoid.PlatformStand = false
  590. end
  591. if pa.Parent ~= nil or Grapple1 then
  592. local size = (ropeStart2.Position-pa.Position).magnitude
  593. ropePA.Size = Vector3.new(.2, size, .2)
  594. ropePA.CFrame = CFrame.new(ropeStart2.Position, pa.Position) * CFrame.Angles(math.pi/2, 0, 0) * CFrame.new(0, -size/2, 0)
  595. lm.C0 = CFrame.new(Vector3.new(lsc0.x, lsc0.y, lsc0.z), torso.CFrame:pointToObjectSpace(pa.Position)) * CFrame.Angles(math.pi/2, 0, 0)
  596. else
  597. if not debounce and humanoid.PlatformStand then
  598. lm.C0 = lsc0 * CFrame.Angles(-.15, 0, -.15)
  599. end
  600. end
  601. if pa2.Parent ~= nil or Grapple2 then
  602. local size = (ropeStart.Position-pa2.Position).magnitude
  603. ropePA2.Size = Vector3.new(.2, size, .2)
  604. ropePA2.CFrame = CFrame.new(ropeStart.Position, pa2.Position) * CFrame.Angles(math.pi/2, 0, 0) * CFrame.new(0, -size/2, 0)
  605. rm.C0 = CFrame.new(Vector3.new(rsc0.x, rsc0.y, rsc0.z), torso.CFrame:pointToObjectSpace(pa2.Position)) * CFrame.Angles(math.pi/2, 0, 0)
  606. else
  607. if not debounce and humanoid.PlatformStand then
  608. rm.C0 = rsc0 * CFrame.Angles(-.15, 0, .15)
  609. end
  610. end
  611. if Grapple1 and Grapple1Hit.Parent == nil then
  612. pcall(function() Gweld:remove() end)
  613. pa.Parent = nil
  614. Grapple1 = false
  615. ro:Abort()
  616. end
  617. if Grapple2 and Grapple2Hit.Parent == nil then
  618. pcall(function() Gweld2:remove() end)
  619. pa2.Parent = nil
  620. Grapple2 = false
  621. ro2:Abort()
  622. end
  623. if Grapple1 and Grapple2 and (humanoid.PlatformStand or not hitz) then
  624. local distance = (pa.Position-pa2.Position).magnitude
  625. bodygyro.Parent = torso
  626. torso.CFrame = CFrame.new(torso.Position, Vector3.new(camera.CoordinateFrame.x, camera.CoordinateFrame.y, camera.CoordinateFrame.z)) * CFrame.Angles(0, math.pi, 0)
  627. bodygyro.cframe = CFrame.new(torso.Position, Vector3.new(camera.CoordinateFrame.x, camera.CoordinateFrame.y, camera.CoordinateFrame.z)) * CFrame.Angles(0, math.pi, 0)
  628. pa3.Parent = char
  629. if distance <= .5 then
  630. pa3.CFrame = pa.CFrame
  631. elseif distance > .5 then
  632. pa3.CFrame = CFrame.new(pa.Position, pa2.Position) * CFrame.new(0, 0, -distance/2)
  633. end
  634. if not MidPointUsed then
  635. ro3=Instance.new("RocketPropulsion",torso3)
  636. ro3.Name = 'RockatPropoolsun3'
  637. ro3.MaxSpeed=250
  638. ro3.MaxThrust=16000
  639. ro3.TurnP = 0
  640. ro3.TurnD = 0
  641. ro3.MaxTorque=Vector3.new(14e16,14e16,14e16)
  642. if humanoid.PlatformStand or not hitz then
  643. ro:Abort()
  644. ro2:Abort()
  645. end
  646. ro3.Target = pa3
  647. if humanoid.PlatformStand or not hitz then
  648. ro3:Fire()
  649. end
  650. MidPointUsed = true
  651. end
  652. elseif (not Grapple1 or not Grapple2) and MidPointUsed == true and (humanoid.PlatformStand or not hitz) then
  653. pa3.Parent = nil
  654. MidPointUsed = false
  655. ro3:Abort()
  656. ro3:Destroy()
  657. if Grapple1 then
  658. ro:Fire()
  659. end
  660. if Grapple2 then
  661. ro2:Fire()
  662. end
  663. end
  664. if not Grapple1 then
  665. pcall(function() Gweld:remove() end)
  666. end
  667. if not Grapple2 then
  668. pcall(function() Gweld2:remove() end)
  669. end
  670. if (Grapple1 or Grapple2) and not hitz then
  671. bodygyro.Parent = torso
  672. humanoid.PlatformStand = true
  673. rlegm.Parent = torso
  674. llegm.Parent = torso
  675. lm.Parent = torso
  676. rm.Parent = torso
  677. rlegm.C0 = rlc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, .1)
  678. llegm.C0 = llc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, -.1)
  679. end
  680. if (Grapple1 or Grapple2) and not hitz or humanoid.PlatformStand then
  681. bodygyro.Parent = torso
  682. bodygyro.cframe = CFrame.new(torso.Position, Vector3.new(camera.CoordinateFrame.x, camera.CoordinateFrame.y, camera.CoordinateFrame.z)) * CFrame.Angles(0, math.pi, 0)
  683. rlegm.Parent = torso
  684. llegm.Parent = torso
  685. rlegm.C0 = rlc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, .1)
  686. llegm.C0 = llc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, -.1)
  687. end
  688. end)
  689.  
  690.  
  691.  
  692. local music = Instance.new("Sound", torso)
  693. music.SoundId = "rbxassetid://1909789171"
  694. music.Looped = true
  695. music.Volume = 0.75
  696. music:Play()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement