Advertisement
EdgyHedgehog

Web Shooters Fe

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