Advertisement
-----------------

Another 3dmg *doesnt work*

Mar 21st, 2020
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.58 KB | None | 0 0
  1. local function OnClick(player)
  2. if player then
  3. if not player.Backpack:findFirstChild("Gear") then
  4. script.Gear:Clone().Parent = player.Backpack
  5. end
  6. end
  7. end
  8. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  9. local Folder = script:WaitForChild("Events")
  10. local ODMGEvent = Folder:WaitForChild("EquipODMG")
  11. local ReloadEvent = Folder:WaitForChild("BladeReload")
  12. local DropBlades = Folder:WaitForChild("DropBlades")
  13. local AttackingEvent = Folder:WaitForChild("AttackingEvent")
  14. local Player = game:GetService("Players").LocalPlayer
  15. local Character = Player.Character
  16. local Mouse = Player:GetMouse()
  17. local UserInputService = game:GetService("UserInputService")
  18. ODMGEvent:FireServer()
  19. wait(1)
  20.  
  21. local Speed = script.Config.Speed.Value
  22. local GasLeft = script.Config.GasLeft.Value
  23. local BladesLeft = script.Config.BladesLeft.Value
  24.  
  25. local Blades = false
  26.  
  27. local mouse = Player:GetMouse()
  28.  
  29. local canAttack = false
  30. local attackDebounce = false
  31. local leftBlade = Character["Left Arm"]:waitForChild("Blade")
  32. local rightBlade = Character["Right Arm"]:waitForChild("Blade")
  33.  
  34. local BladesGui = script.BladeGui:Clone()
  35. BladesGui.Parent = Player.PlayerGui
  36. local TextL = BladesGui.TextLabel
  37. TextL.Text = "Blades: "..BladesLeft
  38.  
  39. local GasGui = script.GasGui:Clone()
  40. GasGui.Parent = Player.PlayerGui
  41. local TextLa = GasGui.TextLabel
  42. TextLa.Text = "Gas: "..GasLeft
  43.  
  44. local player = game.Players.LocalPlayer
  45. local mouse = player:GetMouse()
  46.  
  47. local cannotGrappleon = {
  48. Baseplate = true,
  49. ["HumanoidRootPart"] = true,
  50. Hill1 = true,
  51. Hill2 = true,
  52. Hill3 = true,
  53. Hill4 = true,
  54. Hill5 = true,
  55. Hill = true,
  56. ground = true,
  57. path = true,
  58. flat = true,
  59. BasePlate = true,
  60. Terrain = true,
  61. }
  62.  
  63. local hatsfixed = {}
  64.  
  65. local function MassUpdate(child)
  66. if child then if child:IsA("StringValue") then return end end
  67. for n,i in pairs(hatsfixed) do if i == child then return end end
  68. local Mass = 0
  69. for n,i in pairs(Character:GetChildren()) do
  70. if i:IsA("Part") then
  71. Mass = Mass + i:GetMass()
  72. elseif i:IsA("Hat") then
  73. hatsfixed[#hatsfixed+1] = i
  74. i.Parent = game.Lighting
  75. i.Handle.FormFactor = "Custom"
  76. i.Handle.Size = Vector3.new(.2,.2,.2)
  77. i.Parent = Character
  78. end
  79. end
  80. end
  81.  
  82. local Stalling = false
  83. local StallingDistance = 0
  84. local StallingDirectionDown = false
  85. local StallingDirectionUp = false
  86.  
  87. local Anim = Character.Humanoid:LoadAnimation(script.Animations.Grapple)
  88. local LAnim = Character.Humanoid:LoadAnimation(script.Animations.LGrapple)
  89. local RAnim = Character.Humanoid:LoadAnimation(script.Animations.RGrapple)
  90. local B1 = Character.Humanoid:LoadAnimation(script.Animations.Break1)
  91. local B2 = Character.Humanoid:LoadAnimation(script.Animations.Break2)
  92.  
  93. local Gas = false
  94. local DriftEnabled = false
  95.  
  96. local JumpRecoil = 2
  97.  
  98. local DriftRight = false
  99. local DriftLeft = false
  100.  
  101. local Force = 5000
  102. local CastSpeed = 4
  103. local RecoilTime = 4.5
  104. local RefillAnim = 4710657238 --When you are refilling at the "Refiller", change the number to your animation id.
  105. local RightGoal = CFrame.new()
  106. local LeftGoal = CFrame.new()
  107. local RightGoalLocal = CFrame.new()
  108. local LeftGoalLocal = CFrame.new()
  109. local RightGoalTarget = nil
  110. local LeftGoalTarget = nil
  111.  
  112. local RightFirePosition = CFrame.new(1.05001497, -0.824505806, -0.600113869)
  113. local LeftFirePosition = CFrame.new(-1.04998493, -0.824505806, -0.600113869)
  114.  
  115. local Velocity = Instance.new("BodyVelocity")
  116. Velocity.Name = "Velocity"
  117. Velocity.P = 20000
  118. Velocity.maxForce = Vector3.new()
  119. Velocity.Parent = Character.HumanoidRootPart
  120.  
  121. local Rotation = Instance.new("BodyGyro")
  122. Rotation.Name = "Rotation"
  123. Rotation.P = 5000
  124. Rotation.maxTorque = Vector3.new()
  125. Rotation.D = 500
  126. Rotation.Parent = Character.HumanoidRootPart
  127.  
  128. local RGrappleBool = Instance.new("BoolValue",Character)
  129. RGrappleBool.Name = "Right Grapple"
  130. RGrappleBool.Value = false
  131.  
  132. local RGoalVal = Instance.new("Vector3Value",RGrappleBool)
  133. RGoalVal.Name = "RightGoal"
  134.  
  135. local LGrappleBool = Instance.new("BoolValue",Character)
  136. LGrappleBool.Name = "Left Grapple"
  137. LGrappleBool.Value = false
  138.  
  139. local LGoalVal = Instance.new("Vector3Value",LGrappleBool)
  140. LGoalVal.Name = "LeftGoal"
  141.  
  142. local GrappleBin = Instance.new("Model",workspace.CurrentCamera)
  143. GrappleBin.Name = "Grapples"
  144. game.Players.LocalPlayer:GetMouse().TargetFilter = GrappleBin
  145.  
  146. local RightGrapple = Instance.new("Part",GrappleBin)
  147. RightGrapple.Name = "Right Grapple"
  148. RightGrapple.BrickColor = BrickColor.new("Really black")
  149. RightGrapple.Anchored = true
  150. RightGrapple.FormFactor = Enum.FormFactor.Custom
  151. RightGrapple.Transparency = 1
  152. RightGrapple.CanCollide = false
  153.  
  154. local RightMesh = Instance.new("BlockMesh",RightGrapple)
  155. RightMesh.Scale = Vector3.new(0.05,0.05,1)
  156.  
  157. local LeftGrapple = Instance.new("Part",GrappleBin)
  158. LeftGrapple.Name = "Left Grapple"
  159. LeftGrapple.BrickColor = BrickColor.new("Really black")
  160. LeftGrapple.Anchored = true
  161. LeftGrapple.FormFactor = Enum.FormFactor.Custom
  162. LeftGrapple.Transparency = 1
  163. LeftGrapple.CanCollide = false
  164.  
  165. local LeftMesh = Instance.new("BlockMesh",LeftGrapple)
  166. LeftMesh.Scale = Vector3.new(0.05,0.05,1)
  167.  
  168. local Frl = Instance.new("Part",Character)
  169. Frl.Name = "FakeRL"
  170. Frl.Size = Vector3.new(1,2,1)
  171. Frl.Transparency = 1
  172. Frl.BottomSurface = "Smooth"
  173. Frl.TopSurface = "Smooth"
  174. Frl.CanCollide = false
  175.  
  176. local FrlWeld = Instance.new("ManualWeld",Frl)
  177. FrlWeld.Part0 = Character["Right Leg"]
  178. FrlWeld.Part1 = Frl
  179.  
  180. local Fll = Instance.new("Part",Character)
  181. Fll.Name = "FakeLL"
  182. Fll.Size = Vector3.new(1,2,1)
  183. Fll.Transparency = 1
  184. Fll.BottomSurface = "Smooth"
  185. Fll.TopSurface = "Smooth"
  186. Fll.CanCollide = false
  187.  
  188. local FllWeld = Instance.new("ManualWeld",Fll)
  189. FllWeld.Part0 = Character["Left Leg"]
  190. FllWeld.Part1 = Fll
  191.  
  192. local Keys = {}
  193. local Keys2 = {}
  194.  
  195. local grappleevent = script:WaitForChild("Grapple")
  196. local function CastRightGrapple(Goal,Part)
  197. grappleevent:FireServer()
  198. Keys2["e"] = nil
  199. local Point = Vector3.new()
  200. local LoopNo = 0
  201. RightGrapple.Transparency = 0
  202. local Goal2 = Goal.p
  203. repeat
  204. game:GetService("RunService").RenderStepped:wait()
  205. if not Part then break end
  206. if not Part.Parent then break end
  207. LoopNo = LoopNo+1
  208. local FirePos = (Character.HumanoidRootPart.CFrame*RightFirePosition).p
  209. local Progression = LoopNo/((Goal2-FirePos).magnitude/CastSpeed)
  210. if Progression > 1 then Progression = 1 end
  211. local Point = FirePos+(Goal2-FirePos)*Progression
  212. RightGrapple.Size = Vector3.new(1, 1, (FirePos-Point).magnitude)
  213. RightGrapple.CFrame = CFrame.new(FirePos+(Point-FirePos)/2, Goal2)
  214. until(Point-Goal2).magnitude < 5 or not Keys["e"]
  215. Keys2["e"] = true
  216. if not Keys["e"] then Keys2["e"] = false return false end
  217. return true
  218. end
  219.  
  220. CanRefill = true
  221. Character.Torso.Touched:connect(function(part)
  222. local CheckVal = part:FindFirstChild("GasRefiller")
  223. local Part = part
  224. if CanRefill ==true then
  225. if CheckVal ~= nil and CheckVal.Value == true then
  226. GasLeft = 5000
  227. BladesLeft = 8
  228. TextLa.Text = "Gas: "..GasLeft
  229. TextL.Text = "Blades: "..BladesLeft
  230. CanRefill = false
  231. Character.HumanoidRootPart.Anchored = true
  232. Character.Humanoid.WalkSpeed = 0
  233. Character.Humanoid.JumpPower = 0
  234. spawn(function()
  235. local Anim = Instance.new("Animation")
  236. Anim.AnimationId = "rbxassetid://"..RefillAnim
  237. Anim.Parent = Character
  238. local AnimationTrek = Character.Humanoid:LoadAnimation(Anim)
  239. AnimationTrek:Play()
  240. AnimationTrek.Stopped:connect(function()
  241. Anim:Destroy()
  242. AnimationTrek:Destroy()
  243. end)
  244. end)
  245. wait(4)
  246. Character.HumanoidRootPart.Anchored = false
  247. Character.Humanoid.WalkSpeed = 15
  248. Character.Humanoid.JumpPower = 65
  249. print("Gas Refilled!!")
  250. GasLeft = 5000
  251. wait(3)
  252. CanRefill = true
  253. end
  254. end
  255. end)
  256.  
  257.  
  258. local function CastLeftGrapple(Goal,Part)
  259. Keys2["q"] = nil
  260. local Point = Vector3.new()
  261. local LoopNo = 0
  262. LeftGrapple.Transparency = 0
  263. local Goal2 = Goal.p
  264. repeat
  265. game:GetService("RunService").RenderStepped:wait()
  266. if not Part then break end
  267. if not Part.Parent then break end
  268. Goal2 = (LeftGoalTarget.CFrame*(LeftGoalLocal:inverse())).p
  269. LoopNo = LoopNo+1
  270. local FirePos = (Character.HumanoidRootPart.CFrame*LeftFirePosition).p
  271. local Progression = LoopNo/((Goal2-FirePos).magnitude/CastSpeed)
  272. if Progression > 1 then Progression = 1 end
  273. local Point = FirePos+(Goal2-FirePos)*Progression
  274. LeftGrapple.Size = Vector3.new(1, 1, (FirePos-Point).magnitude)
  275. LeftGrapple.CFrame = CFrame.new(FirePos+(Point-FirePos)/2, Goal2)
  276. until (Point-Goal2).magnitude < 5 or not Keys["q"]
  277. Keys2["q"] = true
  278. if not Keys["q"] then Keys2["q"] = false return false end
  279. return true
  280. end
  281.  
  282. Mouse.KeyDown:connect(function(key)
  283. if key == "r" and Blades == false then
  284. if BladesLeft <= 0 then return end
  285. local ChangeBlade = Character.Humanoid:LoadAnimation(script.Animations.ChangeBlade)
  286. ChangeBlade:Play()
  287. BladesLeft = BladesLeft - 1
  288. print(BladesLeft)
  289. TextL.Text = "Blades: "..BladesLeft
  290. wait(.5)
  291. ReloadEvent:FireServer()
  292. Blades = true
  293. canAttack = true
  294. elseif key == "r" and Blades == true then
  295. DropBlades:FireServer()
  296. canAttack = false
  297. wait(1)
  298. Blades = false
  299. end
  300. end)
  301.  
  302. UserInputService.InputBegan:connect(function(Input, GME)
  303. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  304. if not GME and canAttack then
  305. if not attackDebounce then
  306. attackDebounce = true
  307. local AnimRandom = math.random(1,2)
  308. if AnimRandom == 1 then
  309. local AttackAnim = Character.Humanoid:LoadAnimation(script.Animations.AttackAnim)
  310. AttackAnim:Play()
  311. AttackingEvent:FireServer()
  312. wait(1)
  313. attackDebounce = false
  314. elseif AnimRandom == 2 then
  315. AttackingEvent:FireServer()
  316. local AttackAnim2 = Character.Humanoid:LoadAnimation(script.Animations.AttackAnim2)
  317. AttackAnim2:Play()
  318. AttackingEvent:FireServer()
  319. wait(1)
  320. attackDebounce = false
  321. end
  322. end
  323. end
  324. end
  325. end)
  326.  
  327. local Mouse = game:GetService("Players").LocalPlayer:GetMouse()
  328. SpaceButtonDown = false
  329. Mouse.KeyDown:connect(function(key)
  330. if key == " " then
  331. SpaceButtonDown = true
  332. if DriftEnabled == true then
  333. repeat
  334. wait(0.05)
  335. if GasLeft > 0 then
  336. GasLeft = GasLeft -1
  337. TextLa.Text = "Gas: "..GasLeft
  338. print(GasLeft)
  339. end
  340. until SpaceButtonDown == false
  341. end
  342. end
  343. end)
  344.  
  345.  
  346. Mouse.KeyUp:connect(function(key)
  347. if key == " " then
  348. SpaceButtonDown = false
  349. Character.Torso.DESTROY:Destroy()
  350. end
  351. end)
  352.  
  353. local Kd = game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(k)
  354. if k == "e" and GasLeft > 0.00 then
  355.  
  356. if (game.Players.LocalPlayer:GetMouse().Hit.p-Character.HumanoidRootPart.Position).magnitude > 700 then RightGoal = Vector3.new() return end
  357. local targ,hit = mouse.Target,mouse.Hit
  358. if targ then
  359. if cannotGrappleon[targ.Name] then
  360. print("cannot grapple")
  361. return end
  362. end
  363. Character.Humanoid.PlatformStand = true
  364. DriftEnabled = true
  365. Anim:Play()
  366. a = Instance.new("Sound")
  367. a.SoundId = "http://www.roblox.com/asset/?id=193202512"
  368. a.Volume = 3
  369. a.Pitch = 1
  370. a.Parent = Character.HumanoidRootPart
  371. a:play()
  372. GasLeft = GasLeft - 1
  373. TextLa.Text = "Gas: "..GasLeft
  374. game.Debris:AddItem(a,0.5)
  375. Frl.CanCollide = true
  376. Fll.CanCollide = true
  377. RightGoal = CFrame.new(game.Players.LocalPlayer:GetMouse().Hit.p)
  378. RightGoalLocal = RightGoal:inverse()*game.Players.LocalPlayer:GetMouse().Target.CFrame
  379. RightGoalTarget = game.Players.LocalPlayer:GetMouse().Target
  380. Keys["e"] = true
  381. Velocity.maxForce = Vector3.new(Force, Force, Force)
  382. Rotation.maxTorque = Vector3.new(Force, Force, Force)
  383. for i = 1,5 do
  384. game.Workspace.CurrentCamera.FieldOfView = (70+(i*2))
  385. wait()
  386. end
  387. local ret = CastRightGrapple(RightGoal,game.Players.LocalPlayer:GetMouse().Target)
  388. if not ret then return end
  389. elseif k == "q" and GasLeft > 0.00 then
  390. if (game.Players.LocalPlayer:GetMouse().Hit.p-Character.HumanoidRootPart.Position).magnitude > 700 then LeftGoal = Vector3.new() return end
  391. local targ,hit = mouse.Target,mouse.Hit
  392. if targ then
  393. if cannotGrappleon[targ.Name] then
  394. print("cannot grapple")
  395. return end
  396. end
  397. Character.Humanoid.PlatformStand = true
  398. DriftEnabled = true
  399. Anim:Play()
  400. a = Instance.new("Sound")
  401. a.SoundId = "http://www.roblox.com/asset/?id=193202512"
  402. a.Volume = 3
  403. a.Pitch = 1
  404. a.Parent = Character.HumanoidRootPart
  405. a:play()
  406. GasLeft = GasLeft - 1
  407. TextLa.Text = "Gas: "..GasLeft
  408. game.Debris:AddItem(a,0.5)
  409. Frl.CanCollide = true
  410. Fll.CanCollide = true
  411. LeftGoal = CFrame.new(game.Players.LocalPlayer:GetMouse().Hit.p)
  412. LeftGoalLocal = LeftGoal:inverse()*game.Players.LocalPlayer:GetMouse().Target.CFrame
  413. LeftGoalTarget = game.Players.LocalPlayer:GetMouse().Target
  414. Keys["q"] = true
  415. Velocity.maxForce = Vector3.new(Force, Force, Force)
  416. Rotation.maxTorque = Vector3.new(Force, Force, Force)
  417. for i = 1,5 do
  418. game.Workspace.CurrentCamera.FieldOfView = (70+(i*2))
  419. wait()
  420. end
  421. local ret = CastLeftGrapple(LeftGoal,game.Players.LocalPlayer:GetMouse().Target)
  422. if not ret then return end
  423. elseif k == " " and DriftEnabled then
  424. a2 = Instance.new("Sound")
  425. a2.Name = "DESTROY"
  426. a2.SoundId = "http://www.roblox.com/asset/?id=378270721"
  427. a2.Volume = 1
  428. a2.Pitch = 1
  429. a2.Parent = Character.Torso
  430. a2.Looped = true
  431. a2:Play()
  432. Gas = true
  433. Character.Torso.Ejector.Gas.Enabled = true
  434. elseif k == "d" and DriftEnabled == true then
  435. DriftRight = true
  436. a = Instance.new("Sound")
  437. a.SoundId = "http://www.roblox.com/asset/?id=378283155"
  438. a.Volume = 1
  439. a.Pitch = 1
  440. a.Parent = Character.HumanoidRootPart
  441. a:play()
  442. Character.Torso.Ejector.Gas.Enabled = true
  443. wait(0.2)
  444. Character.Torso.Ejector.Gas.Enabled = false
  445. RAnim:Play()
  446. elseif k == "a" and DriftEnabled == true then
  447. DriftLeft = true
  448. a = Instance.new("Sound")
  449. a.SoundId = "http://www.roblox.com/asset/?id=378283155"
  450. a.Volume = 1
  451. a.Pitch = 1
  452. a.Parent = Character.Torso
  453. a:play()
  454. LAnim:Play()
  455. elseif k == " " and DriftEnabled and GasLeft > 0.00 then
  456.  
  457. Gas = true
  458. a2 = Instance.new("Sound")
  459. a2.Name = "DESTROY"
  460. a2.SoundId = "http://www.roblox.com/asset/?id=378270721"
  461. a2.Volume = 1
  462. a2.Pitch = 1
  463. a2.Parent = Character.Torso
  464. a2.Looped = true
  465. a2:Play()
  466. Character.Torso.Ejector.Gas.Enabled = true
  467. for i = 1,5 do
  468. wait()
  469. end
  470. while wait() and Character.Torso.Ejector.Gas.Enabled == true and GasLeft > 0.00 do
  471. end
  472. elseif k == "" and (Keys["q"] or Keys["e"]) then
  473. end
  474. end)
  475.  
  476. game:GetService("UserInputService").InputEnded:connect(function(Io)
  477. if Io.KeyCode == Enum.KeyCode.D then
  478. DriftRight = false
  479. RAnim:Stop()
  480. end
  481. if Io.KeyCode == Enum.KeyCode.A then
  482. DriftLeft = false
  483. LAnim:Stop()
  484. end
  485. end)
  486.  
  487.  
  488. local Ku = game.Players.LocalPlayer:GetMouse().KeyUp:connect(function(k)
  489. local dorecoil = false
  490. if (Keys["e"] and k == "e") or (Keys["q"] and k == "q") then
  491. Anim:Stop()
  492. dorecoil = true
  493. local Break = math.random(1,2)
  494. if Break == 1 then
  495. B1:Play()
  496. elseif Break == 2 then
  497. B2:Play()
  498. end
  499. a = Instance.new("Sound")
  500. a.SoundId = "http://www.roblox.com/asset/?id=193202522"
  501. a.Volume = 1
  502. a.Pitch = 1
  503. a.Parent = Character.HumanoidRootPart
  504. a:play()
  505. game.Debris:AddItem(a,0.5)
  506. for i = 1,5 do
  507. game.Workspace.CurrentCamera.FieldOfView = (80-(i*2))
  508. wait()
  509. end
  510. end
  511. Keys[k] = nil
  512. Keys2[k] = nil
  513. if not Keys["q"] and not Keys["e"] and (k == "q" or k == "e") then
  514. DriftEnabled = false
  515. local LastVelocity = Character.HumanoidRootPart.Velocity
  516. Velocity.maxForce = Vector3.new()
  517. Rotation.maxTorque = Vector3.new()
  518. Character.Humanoid.PlatformStand = false
  519. Frl.CanCollide = false
  520. Fll.CanCollide = false
  521. Stalling = false
  522. if RightGoal.p ~= Vector3.new() or LeftGoal.p ~= Vector3.new() then
  523. end
  524. Character.HumanoidRootPart.Velocity = LastVelocity
  525. RightGoal = CFrame.new()
  526. LeftGoal = CFrame.new()
  527. end
  528. if dorecoil then
  529. JumpRecoil = workspace.DistributedGameTime
  530. end
  531. if not Keys["e"] then
  532. RightGrapple.Transparency = 1
  533. end
  534. if not Keys["q"] then
  535. LeftGrapple.Transparency = 1
  536. end
  537. if k == " " then
  538. Gas = false
  539. Character.Torso.Ejector.Gas.Enabled = false
  540. end
  541. end)
  542.  
  543.  
  544.  
  545. local function UpdateVelocities()
  546. if not Character then return end
  547. if not Character.HumanoidRootPart.Parent == Character then return end
  548. local Goal = Vector3.new()
  549. if not Keys["q"] and Keys["e"] then RightGoal = RightGoalTarget.CFrame*(RightGoalLocal:inverse()) Goal = RightGoal.p
  550. elseif not Keys["e"] and Keys["q"] then LeftGoal = LeftGoalTarget.CFrame*(LeftGoalLocal:inverse()) Goal = LeftGoal.p
  551. elseif Keys["q"] and Keys["e"] then RightGoal = RightGoalTarget.CFrame*(RightGoalLocal:inverse()) LeftGoal = LeftGoalTarget.CFrame*(LeftGoalLocal:inverse()) Goal = LeftGoal.p+(RightGoal.p-LeftGoal.p)/2
  552. end
  553. local Multiplier = 1
  554. if Gas then
  555. Multiplier = 2.5
  556. game.Debris:AddItem(a,0.5)
  557. end
  558. local OrbitVelocity = Vector3.new()
  559. if DriftRight and not DriftLeft then
  560. local MultiplierOrbit = Speed*.5*Multiplier
  561. if Keys["q"] or Keys["e"] then MultiplierOrbit = Speed*1.25 end
  562. local Dir = (Character.HumanoidRootPart.CFrame*CFrame.Angles(0, -math.rad(90), 0)).lookVector
  563. OrbitVelocity = Dir*MultiplierOrbit
  564. elseif DriftLeft and not DriftRight then
  565. local MultiplierOrbit = Speed*.5*Multiplier
  566. if Keys["e"] or Keys["q"] then MultiplierOrbit = Speed*1.25 end
  567. local Dir = (Character.HumanoidRootPart.CFrame*CFrame.Angles(0, math.rad(90), 0)).lookVector
  568. OrbitVelocity = Dir*MultiplierOrbit
  569. end
  570. if not Stalling then
  571. StallingDistance = (Character.HumanoidRootPart.Position-Goal).magnitude
  572. Velocity.velocity = CFrame.new(Character.HumanoidRootPart.Position, Goal).lookVector*Speed*Multiplier+OrbitVelocity
  573. Rotation.cframe = CFrame.new(Character.HumanoidRootPart.Position, Goal)
  574. elseif Stalling then
  575. StallingDistance = (Character.HumanoidRootPart.Position-Goal).magnitude
  576. local DownPos = Goal-Vector3.new(0,StallingDistance,0)
  577. local DownArcVelocity = Vector3.new()
  578. if (Character.Torso.HumanoidRootPart-DownPos).magnitude > 3.5 then
  579. DownArcVelocity = (Character.HumanoidRootPart.CFrame*CFrame.Angles(-math.rad(90),0,0)).lookVector*50
  580. end
  581. local Maintain = Vector3.new(0,0,0)
  582. if StallingDirectionDown and not StallingDirectionUp then
  583. Maintain = Vector3.new(0,-10,0)
  584. elseif StallingDirectionUp and not StallingDirectionDown then
  585. Maintain = Vector3.new(0,10,0)
  586. end
  587. Velocity.velocity = DownArcVelocity+Maintain
  588. Rotation.cframe = CFrame.new((Character.HumanoidRootPart.CFrame*CFrame.new(0,5,0)).p, Goal)
  589. end
  590. end
  591. local function UpdateGrapples()
  592. RGoalVal.Value = RightGoal.p
  593. LGoalVal.Value = LeftGoal.p
  594. if Keys2["e"] then
  595. RGrappleBool.Value = true
  596. RightGrapple.Transparency = 0
  597. local FirePos = (Character.HumanoidRootPart.CFrame*RightFirePosition).p
  598. RightGrapple.Size = Vector3.new(1, 1, (FirePos-RightGoal.p).magnitude)
  599. RightGrapple.CFrame = CFrame.new(FirePos+(RightGoal.p-FirePos)/2, RightGoal.p)
  600. else
  601. RGrappleBool.Value = false
  602. end
  603. if Keys2["q"] then
  604. LGrappleBool.Value = true
  605. LeftGrapple.Transparency = 0
  606. local FirePos = (Character.HumanoidRootPart.CFrame*LeftFirePosition).p
  607. LeftGrapple.Size = Vector3.new(1, 1, (FirePos-LeftGoal.p).magnitude)
  608. LeftGrapple.CFrame = CFrame.new(FirePos+(LeftGoal.p-FirePos)/2, LeftGoal.p)
  609. else
  610. LGrappleBool.Value = false
  611. end
  612. end
  613. game:GetService("RunService").RenderStepped:connect(UpdateGrapples)
  614. game:GetService("RunService").Stepped:connect(UpdateVelocities)
  615. wait(1)
  616. B2:Stop()
  617. B1:Stop()
  618. MassUpdate()
  619. wait(1)
  620. Character.ChildAdded:connect(MassUpdate)
  621. Character.ChildRemoved:connect(MassUpdate)
  622. Character.Humanoid.Died:connect(function()
  623. Kd:disconnect()
  624. Ku:disconnect()
  625. RightGrapple:remove()
  626. LeftGrapple:remove()
  627. end)
  628. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  629. local Folder = script.Parent.Events
  630. local ODMGEvent = Folder:WaitForChild("EquipODMG")
  631. local ReloadEvent = Folder:WaitForChild("BladeReload")
  632. local DropBlades = Folder:WaitForChild("DropBlades")
  633. local AttackingEvent = Folder:WaitForChild("AttackingEvent")
  634.  
  635. local Blades = false
  636.  
  637. ODMGEvent.OnServerEvent:connect(function(player)
  638. local EquipOMDG = player.Character.Humanoid:LoadAnimation(script.EquipODMG)
  639. EquipOMDG:Play()
  640. player.Character.Humanoid.WalkSpeed = 0
  641. player.Character.Humanoid.JumpPower = 0
  642. for a, p in ipairs(game.ReplicatedStorage.Nat.Welds["Left Container"]:GetChildren()) do
  643. if p:isA("Part") or p:isA("BasePart") then
  644. local part = p:clone()
  645. part.Anchored = false
  646. part.CanCollide = false
  647. part.Parent = player.Character["Left Leg"]
  648. local weld = Instance.new("Weld",part)
  649. weld.Part0 = player.Character["Left Leg"]
  650. weld.Part1 = part
  651. weld.C1 = p.CFrame:inverse()*game.ReplicatedStorage.Nat["Left Leg"].CFrame
  652. end
  653. end
  654. for a, p in ipairs(game.ReplicatedStorage.Nat.Welds["3DMG"]:GetChildren()) do
  655. if p:isA("Part") or p:isA("BasePart") then
  656. local part = p:clone()
  657. part.Anchored = false
  658. part.CanCollide = false
  659. part.Parent = player.Character["Torso"]
  660. local weld = Instance.new("Weld",part)
  661. weld.Part0 = player.Character["Torso"]
  662. weld.Part1 = part
  663. weld.C1 = p.CFrame:inverse()*game.ReplicatedStorage.Nat["Torso"].CFrame
  664. end
  665. end
  666. for a, p in ipairs(game.ReplicatedStorage.Nat.Welds["Right Container"]:GetChildren()) do
  667. if p:isA("Part") or p:isA("BasePart") then
  668. local part = p:clone()
  669. part.Anchored = false
  670. part.CanCollide = false
  671. part.Parent = player.Character["Right Leg"]
  672. local weld = Instance.new("Weld",part)
  673. weld.Part0 = player.Character["Right Leg"]
  674. weld.Part1 = part
  675. weld.C1 = p.CFrame:inverse()*game.ReplicatedStorage.Nat["Right Leg"].CFrame
  676. end
  677. end
  678. for a, p in ipairs(game.ReplicatedStorage.Nat.Welds["Right Blade"]:GetChildren()) do
  679. if p:isA("Part") or p:isA("BasePart") then
  680. local part = p:clone()
  681. part.Anchored = false
  682. part.CanCollide = false
  683. part.Parent = player.Character["Right Arm"]
  684. local weld = Instance.new("Weld",part)
  685. weld.Part0 = player.Character["Right Arm"]
  686. weld.Part1 = part
  687. weld.C1 = p.CFrame:inverse()*game.ReplicatedStorage.Nat["Right Arm"].CFrame
  688. end
  689. end
  690. for a, p in ipairs(game.ReplicatedStorage.Nat.Welds["Left Blade"]:GetChildren()) do
  691. if p:isA("Part") or p:isA("BasePart") then
  692. local part = p:clone()
  693. part.Anchored = false
  694. part.CanCollide = false
  695. part.Parent = player.Character["Left Arm"]
  696. local weld = Instance.new("Weld",part)
  697. weld.Part0 = player.Character["Left Arm"]
  698. weld.Part1 = part
  699. weld.C1 = p.CFrame:inverse()*game.ReplicatedStorage.Nat["Left Arm"].CFrame
  700. end
  701. local leftBlade = player.Character["Left Arm"]:waitForChild("Blade")
  702. local rightBlade = player.Character["Right Arm"]:waitForChild("Blade")
  703. rightBlade.Transparency = 1
  704. leftBlade.Transparency = 1
  705. player.Character.Humanoid.WalkSpeed = 16
  706. player.Character.Humanoid.JumpPower = 65
  707. wait()
  708. rightBlade.Transparency = 1
  709. leftBlade.Transparency = 1
  710. end
  711. end)
  712.  
  713. ReloadEvent.OnServerEvent:connect(function(player)
  714. if Blades == true then return end
  715. local leftBlade = player.Character["Left Arm"]:waitForChild("Blade")
  716. local rightBlade = player.Character["Right Arm"]:waitForChild("Blade")
  717. rightBlade.Transparency = 0
  718. leftBlade.Transparency = 0
  719. Blades = true
  720. local a = Instance.new("Sound")
  721. a.SoundId = "http://www.roblox.com/asset/?id=130785405"
  722. a.Volume = 1
  723. a.Pitch = 2
  724. a.MaxDistance = 50
  725. a.Parent = player.Character.HumanoidRootPart
  726. a:play()
  727. game.Debris:AddItem(a,0.5)
  728. end)
  729.  
  730. DropBlades.OnServerEvent:connect(function(player)
  731. if Blades == true then
  732. local leftBlade = player.Character["Left Arm"]:waitForChild("Blade")
  733. local rightBlade = player.Character["Right Arm"]:waitForChild("Blade")
  734. local RClone = game.ReplicatedStorage.Nat.Welds["Right Blade"].Blade:Clone()
  735. RClone.CanCollide = true
  736. RClone.Parent = game.Workspace
  737. RClone.Anchored = false
  738. RClone.CFrame = rightBlade.CFrame
  739. local LClone = game.ReplicatedStorage.Nat.Welds["Left Blade"].Blade:Clone()
  740. LClone.CanCollide = true
  741. LClone.Parent = game.Workspace
  742. LClone.Anchored = false
  743. LClone.CFrame = leftBlade.CFrame
  744. rightBlade.Transparency = 1
  745. leftBlade.Transparency = 1
  746. game.Debris:AddItem(RClone, 2)
  747. game.Debris:AddItem(LClone, 2)
  748. wait(.25)
  749. Blades = false
  750. end
  751. end)
  752.  
  753. AttackingEvent.OnServerEvent:connect(function(player, hit)
  754. local attacking = false
  755. local leftBlade = player.Character["Left Arm"]:waitForChild("Blade")
  756. local rightBlade = player.Character["Right Arm"]:waitForChild("Blade")
  757. local a = Instance.new("Sound")
  758. a.SoundId = "http://www.roblox.com/asset/?id=147722227"
  759. a.Volume = 0.3
  760. a.Pitch = math.random(1.5,2.5)
  761. a.Parent = player.Character.HumanoidRootPart
  762. a:play()
  763. local blade = leftBlade or rightBlade
  764. local attacking = false
  765. blade.Touched:connect(function(hit)
  766. if hit.Parent:findFirstChild("Humanoid") and hit.Parent.Name ~= player.Name then
  767. if not attacking and not hit.Parent:findFirstChild("Nape") and not hit.Parent:findFirstChild("Ragdoller") then
  768. attacking = true
  769. hit.Parent.Humanoid:takeDamage(25)
  770. end
  771. end
  772. if hit.Name == "Nape" and not attacking then
  773. attacking = true
  774. local hitv = Instance.new("ObjectValue")
  775. hitv.Name = "HitRequest"
  776. hitv.Value = player
  777. hit.Parent:findFirstChildOfClass("Humanoid"):TakeDamage(100000000000)
  778. end
  779. end)
  780. wait(.5)
  781. attacking = true
  782. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement