Advertisement
Namoo546

Joseph5

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