Dark_EccentricYT

Untitled

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