Advertisement
Ryan_Lubia

Grapple Hook Script

Jul 17th, 2021
2,932
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.28 KB | None | 0 0
  1.  
  2. HumanDied = false
  3. local CountSCIFIMOVIELOL = 1
  4. function SCIFIMOVIELOL(Part0,Part1,Position,Angle)
  5. local AlignPos = Instance.new('AlignPosition', Part1); AlignPos.Name = "AliP_"..CountSCIFIMOVIELOL
  6. AlignPos.ApplyAtCenterOfMass = true;
  7. AlignPos.MaxForce = 5772000--67752;
  8. AlignPos.MaxVelocity = math.huge/9e110;
  9. AlignPos.ReactionForceEnabled = false;
  10. AlignPos.Responsiveness = 200;
  11. AlignPos.RigidityEnabled = false;
  12. local AlignOri = Instance.new('AlignOrientation', Part1); AlignOri.Name = "AliO_"..CountSCIFIMOVIELOL
  13. AlignOri.MaxAngularVelocity = math.huge/9e110;
  14. AlignOri.MaxTorque = 5772000
  15. AlignOri.PrimaryAxisOnly = false;
  16. AlignOri.ReactionTorqueEnabled = false;
  17. AlignOri.Responsiveness = 200;
  18. AlignOri.RigidityEnabled = false;
  19. local AttachmentA=Instance.new('Attachment',Part1); AttachmentA.Name = "Ath_"..CountSCIFIMOVIELOL
  20. local AttachmentB=Instance.new('Attachment',Part0); AttachmentB.Name = "Ath_"..CountSCIFIMOVIELOL
  21. AttachmentA.Orientation = Angle or Vector3.new(0,0,0)
  22. AttachmentA.Position = Position or Vector3.new(0,0,0)
  23. AlignPos.Attachment1 = AttachmentA;
  24. AlignPos.Attachment0 = AttachmentB;
  25. AlignOri.Attachment1 = AttachmentA;
  26. AlignOri.Attachment0 = AttachmentB;
  27. CountSCIFIMOVIELOL = CountSCIFIMOVIELOL + 1
  28. return {AlignPos,AlignOri,AttachmentA,AttachmentB}
  29. end
  30.  
  31. if _G.netted ~= true then
  32. _G.netted = true
  33. coroutine.wrap(function()
  34. settings().Physics.PhysicsEnvironmentalThrottle = Enum.EnviromentalPhysicsThrottle.Disabled
  35. settings().Physics.AllowSleep = false
  36. game:GetService("RunService").RenderStepped:Connect(function()
  37. game:FindFirstChildOfClass("Players").LocalPlayer.MaximumSimulationRadius=math.pow(math.huge,math.huge)
  38. sethiddenproperty(game:FindFirstChildOfClass("Players").LocalPlayer,"SimulationRadius",math.huge*math.huge)
  39. end)
  40. end)()
  41. end
  42.  
  43. game:FindFirstChildOfClass("Players").LocalPlayer["Character"].Archivable = true
  44. local hatnameclone = {}
  45. for _,v in next, game:FindFirstChildOfClass("Players").LocalPlayer["Character"]:GetChildren() do
  46. if v:IsA("Accessory") then
  47. if hatnameclone[v.Name] then
  48. if hatnameclone[v.Name] == "s" then
  49. hatnameclone[v.Name] = {}
  50. end
  51. table.insert(hatnameclone[v.Name],v)
  52. else
  53. hatnameclone[v.Name] = "s"
  54. end
  55. end
  56. end
  57. for _,v in pairs(hatnameclone) do
  58. if type(v) == "table" then
  59. local num = 1
  60. for _,w in pairs(v) do
  61. w.Name = w.Name..num
  62. num = num + 1
  63. end
  64. end
  65. end
  66. hatnameclone = nil
  67.  
  68. local DeadChar = game:FindFirstChildOfClass("Players").LocalPlayer.Character
  69.  
  70. local fldr = Instance.new("Folder",game:FindFirstChildOfClass("Players").LocalPlayer["Character"])
  71. fldr.Name = "DMYF"
  72. local CloneChar = DeadChar:Clone()
  73. local ANIMATIONHERE
  74. if CloneChar:FindFirstChild("Animate") then
  75. ANIMATIONHERE = CloneChar:FindFirstChild("Animate"):Clone()
  76. CloneChar:FindFirstChild("Animate"):Destroy()
  77. end
  78. if CloneChar:FindFirstChildOfClass("Folder") then CloneChar:FindFirstChildOfClass("Folder"):Destroy() end
  79. if CloneChar.Torso:FindFirstChild("Neck") then
  80. local Clonessss = CloneChar.Torso:FindFirstChild("Neck"):Clone()
  81. Clonessss.Part0 = nil
  82. Clonessss.Part1 = DeadChar.Head
  83. Clonessss.Parent = DeadChar.Torso
  84. end
  85. CloneChar.Parent = fldr
  86. CloneChar.HumanoidRootPart.CFrame = DeadChar.HumanoidRootPart.CFrame
  87. CloneChar.Humanoid.BreakJointsOnDeath = false
  88. CloneChar.Name = "non"
  89. CloneChar.Humanoid.DisplayDistanceType = "None"
  90.  
  91. for _,v in next, DeadChar:GetChildren() do
  92. if v:IsA("Accessory") then
  93. local topacc = false
  94. if v.Handle:FindFirstChildOfClass("Weld") then v.Handle:FindFirstChildOfClass("Weld"):Destroy() end
  95. v.Handle.Massless = true
  96. v.Handle.CanCollide = false
  97. if v.Handle:FindFirstChildOfClass("Attachment") then
  98. local ath__ = v.Handle:FindFirstChildOfClass("Attachment")
  99. if ath__.Name == "HatAttachment" or ath__.Name == "HairAttachment" or ath__.Name == "FaceFrontAttachment" or ath__.Name == "FaceCenterAttachment" then
  100. topacc = ath__.Name
  101. end
  102. end
  103. local bv = Instance.new("BodyVelocity",v.Handle)
  104. bv.Velocity = Vector3.new(0,0,0)
  105. coroutine.wrap(function()
  106. if topacc then
  107. local allthings = SCIFIMOVIELOL(v.Handle,DeadChar.Torso,Vector3.new(0,1.5,0)+ (DeadChar.Head[topacc].Position + (v.Handle[topacc].Position*-1)),Vector3.new(0,0,0))
  108. local normaltop = allthings[1].Attachment1
  109. local alipos = allthings[1]
  110. local alirot = allthings[2]
  111. local p0 = v.Handle
  112. local p1 = DeadChar.Head
  113. alipos.Parent = CloneChar:FindFirstChild(v.Name).Handle
  114. alirot.Parent = CloneChar:FindFirstChild(v.Name).Handle
  115. while true do
  116. game:GetService("RunService").RenderStepped:wait()
  117. if HumanDied then break end
  118. coroutine.wrap(function()
  119. if alipos.Attachment1 == normaltop then
  120. p0.CFrame = p0.CFrame:lerp((((DeadChar.Torso.CFrame * CFrame.new(0,1.5,0)) * p1[topacc].CFrame) * p0[topacc].CFrame:inverse()),1)
  121. else
  122. v.Handle.CFrame = v.Handle.CFrame:lerp(alipos.Attachment1.Parent.CFrame * CFrame.new(alipos.Attachment1.Position) * CFrame.Angles(math.rad(alipos.Attachment1.Rotation.X),math.rad(alipos.Attachment1.Rotation.Y),math.rad(alipos.Attachment1.Rotation.Z)),1)
  123. end
  124. end)()
  125. end
  126. else
  127. SCIFIMOVIELOL(v.Handle,CloneChar[v.Name].Handle,Vector3.new(0,0,0),Vector3.new(0,0,0))
  128. end
  129. end)()
  130. end
  131. end
  132.  
  133. local a = DeadChar.Torso
  134. local b = DeadChar.HumanoidRootPart
  135. local c = DeadChar.Humanoid
  136. a.Parent = game:FindFirstChildOfClass("Workspace")
  137. c.Parent = game:FindFirstChildOfClass("Workspace")
  138. local told = a:Clone()
  139. local told1 = c:Clone()
  140. b["RootJoint"].Part0 = told
  141. b["RootJoint"].Part1 = DeadChar.Head
  142. a.Name = "torso"
  143. a.Neck:Destroy()
  144. c.Name = "Mizt Hub Best"
  145. told.Parent = DeadChar
  146. told1.Parent = DeadChar
  147. DeadChar.PrimaryPart = told
  148. told1.Health = 0
  149. b:Destroy()
  150. a.Parent = DeadChar
  151. c.Parent = DeadChar
  152. told:Destroy()
  153. told1:Destroy()
  154. a.Name = "Torso"
  155.  
  156. if CloneChar.Head:FindFirstChildOfClass("Decal") then CloneChar.Head:FindFirstChildOfClass("Decal").Transparency = 1 end
  157. if DeadChar:FindFirstChild("Animate") then DeadChar:FindFirstChild("Animate"):Destroy() end
  158.  
  159. local Collider
  160. function UnCollide()
  161. if HumanDied then Collider:Disconnect(); return end
  162. --[[for _,Parts in next, CloneChar:GetChildren() do
  163. if Parts:IsA("BasePart") then
  164. Parts.CanCollide = false
  165. end
  166. end]]
  167. for _,Parts in next, DeadChar:GetChildren() do
  168. if Parts:IsA("BasePart") then
  169. Parts.CanCollide = false
  170. end
  171. end
  172. end
  173. Collider = game:GetService("RunService").Stepped:Connect(UnCollide)
  174.  
  175. local resetBindable = Instance.new("BindableEvent")
  176. resetBindable.Event:connect(function()
  177. game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  178. resetBindable:Destroy()
  179. HumanDied = true
  180. pcall(function()
  181. game:FindFirstChildOfClass("Players").LocalPlayer.Character = DeadChar
  182. DeadChar.Head:Destroy()
  183. DeadChar:FindFirstChildOfClass("Humanoid"):Destroy()
  184. game:FindFirstChildOfClass("Players").LocalPlayer.Character = CloneChar
  185. if DeadChar:FindFirstChildOfClass("Folder") then DeadChar:FindFirstChildOfClass("Folder"):Destroy() end
  186. end)
  187. end)
  188. game:GetService("StarterGui"):SetCore("ResetButtonCallback", resetBindable)
  189.  
  190. coroutine.wrap(function()
  191. while true do
  192. game:GetService("RunService").RenderStepped:wait()
  193. if not CloneChar or not CloneChar:FindFirstChild("Head") or not CloneChar:FindFirstChildOfClass("Humanoid") or CloneChar:FindFirstChildOfClass("Humanoid").Health <= 0 and not DeadChar or not DeadChar:FindFirstChild("Head") or not DeadChar:FindFirstChildOfClass("Humanoid") or DeadChar:FindFirstChildOfClass("Humanoid").Health <= 0 then
  194. HumanDied = true
  195. pcall(function()
  196. game:FindFirstChildOfClass("Players").LocalPlayer.Character = DeadChar
  197. DeadChar.Head:Destroy()
  198. DeadChar:FindFirstChildOfClass("Humanoid"):Destroy()
  199. game:FindFirstChildOfClass("Players").LocalPlayer.Character = CloneChar
  200. if DeadChar:FindFirstChildOfClass("Folder") then DeadChar:FindFirstChildOfClass("Folder"):Destroy() end
  201. end)
  202. if resetBindable then
  203. game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  204. resetBindable:Destroy()
  205. end
  206. break
  207. end
  208. end
  209. end)()
  210.  
  211.  
  212. SCIFIMOVIELOL(DeadChar["Head"],CloneChar["Head"])
  213. SCIFIMOVIELOL(DeadChar["Torso"],CloneChar["Torso"])
  214. SCIFIMOVIELOL(DeadChar["Left Arm"],CloneChar["Left Arm"])
  215. SCIFIMOVIELOL(DeadChar["Right Arm"],CloneChar["Right Arm"])
  216. SCIFIMOVIELOL(DeadChar["Left Leg"],CloneChar["Left Leg"])
  217. SCIFIMOVIELOL(DeadChar["Right Leg"],CloneChar["Right Leg"])
  218.  
  219. for _,v in pairs(DeadChar:GetChildren()) do
  220. if v:IsA("BasePart") and v.Name ~= "Head" then
  221. --[[local bv = Instance.new("BodyVelocity",v)
  222. bv.Velocity = Vector3.new(0,0,0)
  223. coroutine.wrap(function()
  224. while true do
  225. game:GetService("RunService").RenderStepped:wait()
  226. if HumanDied then break end
  227. v.CFrame = CloneChar[v.Name].CFrame
  228. end
  229. end)()]]
  230. elseif v:IsA("BasePart") and v.Name == "Head" then
  231. local bv = Instance.new("BodyVelocity",v)
  232. bv.Velocity = Vector3.new(0,0,0)
  233. coroutine.wrap(function()
  234. while true do
  235. game:GetService("RunService").RenderStepped:wait()
  236. if HumanDied then break end
  237. v.CFrame = DeadChar.Torso.CFrame * CFrame.new(0,1.5,0)
  238. end
  239. end)()
  240. end
  241. end
  242.  
  243. for _,BodyParts in next, CloneChar:GetDescendants() do
  244. if BodyParts:IsA("BasePart") or BodyParts:IsA("Part") then
  245. BodyParts.Transparency = 1 end end
  246. game:GetService("RunService").RenderStepped:wait()
  247. game:FindFirstChildOfClass("Players").LocalPlayer.Character = CloneChar
  248. game:FindFirstChildOfClass("Workspace"):FindFirstChildOfClass("Camera").CameraSubject = CloneChar.Humanoid
  249.  
  250. for _,v in next, DeadChar:GetChildren() do
  251. if v:IsA("Accessory") then
  252. if v.Handle:FindFirstChildOfClass("Weld") then v.Handle:FindFirstChildOfClass("Weld"):Destroy() end
  253. end
  254. end
  255.  
  256. if ANIMATIONHERE then ANIMATIONHERE.Parent = CloneChar end
  257.  
  258. --3DG
  259. --three dimensional grapples
  260. function clerp(c1,c2,al)
  261. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  262. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  263. for i,v in pairs(com1) do
  264. com1[i] = v+(com2[i]-v)*al
  265. end
  266. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  267. end
  268.  
  269. plr = game:service'Players'.LocalPlayer
  270. plrgui = plr.PlayerGui
  271. char = plr.Character
  272. mouse = plr:GetMouse()
  273. humanoid = char:findFirstChild("Humanoid")
  274. torso = char:findFirstChild("Torso")
  275. head = char.Head
  276. ra = char:findFirstChild("Right Arm")
  277. la = char:findFirstChild("Left Arm")
  278. rl = char:findFirstChild("Right Leg")
  279. ll = char:findFirstChild("Left Leg")
  280. rs = torso:findFirstChild("Right Shoulder")
  281. ls = torso:findFirstChild("Left Shoulder")
  282. rh = torso:findFirstChild("Right Hip")
  283. lh = torso:findFirstChild("Left Hip")
  284. neck = torso:findFirstChild("Neck")
  285. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  286. rootpart = char:findFirstChild("HumanoidRootPart")
  287. camera = workspace.CurrentCamera
  288. anim = char:findFirstChild("Animate")
  289. if anim then
  290. anim:Destroy()
  291. end
  292.  
  293. local lal = Instance.new('Sound', head)
  294. lal.SoundId = "rbxassetid://145048800"
  295. lal.Volume = 1
  296. lal:play()
  297. game:service'Debris':AddItem(lal, 8)
  298.  
  299. local rm = Instance.new("Weld", torso)
  300. rm.C0 = CFrame.new(1.5, 0.5, 0)
  301. rm.C1 = CFrame.new(0, 0.5, 0)
  302. rm.Part0 = torso
  303. rm.Part1 = ra
  304. rm.Name = 'Right Shoulder'
  305.  
  306. local lm = Instance.new("Weld", torso)
  307. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  308. lm.C1 = CFrame.new(0, 0.5, 0)
  309. lm.Part0 = torso
  310. lm.Part1 = la
  311. lm.Name = 'Left Shoulder'
  312.  
  313. local rlegm = Instance.new("Weld", torso)
  314. rlegm.C0 = CFrame.new(0.5, -1, 0)
  315. rlegm.C1 = CFrame.new(0, 1, 0)
  316. rlegm.Part0 = torso
  317. rlegm.Part1 = rl
  318.  
  319. local llegm = Instance.new("Weld", torso)
  320. llegm.C0 = CFrame.new(-0.5, -1, 0)
  321. llegm.C1 = CFrame.new(0, 1, 0)
  322. llegm.Part0 = torso
  323. llegm.Part1 = ll
  324.  
  325. rj.C0 = CFrame.new()
  326. rj.C1 = CFrame.new()
  327.  
  328. neck.C0 = CFrame.new(0, 1, 0)
  329. neck.C1 = CFrame.new(0, -0.5, 0)
  330.  
  331.  
  332. local speed = 0.3
  333. local angle = 0
  334. local anglespeed = 1
  335. rsc0 = rm.C0
  336. lsc0 = lm.C0
  337. llc0 = llegm.C0
  338. rlc0 = rlegm.C0
  339. rootc0 = rj.C0
  340. neckc0 = neck.C0
  341.  
  342. model = Instance.new('Model', char)
  343. model.Name = '3DG'
  344. function Weld(part0,part1,c1,c0)
  345. local w = Instance.new('Weld', model)
  346. w.Part0 = part0
  347. w.Part1 = part1
  348. w.C0 = c0 or CFrame.new()
  349. w.C1 = c1 or CFrame.new()
  350. end
  351.  
  352. local BasePart = Instance.new('Part')
  353. BasePart.FormFactor = 'Custom'
  354. BasePart.Material = 'Neon'
  355. BasePart.CanCollide = false
  356. BasePart.Locked = true
  357. BasePart.TopSurface = 10
  358. BasePart.BottomSurface = 10
  359. BasePart.LeftSurface = 10
  360. BasePart.RightSurface = 10
  361. BasePart.FrontSurface = 10
  362. BasePart.BackSurface = 10
  363. BasePart:breakJoints()
  364.  
  365.  
  366. for i = 1,2 do
  367. local strap = BasePart:clone()
  368. strap.Size = Vector3.new(1.025,.2,1.025)
  369. strap.Parent = model
  370. strap.BrickColor = BrickColor.new()
  371. strap:BreakJoints()
  372. Weld(strap, la, CFrame.new(0, .1 - i/3,0))
  373. end
  374.  
  375. for i = 1,2 do
  376. local strap = BasePart:clone()
  377. strap.Size = Vector3.new(1.025,.2,1.025)
  378. strap.Parent = model
  379. strap.BrickColor = BrickColor.new()
  380. strap:BreakJoints()
  381. Weld(strap, ra, CFrame.new(0, .1 - i/3,0))
  382. end
  383.  
  384. local ropeStart = BasePart:clone()
  385. ropeStart.Size = Vector3.new(.2,1.75,.2)
  386. ropeStart.Parent = model
  387. ropeStart.BrickColor = BrickColor.new()
  388. ropeStart:BreakJoints()
  389. Weld(ropeStart, ra, CFrame.new(-.45, -.5, 0))
  390. local ropeStart2 = BasePart:clone()
  391. ropeStart2.Size = Vector3.new(.2,1.75,.2)
  392. ropeStart2.Parent = model
  393. ropeStart2.BrickColor = BrickColor.new()
  394. ropeStart2:BreakJoints()
  395. Weld(ropeStart2, la, CFrame.new(.45, -.5, 0))
  396.  
  397. local ropeCont = BasePart:clone()
  398. ropeCont.Size = Vector3.new(.8,.2,.8)
  399. ropeCont.Parent = model
  400. ropeCont.BrickColor = BrickColor.new(199)
  401. ropeCont:BreakJoints()
  402. Instance.new('CylinderMesh', ropeCont)
  403. Weld(ropeCont, la, CFrame.new(.5, .05, 0), CFrame.Angles(math.pi/2, math.pi/2, 0))
  404. local ropeCont2 = BasePart:clone()
  405. ropeCont2.Size = Vector3.new(.8,.2,.8)
  406. ropeCont2.Parent = model
  407. ropeCont2.BrickColor = BrickColor.new(199)
  408. ropeCont2:BreakJoints()
  409. Instance.new('CylinderMesh', ropeCont2)
  410. Weld(ropeCont2, ra, CFrame.new(-.5, .05, 0), CFrame.Angles(math.pi/2, math.pi/2, 0))
  411.  
  412. local GasTank = BasePart:clone()
  413. GasTank.Size = Vector3.new(.8,1.4,.8)
  414. GasTank.Parent = model
  415. GasTank.BrickColor = BrickColor.new(194)
  416. GasTank:BreakJoints()
  417. Instance.new('SpecialMesh', GasTank)
  418. Weld(GasTank, ra, CFrame.new(0, -.25, .5))
  419. local GasTank2 = BasePart:clone()
  420. GasTank2.Size = Vector3.new(.8,1.4,.8)
  421. GasTank2.Parent = model
  422. GasTank2.BrickColor = BrickColor.new(194)
  423. GasTank2:BreakJoints()
  424. Instance.new('SpecialMesh', GasTank2)
  425. Weld(GasTank2, la, CFrame.new(0, -.25, .5))
  426.  
  427. local pa = BasePart:clone()
  428. pa.BrickColor = BrickColor.new()
  429. pa.Anchored = true
  430. pa.Size = Vector3.new(.5,1,.5)
  431. local special = Instance.new('SpecialMesh', pa)
  432. special.MeshId = "rbxassetid://1033714"
  433. special.Scale = Vector3.new(.25,2,.25)
  434. local ropePA = BasePart:clone()
  435. ropePA.Parent = pa
  436. ropePA.Anchored = true
  437. ropePA.BrickColor = BrickColor.new'White'
  438. Instance.new('CylinderMesh', ropePA).Scale = Vector3.new(.25,1,.25)
  439.  
  440. local pa2 = BasePart:clone()
  441. pa2.BrickColor = BrickColor.new()
  442. pa2.Anchored = true
  443. pa2.Size = Vector3.new(.5,1,.5)
  444. local special = Instance.new('SpecialMesh', pa2)
  445. special.MeshId = "rbxassetid://1033714"
  446. special.Scale = Vector3.new(.25,2,.25)
  447. local ropePA2 = BasePart:clone()
  448. ropePA2.Parent = pa2
  449. ropePA2.Anchored = true
  450. ropePA2.BrickColor = BrickColor.new'White'
  451. Instance.new('CylinderMesh', ropePA2).Scale = Vector3.new(.25,1,.25)
  452.  
  453. local pa3 = BasePart:clone()
  454. pa3.Transparency = 1
  455. pa3.Anchored = true
  456. pa3.Size = Vector3.new(2,2,2)
  457.  
  458. local torso3 = Instance.new('Part', char)
  459. torso3.Name = 'FakeTorsoForStuff'
  460. torso3.Size = torso.Size
  461. torso3.Transparency = 1
  462. torso3:breakJoints()
  463. Weld(torso3, torso)
  464.  
  465. Instance.new('PointLight', torso)
  466.  
  467. local jumpmode
  468.  
  469. local SGui = Instance.new('ScreenGui', plr.PlayerGui)
  470. local JumpButton = Instance.new('TextButton', SGui)
  471. JumpButton.BackgroundColor = BrickColor.new('Dark stone grey')
  472. JumpButton.BorderSizePixel = 4
  473. JumpButton.TextColor3 = Color3.new(1,1,1)
  474. JumpButton.BorderColor3 = Color3.new()
  475. JumpButton.TextStrokeTransparency = .5
  476. JumpButton.FontSize = 'Size12'
  477. JumpButton.Text = 'Thrust up when grappled'
  478. JumpButton.Size = UDim2.new(0, 250, 0, 50)
  479. JumpButton.Position = UDim2.new(1, -250, 1, -50)
  480. local OnOff = Instance.new('Frame', JumpButton)
  481. OnOff.BackgroundColor3 = Color3.new()
  482. OnOff.BorderSizePixel = 0
  483. OnOff.Size = UDim2.new(.8, 0, 0, 5)
  484. OnOff.Position = UDim2.new(.1, 0, 1, -10)
  485. JumpButton.MouseButton1Down:connect(function()
  486. jumpmode = not jumpmode
  487. if jumpmode then
  488. OnOff.BackgroundColor3 = Color3.new(0,1,0)
  489. else
  490. OnOff.BackgroundColor3 = Color3.new()
  491. end
  492. end)
  493.  
  494.  
  495.  
  496. local bodygyro = Instance.new('BodyGyro', torso)
  497. bodygyro.maxTorque = Vector3.new(14e16,14e16,14e16)
  498. bodygyro.P = 10000
  499.  
  500. ro=Instance.new("RocketPropulsion",rootpart)
  501. ro.Name = 'RockatPropoolsun'
  502. ro.MaxSpeed=200
  503. ro.MaxThrust=8000
  504. ro.TurnP = 0
  505. ro.MaxTorque=Vector3.new(14e16,14e16,14e16)
  506.  
  507. ro2=Instance.new("RocketPropulsion",torso)
  508. ro2.Name = 'RockatPropoolsun2'
  509. ro2.MaxSpeed=200
  510. ro2.MaxThrust=8000
  511. ro2.TurnP = 0
  512. ro2.MaxTorque=Vector3.new(14e16,14e16,14e16)
  513. local run
  514. mouse.KeyDown:connect(function(k)
  515. if k:byte() == 48 then
  516. run = not run
  517. if run then
  518. humanoid.WalkSpeed = 22
  519. else
  520. humanoid.WalkSpeed = 16
  521. end
  522. end
  523. if k:byte() == 32 then
  524. if Grapple1 or Grapple2 then
  525. wait()
  526. humanoid.PlatformStand = true
  527. rlegm.C0 = rlc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, .1)
  528. llegm.C0 = llc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, -.1)
  529. if pa3.Parent ~= nil then
  530. ro3:Fire()
  531. end
  532. if Grapple1 then
  533. ro:Fire()
  534. end
  535. if Grapple2 then
  536. ro2:Fire()
  537. end
  538. end
  539. end
  540. if k=="q" then
  541. local sound = Instance.new('Sound', head)
  542. sound.SoundId = "rbxassetid://160248505"
  543. sound.Pitch = 3+math.random()/3
  544. sound.Volume = .8
  545. sound:play()
  546. game:service'Debris':AddItem(sound,4)
  547. lm.Parent = torso
  548. pa.CFrame = la.CFrame
  549. local grapplepos = pa.Position
  550. local grapplevelocity = (mouse.Hit.p - grapplepos).unit*50
  551. local lastgrapplepos = pa.Position
  552. while wait() do
  553. lastgrapplepos = grapplepos
  554. grapplepos = grapplepos + grapplevelocity
  555. local RayCast = Ray.new(lastgrapplepos, (grapplepos - lastgrapplepos))
  556. local hit, hitpos = workspace:FindPartOnRay(RayCast, char)
  557. if (torso.Position - pa.Position).magnitude > 900 then
  558. pa.Parent = nil
  559. break
  560. end
  561. pa.Anchored = true
  562. pa.CFrame = CFrame.new(grapplepos, grapplepos+grapplevelocity) * CFrame.Angles(math.pi/2, 0, 0)
  563. pa.Parent = char
  564. if hit then
  565. local rotX,rotY,rotZ = pa.CFrame:toEulerAnglesXYZ()
  566. local sound = Instance.new('Sound', head)
  567. sound.SoundId = "rbxassetid://146466021"
  568. sound.Pitch = 1.2+math.random()/3
  569. sound.Volume = .25
  570. sound:play()
  571. game:service'Debris':AddItem(sound,4)
  572. pa.Parent = char
  573. pa.CFrame=CFrame.new(hitpos.x, hitpos.y, hitpos.z)*CFrame.Angles(rotX,rotY,rotZ)*CFrame.Angles(math.pi,0,0)
  574. ro.Target=pa
  575. lm.Parent = torso
  576. local ray = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  577. local hitz, enz = workspace:FindPartOnRay(ray, char)
  578. local hum = hit and hit.Parent and hit.Parent:findFirstChild'Humanoid'
  579. if hum then
  580. hum:TakeDamage(math.random(7,11))
  581. end
  582. local hum = hit and hit.Parent and hit.Parent.Parent and hit.Parent.Parent:findFirstChild'Humanoid'
  583. if hum then
  584. hum:TakeDamage(math.random(7,11))
  585. end
  586. if pa.Parent ~= nil and humanoid.PlatformStand or not (hitz and hitz.CanCollide) then
  587. ro:Fire()
  588. if jumpmode then
  589. humanoid.Jump = true
  590. end
  591. end
  592. Gweld = Instance.new("Weld", char)
  593. Gweld.C0 = hit.CFrame:toObjectSpace(pa.CFrame)
  594. Gweld.Part0 = hit
  595. Gweld.Part1 = pa
  596. pa.Anchored = false
  597. Grapple1Hit = hit
  598. Grapple1 = true
  599. break
  600. end
  601. pa.Anchored = true
  602. pa.CFrame = CFrame.new(grapplepos, grapplepos+grapplevelocity) * CFrame.Angles(math.pi/2, 0, 0)
  603. end
  604. end
  605. if k=="e" then
  606. local sound = Instance.new('Sound', head)
  607. sound.SoundId = "rbxassetid://160248505"
  608. sound.Pitch = 3+math.random()/3
  609. sound.Volume = .8
  610. sound:play()
  611. game:service'Debris':AddItem(sound,4)
  612. pa2.CFrame = ra.CFrame
  613. rm.Parent = torso
  614. local grapplepos = pa2.Position
  615. local grapplevelocity = (mouse.Hit.p - grapplepos).unit*50
  616. local lastgrapplepos = pa2.Position
  617. while wait() do
  618. lastgrapplepos = grapplepos
  619. grapplepos = grapplepos + grapplevelocity
  620. local RayCast = Ray.new(lastgrapplepos, (grapplepos - lastgrapplepos))
  621. local hit, hitpos = workspace:FindPartOnRay(RayCast, char)
  622. if (torso.Position - pa2.Position).magnitude > 900 then
  623. pa2.Parent = nil
  624. break
  625. end
  626. pa2.Anchored = true
  627. pa2.CFrame = CFrame.new(grapplepos, grapplepos+grapplevelocity) * CFrame.Angles(math.pi/2, 0, 0)
  628. pa2.Parent = char
  629. if hit then
  630. local rotX,rotY,rotZ = pa2.CFrame:toEulerAnglesXYZ()
  631. local sound = Instance.new('Sound', head)
  632. sound.SoundId = "rbxassetid://146466021"
  633. sound.Pitch = 1.2+math.random()/3
  634. sound.Volume = .25
  635. sound:play()
  636. game:service'Debris':AddItem(sound,4)
  637. pa2.Parent = char
  638. pa2.CFrame=CFrame.new(hitpos.x, hitpos.y, hitpos.z)*CFrame.Angles(rotX,rotY,rotZ)*CFrame.Angles(math.pi,0,0)
  639. ro2.Target=pa2
  640. rm.Parent = torso
  641. local ray = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  642. local hitz, enz = workspace:FindPartOnRay(ray, char)
  643. local hum = hit and hit.Parent and hit.Parent:findFirstChild'Humanoid'
  644. if hum then
  645. hum:TakeDamage(math.random(7,11))
  646. end
  647. local hum = hit and hit.Parent and hit.Parent.Parent and hit.Parent.Parent:findFirstChild'Humanoid'
  648. if hum then
  649. hum:TakeDamage(math.random(7,11))
  650. end
  651. if pa2.Parent ~= nil and humanoid.PlatformStand or not (hitz and hitz.CanCollide) then
  652. if jumpmode then
  653. humanoid.Jump = true
  654. end
  655. ro2:Fire()
  656. end
  657. Gweld2 = Instance.new("Weld", char)
  658. Gweld2.C0 = hit.CFrame:toObjectSpace(pa2.CFrame)
  659. Gweld2.Part0 = hit
  660. Gweld2.Part1 = pa2
  661. pa2.Anchored = false
  662. Grapple2Hit = hit
  663. Grapple2 = true
  664. break
  665. end
  666. pa2.Anchored = true
  667. pa2.CFrame = CFrame.new(grapplepos, grapplepos+grapplevelocity) * CFrame.Angles(math.pi/2, 0, 0)
  668. end
  669. end
  670. end)
  671.  
  672. mouse.KeyUp:connect(function(k)
  673. if k=="q" then
  674. pcall(function() Gweld:remove() end)
  675. game:service'RunService'.RenderStepped:wait()
  676. pcall(function() pa.Parent = nil Grapple1 = false end)
  677. pcall(function() ro:Abort() end)
  678. game:service'RunService'.RenderStepped:wait()
  679. pcall(function() ro2.Target=pa2 if Grapple2 and humanoid.PlatformStand or Grapple2 and not hitz then ro2:Fire() end end)
  680. elseif k=="e" then
  681. pcall(function() Gweld2:remove() end)
  682. game:service'RunService'.RenderStepped:wait()
  683. pcall(function() pa2.Parent = nil Grapple2 = false end)
  684. pcall(function() ro2:Abort() end)
  685. game:service'RunService'.RenderStepped:wait()
  686. pcall(function() ro.Target=pa if Grapple1 and humanoid.PlatformStand or Grapple1 and not hitz then ro:Fire() end end)
  687. end
  688. end)
  689.  
  690.  
  691. local MidPointUsed = false
  692. local TorsoSmoke = Instance.new('Smoke', torso)
  693.  
  694.  
  695. game:service'RunService'.RenderStepped:connect(function()
  696. angle = (angle % 100) + anglespeed/10
  697. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  698. local rscf = rsc0
  699. local lscf = lsc0
  700. local rlcf = rlc0
  701. local llcf = llc0
  702. local rjcf = rootc0
  703. local ncf = neckc0
  704. for i,object in pairs(char:children()) do
  705. if object:IsA("Tool") then
  706. tool = true
  707. if not debounce then
  708. for x,value in pairs(object:children()) do
  709. if value:IsA("StringValue") and value.Name == "toolanim" and value.Value == "Slash" then
  710. debounce = true
  711. coroutine.wrap(function()
  712. slashing = true
  713. wait(.25)
  714. slashing = false
  715. debounce = false
  716. end)()
  717. value:Destroy()
  718. end
  719. end
  720. end
  721. elseif not object:IsA'Tool' then
  722. tool = false
  723. end
  724. end
  725. if not humanoid.PlatformStand then
  726. if humanoid.Sit == true then
  727. speed = 0.2
  728. anglespeed = 1/4
  729. ncf = neckc0 * CFrame.Angles(0, 0, 0)
  730. rjcf = rootc0
  731. rscf = rsc0 * CFrame.Angles(math.pi/2+math.sin(-angle)*0.05, 0, 0)
  732. lscf = lsc0 * CFrame.Angles(math.pi/2+math.sin(-angle)*0.05, 0, 0)
  733. rlcf = rlc0 * CFrame.Angles(math.pi/2+-math.rad(.2), 0, math.rad(.2))
  734. llcf = llc0 * CFrame.Angles(math.pi/2+math.rad(.2), 0, -math.rad(.2))
  735. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  736. anglespeed = 1/4
  737. speed = 0.2
  738. ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.075, 0, 0)
  739. rjcf = rootc0
  740. rscf = rsc0 * CFrame.new(0, math.sin(angle)*0.05, 0) * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
  741. lscf = lsc0 * CFrame.new(0, math.sin(angle)*0.05, 0) * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
  742. rlcf = rlc0 * CFrame.Angles(-math.rad(.2), 0, math.rad(.2))
  743. llcf = llc0 * CFrame.Angles(math.rad(.2), 0, -math.rad(.2))
  744. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 20 then
  745. anglespeed = 1.7
  746. speed = 0.25
  747. anglespeed = 2.2
  748. speed = 0.25
  749. ncf = neckc0 * CFrame.Angles(0, 0, 0)
  750. rjcf = rootc0 * CFrame.new(0, math.abs(math.sin(angle))*.055, 0) * CFrame.Angles(-math.rad(1), 0, 0)
  751. rscf = rsc0 * CFrame.Angles(math.sin(angle)*.5, 0, -math.rad(1))
  752. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*.5, 0, math.rad(1))
  753. 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))
  754. 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))
  755. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
  756. local RotVelocityZ = torso.RotVelocity.Y
  757. if RotVelocityZ >= 15 then
  758. RotVelocityZ = 15
  759. elseif RotVelocityZ <= -15 then
  760. RotVelocityZ = -15
  761. end
  762. speed = 0.25
  763. anglespeed = 2.7
  764. ncf = neckc0 * CFrame.Angles(0, 0, -math.sin(angle)*.045)
  765. 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)
  766. 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)
  767. 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)
  768. 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))
  769. 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))
  770. end
  771. if tool then
  772. rscf = rsc0 * CFrame.Angles(math.pi/2, 0, 0)
  773. if slashing then
  774. rscf = rsc0
  775. end
  776. end
  777. end
  778. if pa2.Parent == nil then
  779. rm.C0 = clerp(rm.C0,rscf,speed)
  780. end
  781. if pa.Parent == nil then
  782. lm.C0 = clerp(lm.C0,lscf,speed)
  783. end
  784. rj.C0 = clerp(rj.C0,rjcf,speed)
  785. neck.C0 = clerp(neck.C0,ncf,speed)
  786. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  787. llegm.C0 = clerp(llegm.C0,llcf,speed)
  788. end)
  789.  
  790.  
  791.  
  792. game:service'RunService'.RenderStepped:connect(function()
  793. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 225 then
  794. TorsoSmoke.Enabled = true
  795. else
  796. TorsoSmoke.Enabled = false
  797. end
  798. local ray = Ray.new(rootpart.Position, Vector3.new(0, -7, 0))
  799. local hitz, enz = workspace:FindPartOnRay(ray, char)
  800. if hitz and hitz.CanCollide and pa.Parent ~= char and pa2.Parent ~= char then
  801. bodygyro.Parent = nil
  802. humanoid.PlatformStand = false
  803. end
  804. if pa.Parent ~= nil or Grapple1 then
  805. local size = (ropeStart2.Position-pa.Position).magnitude
  806. ropePA.Size = Vector3.new(.2, size, .2)
  807. ropePA.CFrame = CFrame.new(ropeStart2.Position, pa.Position) * CFrame.Angles(math.pi/2, 0, 0) * CFrame.new(0, -size/2, 0)
  808. lm.C0 = CFrame.new(Vector3.new(lsc0.x, lsc0.y, lsc0.z), torso.CFrame:pointToObjectSpace(pa.Position)) * CFrame.Angles(math.pi/2, 0, 0)
  809. else
  810. if not debounce and humanoid.PlatformStand then
  811. lm.C0 = lsc0 * CFrame.Angles(-.15, 0, -.15)
  812. end
  813. end
  814. if pa2.Parent ~= nil or Grapple2 then
  815. local size = (ropeStart.Position-pa2.Position).magnitude
  816. ropePA2.Size = Vector3.new(.2, size, .2)
  817. ropePA2.CFrame = CFrame.new(ropeStart.Position, pa2.Position) * CFrame.Angles(math.pi/2, 0, 0) * CFrame.new(0, -size/2, 0)
  818. rm.C0 = CFrame.new(Vector3.new(rsc0.x, rsc0.y, rsc0.z), torso.CFrame:pointToObjectSpace(pa2.Position)) * CFrame.Angles(math.pi/2, 0, 0)
  819. else
  820. if not debounce and humanoid.PlatformStand then
  821. rm.C0 = rsc0 * CFrame.Angles(-.15, 0, .15)
  822. end
  823. end
  824. if Grapple1 and Grapple1Hit.Parent == nil then
  825. pcall(function() Gweld:remove() end)
  826. pa.Parent = nil
  827. Grapple1 = false
  828. ro:Abort()
  829. end
  830. if Grapple2 and Grapple2Hit.Parent == nil then
  831. pcall(function() Gweld2:remove() end)
  832. pa2.Parent = nil
  833. Grapple2 = false
  834. ro2:Abort()
  835. end
  836. if Grapple1 and Grapple2 and (humanoid.PlatformStand or not hitz) then
  837. local distance = (pa.Position-pa2.Position).magnitude
  838. bodygyro.Parent = torso
  839. torso.CFrame = CFrame.new(torso.Position, Vector3.new(camera.CoordinateFrame.x, camera.CoordinateFrame.y, camera.CoordinateFrame.z)) * CFrame.Angles(0, math.pi, 0)
  840. bodygyro.cframe = CFrame.new(torso.Position, Vector3.new(camera.CoordinateFrame.x, camera.CoordinateFrame.y, camera.CoordinateFrame.z)) * CFrame.Angles(0, math.pi, 0)
  841. pa3.Parent = char
  842. if distance <= .5 then
  843. pa3.CFrame = pa.CFrame
  844. elseif distance > .5 then
  845. pa3.CFrame = CFrame.new(pa.Position, pa2.Position) * CFrame.new(0, 0, -distance/2)
  846. end
  847. if not MidPointUsed then
  848. ro3=Instance.new("RocketPropulsion",torso3)
  849. ro3.Name = 'RockatPropoolsun3'
  850. ro3.MaxSpeed=250
  851. ro3.MaxThrust=16000
  852. ro3.TurnP = 0
  853. ro3.TurnD = 0
  854. ro3.MaxTorque=Vector3.new(14e16,14e16,14e16)
  855. if humanoid.PlatformStand or not hitz then
  856. ro:Abort()
  857. ro2:Abort()
  858. end
  859. ro3.Target = pa3
  860. if humanoid.PlatformStand or not hitz then
  861. ro3:Fire()
  862. end
  863. MidPointUsed = true
  864. end
  865. elseif (not Grapple1 or not Grapple2) and MidPointUsed == true and (humanoid.PlatformStand or not hitz) then
  866. pa3.Parent = nil
  867. MidPointUsed = false
  868. ro3:Abort()
  869. ro3:Destroy()
  870. if Grapple1 then
  871. ro:Fire()
  872. end
  873. if Grapple2 then
  874. ro2:Fire()
  875. end
  876. end
  877. if not Grapple1 then
  878. pcall(function() Gweld:remove() end)
  879. end
  880. if not Grapple2 then
  881. pcall(function() Gweld2:remove() end)
  882. end
  883. if (Grapple1 or Grapple2) and not hitz then
  884. bodygyro.Parent = torso
  885. humanoid.PlatformStand = true
  886. rlegm.Parent = torso
  887. llegm.Parent = torso
  888. lm.Parent = torso
  889. rm.Parent = torso
  890. rlegm.C0 = rlc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, .1)
  891. llegm.C0 = llc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, -.1)
  892. end
  893. if (Grapple1 or Grapple2) and not hitz or humanoid.PlatformStand then
  894. bodygyro.Parent = torso
  895. bodygyro.cframe = CFrame.new(torso.Position, Vector3.new(camera.CoordinateFrame.x, camera.CoordinateFrame.y, camera.CoordinateFrame.z)) * CFrame.Angles(0, math.pi, 0)
  896. rlegm.Parent = torso
  897. llegm.Parent = torso
  898. rlegm.C0 = rlc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, .1)
  899. llegm.C0 = llc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, -.1)
  900. end
  901. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement