Znimator

Untitled

Apr 24th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 = owner
  163. plrgui = plr.PlayerGui
  164. char = plr.Character
  165. humanoid = char:findFirstChild("Humanoid")
  166. torso = char:findFirstChild("Torso")
  167. head = char.Head
  168. ra = char:findFirstChild("Right Arm")
  169. la = char:findFirstChild("Left Arm")
  170. rl = char:findFirstChild("Right Leg")
  171. ll = char:findFirstChild("Left Leg")
  172. rs = torso:findFirstChild("Right Shoulder")
  173. ls = torso:findFirstChild("Left Shoulder")
  174. rh = torso:findFirstChild("Right Hip")
  175. lh = torso:findFirstChild("Left Hip")
  176. neck = torso:findFirstChild("Neck")
  177. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  178. rootpart = char:findFirstChild("HumanoidRootPart")
  179. camera = workspace.CurrentCamera
  180. anim = char:findFirstChild("Animate")
  181. if anim then
  182. anim:Destroy()
  183. end
  184.  
  185. shirt = Instance.new("Shirt", char)
  186. shirt.Name = "Shirt"
  187. pants = Instance.new("Pants", char)
  188. pants.Name = "Pants"
  189. char.Shirt.ShirtTemplate = "rbxassetid://769770676"
  190. char.Pants.PantsTemplate = "rbxassetid://761044844"
  191.  
  192. local lal = Instance.new('Sound', head)
  193. lal.SoundId = "rbxassetid://588717937"
  194. lal.Volume = 1
  195. lal:play()
  196. game:service'Debris':AddItem(lal, 8)
  197.  
  198. local rm = Instance.new("Weld", torso)
  199. rm.C0 = CFrame.new(1.5, 0.5, 0)
  200. rm.C1 = CFrame.new(0, 0.5, 0)
  201. rm.Part0 = torso
  202. rm.Part1 = ra
  203. rm.Name = 'Right Shoulder'
  204.  
  205. local lm = Instance.new("Weld", torso)
  206. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  207. lm.C1 = CFrame.new(0, 0.5, 0)
  208. lm.Part0 = torso
  209. lm.Part1 = la
  210. lm.Name = 'Left Shoulder'
  211.  
  212. local rlegm = Instance.new("Weld", torso)
  213. rlegm.C0 = CFrame.new(0.5, -1, 0)
  214. rlegm.C1 = CFrame.new(0, 1, 0)
  215. rlegm.Part0 = torso
  216. rlegm.Part1 = rl
  217.  
  218. local llegm = Instance.new("Weld", torso)
  219. llegm.C0 = CFrame.new(-0.5, -1, 0)
  220. llegm.C1 = CFrame.new(0, 1, 0)
  221. llegm.Part0 = torso
  222. llegm.Part1 = ll
  223.  
  224. rj.C0 = CFrame.new()
  225. rj.C1 = CFrame.new()
  226.  
  227. neck.C0 = CFrame.new(0, 1, 0)
  228. neck.C1 = CFrame.new(0, -0.5, 0)
  229.  
  230.  
  231. local speed = 0.3
  232. local angle = 0
  233. local anglespeed = 1
  234. rsc0 = rm.C0
  235. lsc0 = lm.C0
  236. llc0 = llegm.C0
  237. rlc0 = rlegm.C0
  238. rootc0 = rj.C0
  239. neckc0 = neck.C0
  240.  
  241. model = Instance.new('Model', char)
  242. model.Name = '3DG'
  243. function Weld(part0,part1,c1,c0)
  244. local w = Instance.new('Weld', model)
  245. w.Part0 = part0
  246. w.Part1 = part1
  247. w.C0 = c0 or CFrame.new()
  248. w.C1 = c1 or CFrame.new()
  249. end
  250.  
  251. local BasePart = Instance.new('Part')
  252. BasePart.FormFactor = 'Custom'
  253. BasePart.Material = 'Neon'
  254. BasePart.CanCollide = false
  255. BasePart.Locked = true
  256. BasePart.TopSurface = 10
  257. BasePart.BottomSurface = 10
  258. BasePart.LeftSurface = 10
  259. BasePart.RightSurface = 10
  260. BasePart.FrontSurface = 10
  261. BasePart.BackSurface = 10
  262. BasePart:breakJoints()
  263.  
  264.  
  265. for i = 1,2 do
  266. local strap = BasePart:clone()
  267. strap.Size = Vector3.new(1.025,.2,1.025)
  268. strap.Parent = model
  269. strap.BrickColor = BrickColor.new("Magenta")
  270. strap:BreakJoints()
  271. Weld(strap, la, CFrame.new(0, .1 - i/3,0))
  272. end
  273.  
  274. for i = 1,2 do
  275. local strap = BasePart:clone()
  276. strap.Size = Vector3.new(1.025,.2,1.025)
  277. strap.Parent = model
  278. strap.BrickColor = BrickColor.new("Magenta")
  279. strap:BreakJoints()
  280. Weld(strap, ra, CFrame.new(0, .1 - i/3,0))
  281. end
  282.  
  283. local ropeStart = BasePart:clone()
  284. ropeStart.Size = Vector3.new(.2,1.75,.2)
  285. ropeStart.Parent = model
  286. ropeStart.BrickColor = BrickColor.new("Magenta")
  287. ropeStart:BreakJoints()
  288. Weld(ropeStart, ra, CFrame.new(-.45, -.5, 0))
  289. local ropeStart2 = BasePart:clone()
  290. ropeStart2.Size = Vector3.new(.2,1.75,.2)
  291. ropeStart2.Parent = model
  292. ropeStart2.BrickColor = BrickColor.new("Magenta")
  293. ropeStart2:BreakJoints()
  294. Weld(ropeStart2, la, CFrame.new(.45, -.5, 0))
  295.  
  296. local ropeCont = BasePart:clone()
  297. ropeCont.Size = Vector3.new(.8,.2,.8)
  298. ropeCont.Parent = model
  299. ropeCont.BrickColor = BrickColor.new("Magenta")
  300. ropeCont:BreakJoints()
  301. Instance.new('CylinderMesh', ropeCont)
  302. Weld(ropeCont, la, CFrame.new(.5, .05, 0), CFrame.Angles(math.pi/2, math.pi/2, 0))
  303. local ropeCont2 = BasePart:clone()
  304. ropeCont2.Size = Vector3.new(.8,.2,.8)
  305. ropeCont2.Parent = model
  306. ropeCont2.BrickColor = BrickColor.new("Magenta")
  307. ropeCont2:BreakJoints()
  308. Instance.new('CylinderMesh', ropeCont2)
  309. Weld(ropeCont2, ra, CFrame.new(-.5, .05, 0), CFrame.Angles(math.pi/2, math.pi/2, 0))
  310.  
  311. local GasTank = BasePart:clone()
  312. GasTank.Size = Vector3.new(.8,1.4,.8)
  313. GasTank.Parent = model
  314. GasTank.BrickColor = BrickColor.new("Magenta")
  315. GasTank:BreakJoints()
  316. Instance.new('SpecialMesh', GasTank)
  317. Weld(GasTank, ra, CFrame.new(0, -.25, .5))
  318. local GasTank2 = BasePart:clone()
  319. GasTank2.Size = Vector3.new(.8,1.4,.8)
  320. GasTank2.Parent = model
  321. GasTank2.BrickColor = BrickColor.new("Magenta")
  322. GasTank2:BreakJoints()
  323. Instance.new('SpecialMesh', GasTank2)
  324. Weld(GasTank2, la, CFrame.new(0, -.25, .5))
  325.  
  326. local pa = BasePart:clone()
  327. pa.BrickColor = BrickColor.new()
  328. pa.Anchored = true
  329. pa.Size = Vector3.new(.5,1,.5)
  330. local special = Instance.new('SpecialMesh', pa)
  331. special.MeshId = "rbxassetid://1033714"
  332. special.Scale = Vector3.new(.25,2,.25)
  333. local ropePA = BasePart:clone()
  334. ropePA.Parent = pa
  335. ropePA.Anchored = true
  336. ropePA.BrickColor = BrickColor.new'Magenta'
  337. Instance.new('CylinderMesh', ropePA).Scale = Vector3.new(.25,1,.25)
  338.  
  339. local pa2 = BasePart:clone()
  340. pa2.BrickColor = BrickColor.new()
  341. pa2.Anchored = true
  342. pa2.Size = Vector3.new(.5,1,.5)
  343. local special = Instance.new('SpecialMesh', pa2)
  344. special.MeshId = "rbxassetid://1033714"
  345. special.Scale = Vector3.new(.25,2,.25)
  346. local ropePA2 = BasePart:clone()
  347. ropePA2.Parent = pa2
  348. ropePA2.Anchored = true
  349. ropePA2.BrickColor = BrickColor.new'Magenta'
  350. Instance.new('CylinderMesh', ropePA2).Scale = Vector3.new(.25,1,.25)
  351.  
  352. local pa3 = BasePart:clone()
  353. pa3.Transparency = 1
  354. pa3.Anchored = true
  355. pa3.Size = Vector3.new(2,2,2)
  356.  
  357. local torso3 = Instance.new('Part', char)
  358. torso3.Name = 'FakeTorsoForStuff'
  359. torso3.Size = torso.Size
  360. torso3.Transparency = 1
  361. torso3:breakJoints()
  362. Weld(torso3, torso)
  363.  
  364. Instance.new('PointLight', torso)
  365.  
  366. local jumpmode
  367.  
  368. local SGui = Instance.new('ScreenGui', plr.PlayerGui)
  369. local JumpButton = Instance.new('TextButton', SGui)
  370. JumpButton.BackgroundColor = BrickColor.new('Dark stone grey')
  371. JumpButton.BorderSizePixel = 4
  372. JumpButton.TextColor3 = Color3.new(1,1,1)
  373. JumpButton.BorderColor3 = Color3.new()
  374. JumpButton.TextStrokeTransparency = .5
  375. JumpButton.FontSize = 'Size12'
  376. JumpButton.Text = 'Thrust up when grappled'
  377. JumpButton.Size = UDim2.new(0, 250, 0, 50)
  378. JumpButton.Position = UDim2.new(1, -250, 1, -50)
  379. local OnOff = Instance.new('Frame', JumpButton)
  380. OnOff.BackgroundColor3 = Color3.new()
  381. OnOff.BorderSizePixel = 0
  382. OnOff.Size = UDim2.new(.8, 0, 0, 5)
  383. OnOff.Position = UDim2.new(.1, 0, 1, -10)
  384. JumpButton.MouseButton1Down:connect(function()
  385. jumpmode = not jumpmode
  386. if jumpmode then
  387. OnOff.BackgroundColor3 = Color3.new(0,1,0)
  388. else
  389. OnOff.BackgroundColor3 = Color3.new()
  390. end
  391. end)
  392.  
  393.  
  394.  
  395. local bodygyro = Instance.new('BodyGyro', torso)
  396. bodygyro.maxTorque = Vector3.new(14e16,14e16,14e16)
  397. bodygyro.P = 10000
  398.  
  399. ro=Instance.new("RocketPropulsion",rootpart)
  400. ro.Name = 'RockatPropoolsun'
  401. ro.MaxSpeed=200
  402. ro.MaxThrust=8000
  403. ro.TurnP = 0
  404. ro.MaxTorque=Vector3.new(14e16,14e16,14e16)
  405.  
  406. ro2=Instance.new("RocketPropulsion",torso)
  407. ro2.Name = 'RockatPropoolsun2'
  408. ro2.MaxSpeed=200
  409. ro2.MaxThrust=8000
  410. ro2.TurnP = 0
  411. ro2.MaxTorque=Vector3.new(14e16,14e16,14e16)
  412. local run
  413. mouse.KeyDown:connect(function(k)
  414. if k:byte() == 48 then
  415. run = not run
  416. if run then
  417. humanoid.WalkSpeed = 22
  418. else
  419. humanoid.WalkSpeed = 16
  420. end
  421. end
  422. if k:byte() == 32 then
  423. if Grapple1 or Grapple2 then
  424. wait()
  425. humanoid.PlatformStand = true
  426. rlegm.C0 = rlc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, .1)
  427. llegm.C0 = llc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, -.1)
  428. if pa3.Parent ~= nil then
  429. ro3:Fire()
  430. end
  431. if Grapple1 then
  432. ro:Fire()
  433. end
  434. if Grapple2 then
  435. ro2:Fire()
  436. end
  437. end
  438. end
  439. if k=="q" then
  440. local sound = Instance.new('Sound', head)
  441. sound.SoundId = "rbxassetid://659223262"
  442. sound.Pitch = 1
  443. sound.Volume = .8
  444. sound:play()
  445. game:service'Debris':AddItem(sound,4)
  446. lm.Parent = torso
  447. pa.CFrame = la.CFrame
  448. local grapplepos = pa.Position
  449. local grapplevelocity = (mouse.Hit.p - grapplepos).unit*50
  450. local lastgrapplepos = pa.Position
  451. while wait() do
  452. lastgrapplepos = grapplepos
  453. grapplepos = grapplepos + grapplevelocity
  454. local RayCast = Ray.new(lastgrapplepos, (grapplepos - lastgrapplepos))
  455. local hit, hitpos = workspace:FindPartOnRay(RayCast, char)
  456. if (torso.Position - pa.Position).magnitude > 900 then
  457. pa.Parent = nil
  458. break
  459. end
  460. pa.Anchored = true
  461. pa.CFrame = CFrame.new(grapplepos, grapplepos+grapplevelocity) * CFrame.Angles(math.pi/2, 0, 0)
  462. pa.Parent = char
  463. if hit then
  464. local rotX,rotY,rotZ = pa.CFrame:toEulerAnglesXYZ()
  465. local sound = Instance.new('Sound', head)
  466. sound.SoundId = "rbxassetid://160248505"
  467. sound.Pitch = 1.2+math.random()/3
  468. sound.Volume = .25
  469. sound:play()
  470. game:service'Debris':AddItem(sound,4)
  471. pa.Parent = char
  472. pa.CFrame=CFrame.new(hitpos.x, hitpos.y, hitpos.z)*CFrame.Angles(rotX,rotY,rotZ)*CFrame.Angles(math.pi,0,0)
  473. ro.Target=pa
  474. lm.Parent = torso
  475. local ray = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  476. local hitz, enz = workspace:FindPartOnRay(ray, char)
  477. local hum = hit and hit.Parent and hit.Parent:findFirstChild'Humanoid'
  478. if hum then
  479. hum:TakeDamage(math.random(7,11))
  480. end
  481. local hum = hit and hit.Parent and hit.Parent.Parent and hit.Parent.Parent:findFirstChild'Humanoid'
  482. if hum then
  483. hum:TakeDamage(math.random(7,11))
  484. end
  485. if pa.Parent ~= nil and humanoid.PlatformStand or not (hitz and hitz.CanCollide) then
  486. ro:Fire()
  487. if jumpmode then
  488. humanoid.Jump = true
  489. end
  490. end
  491. Gweld = Instance.new("Weld", char)
  492. Gweld.C0 = hit.CFrame:toObjectSpace(pa.CFrame)
  493. Gweld.Part0 = hit
  494. Gweld.Part1 = pa
  495. pa.Anchored = false
  496. Grapple1Hit = hit
  497. Grapple1 = true
  498. break
  499. end
  500. pa.Anchored = true
  501. pa.CFrame = CFrame.new(grapplepos, grapplepos+grapplevelocity) * CFrame.Angles(math.pi/2, 0, 0)
  502. end
  503. end
  504. if k=="e" then
  505. local sound = Instance.new('Sound', head)
  506. sound.SoundId = "rbxassetid://659223262"
  507. sound.Pitch = 1
  508. sound.Volume = .8
  509. sound:play()
  510. game:service'Debris':AddItem(sound,4)
  511. pa2.CFrame = ra.CFrame
  512. rm.Parent = torso
  513. local grapplepos = pa2.Position
  514. local grapplevelocity = (mouse.Hit.p - grapplepos).unit*50
  515. local lastgrapplepos = pa2.Position
  516. while wait() do
  517. lastgrapplepos = grapplepos
  518. grapplepos = grapplepos + grapplevelocity
  519. local RayCast = Ray.new(lastgrapplepos, (grapplepos - lastgrapplepos))
  520. local hit, hitpos = workspace:FindPartOnRay(RayCast, char)
  521. if (torso.Position - pa2.Position).magnitude > 900 then
  522. pa2.Parent = nil
  523. break
  524. end
  525. pa2.Anchored = true
  526. pa2.CFrame = CFrame.new(grapplepos, grapplepos+grapplevelocity) * CFrame.Angles(math.pi/2, 0, 0)
  527. pa2.Parent = char
  528. if hit then
  529. local rotX,rotY,rotZ = pa2.CFrame:toEulerAnglesXYZ()
  530. local sound = Instance.new('Sound', head)
  531. sound.SoundId = "rbxassetid://160248505"
  532. sound.Pitch = 1.2+math.random()/3
  533. sound.Volume = .25
  534. sound:play()
  535. game:service'Debris':AddItem(sound,4)
  536. pa2.Parent = char
  537. pa2.CFrame=CFrame.new(hitpos.x, hitpos.y, hitpos.z)*CFrame.Angles(rotX,rotY,rotZ)*CFrame.Angles(math.pi,0,0)
  538. ro2.Target=pa2
  539. rm.Parent = torso
  540. local ray = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  541. local hitz, enz = workspace:FindPartOnRay(ray, char)
  542. local hum = hit and hit.Parent and hit.Parent:findFirstChild'Humanoid'
  543. if hum then
  544. hum:TakeDamage(math.random(7,11))
  545. end
  546. local hum = hit and hit.Parent and hit.Parent.Parent and hit.Parent.Parent:findFirstChild'Humanoid'
  547. if hum then
  548. hum:TakeDamage(math.random(7,11))
  549. end
  550. if pa2.Parent ~= nil and humanoid.PlatformStand or not (hitz and hitz.CanCollide) then
  551. if jumpmode then
  552. humanoid.Jump = true
  553. end
  554. ro2:Fire()
  555. end
  556. Gweld2 = Instance.new("Weld", char)
  557. Gweld2.C0 = hit.CFrame:toObjectSpace(pa2.CFrame)
  558. Gweld2.Part0 = hit
  559. Gweld2.Part1 = pa2
  560. pa2.Anchored = false
  561. Grapple2Hit = hit
  562. Grapple2 = true
  563. break
  564. end
  565. pa2.Anchored = true
  566. pa2.CFrame = CFrame.new(grapplepos, grapplepos+grapplevelocity) * CFrame.Angles(math.pi/2, 0, 0)
  567. end
  568. end
  569. end)
  570.  
  571. mouse.KeyUp:connect(function(k)
  572. if k=="q" then
  573. pcall(function() Gweld:remove() end)
  574. game:service'RunService'.RenderStepped:wait()
  575. pcall(function() pa.Parent = nil Grapple1 = false end)
  576. pcall(function() ro:Abort() end)
  577. game:service'RunService'.RenderStepped:wait()
  578. pcall(function() ro2.Target=pa2 if Grapple2 and humanoid.PlatformStand or Grapple2 and not hitz then ro2:Fire() end end)
  579. elseif k=="e" then
  580. pcall(function() Gweld2:remove() end)
  581. game:service'RunService'.RenderStepped:wait()
  582. pcall(function() pa2.Parent = nil Grapple2 = false end)
  583. pcall(function() ro2:Abort() end)
  584. game:service'RunService'.RenderStepped:wait()
  585. pcall(function() ro.Target=pa if Grapple1 and humanoid.PlatformStand or Grapple1 and not hitz then ro:Fire() end end)
  586. end
  587. end)
  588.  
  589.  
  590. local MidPointUsed = false
  591. local TorsoSmoke = Instance.new('Smoke', torso)
  592.  
  593.  
  594. game:service'RunService'.RenderStepped:connect(function()
  595. angle = (angle % 100) + anglespeed/10
  596. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  597. local rscf = rsc0
  598. local lscf = lsc0
  599. local rlcf = rlc0
  600. local llcf = llc0
  601. local rjcf = rootc0
  602. local ncf = neckc0
  603. for i,object in pairs(char:children()) do
  604. if object:IsA("Tool") then
  605. tool = true
  606. if not debounce then
  607. for x,value in pairs(object:children()) do
  608. if value:IsA("StringValue") and value.Name == "toolanim" and value.Value == "Slash" then
  609. debounce = true
  610. coroutine.wrap(function()
  611. slashing = true
  612. wait(.25)
  613. slashing = false
  614. debounce = false
  615. end)()
  616. value:Destroy()
  617. end
  618. end
  619. end
  620. elseif not object:IsA'Tool' then
  621. tool = false
  622. end
  623. end
  624. if not humanoid.PlatformStand then
  625. if humanoid.Sit == true then
  626. speed = 0.2
  627. anglespeed = 1/4
  628. ncf = neckc0 * CFrame.Angles(0, 0, 0)
  629. rjcf = rootc0
  630. rscf = rsc0 * CFrame.Angles(math.pi/2+math.sin(-angle)*0.05, 0, 0)
  631. lscf = lsc0 * CFrame.Angles(math.pi/2+math.sin(-angle)*0.05, 0, 0)
  632. rlcf = rlc0 * CFrame.Angles(math.pi/2+-math.rad(.2), 0, math.rad(.2))
  633. llcf = llc0 * CFrame.Angles(math.pi/2+math.rad(.2), 0, -math.rad(.2))
  634. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  635. anglespeed = 1/4
  636. speed = 0.2
  637. ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.075, 0, 0)
  638. rjcf = rootc0
  639. rscf = rsc0 * CFrame.new(0, math.sin(angle)*0.05, 0) * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
  640. lscf = lsc0 * CFrame.new(0, math.sin(angle)*0.05, 0) * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
  641. rlcf = rlc0 * CFrame.Angles(-math.rad(.2), 0, math.rad(.2))
  642. llcf = llc0 * CFrame.Angles(math.rad(.2), 0, -math.rad(.2))
  643. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 20 then
  644. anglespeed = 1.7
  645. speed = 0.25
  646. anglespeed = 2.2
  647. speed = 0.25
  648. ncf = neckc0 * CFrame.Angles(0, 0, 0)
  649. rjcf = rootc0 * CFrame.new(0, math.abs(math.sin(angle))*.055, 0) * CFrame.Angles(-math.rad(1), 0, 0)
  650. rscf = rsc0 * CFrame.Angles(math.sin(angle)*.5, 0, -math.rad(1))
  651. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*.5, 0, math.rad(1))
  652. 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))
  653. 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))
  654. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
  655. local RotVelocityZ = torso.RotVelocity.Y
  656. if RotVelocityZ >= 15 then
  657. RotVelocityZ = 15
  658. elseif RotVelocityZ <= -15 then
  659. RotVelocityZ = -15
  660. end
  661. speed = 0.25
  662. anglespeed = 2.7
  663. ncf = neckc0 * CFrame.Angles(0, 0, -math.sin(angle)*.045)
  664. 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)
  665. 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)
  666. 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)
  667. 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))
  668. 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))
  669. end
  670. if tool then
  671. rscf = rsc0 * CFrame.Angles(math.pi/2, 0, 0)
  672. if slashing then
  673. rscf = rsc0
  674. end
  675. end
  676. end
  677. if pa2.Parent == nil then
  678. rm.C0 = clerp(rm.C0,rscf,speed)
  679. end
  680. if pa.Parent == nil then
  681. lm.C0 = clerp(lm.C0,lscf,speed)
  682. end
  683. rj.C0 = clerp(rj.C0,rjcf,speed)
  684. neck.C0 = clerp(neck.C0,ncf,speed)
  685. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  686. llegm.C0 = clerp(llegm.C0,llcf,speed)
  687. end)
  688.  
  689.  
  690.  
  691. game:service'RunService'.RenderStepped:connect(function()
  692. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 225 then
  693. TorsoSmoke.Enabled = true
  694. else
  695. TorsoSmoke.Enabled = false
  696. end
  697. local ray = Ray.new(rootpart.Position, Vector3.new(0, -7, 0))
  698. local hitz, enz = workspace:FindPartOnRay(ray, char)
  699. if hitz and hitz.CanCollide and pa.Parent ~= char and pa2.Parent ~= char then
  700. bodygyro.Parent = nil
  701. humanoid.PlatformStand = false
  702. end
  703. if pa.Parent ~= nil or Grapple1 then
  704. local size = (ropeStart2.Position-pa.Position).magnitude
  705. ropePA.Size = Vector3.new(.2, size, .2)
  706. ropePA.CFrame = CFrame.new(ropeStart2.Position, pa.Position) * CFrame.Angles(math.pi/2, 0, 0) * CFrame.new(0, -size/2, 0)
  707. lm.C0 = CFrame.new(Vector3.new(lsc0.x, lsc0.y, lsc0.z), torso.CFrame:pointToObjectSpace(pa.Position)) * CFrame.Angles(math.pi/2, 0, 0)
  708. else
  709. if not debounce and humanoid.PlatformStand then
  710. lm.C0 = lsc0 * CFrame.Angles(-.15, 0, -.15)
  711. end
  712. end
  713. if pa2.Parent ~= nil or Grapple2 then
  714. local size = (ropeStart.Position-pa2.Position).magnitude
  715. ropePA2.Size = Vector3.new(.2, size, .2)
  716. ropePA2.CFrame = CFrame.new(ropeStart.Position, pa2.Position) * CFrame.Angles(math.pi/2, 0, 0) * CFrame.new(0, -size/2, 0)
  717. rm.C0 = CFrame.new(Vector3.new(rsc0.x, rsc0.y, rsc0.z), torso.CFrame:pointToObjectSpace(pa2.Position)) * CFrame.Angles(math.pi/2, 0, 0)
  718. else
  719. if not debounce and humanoid.PlatformStand then
  720. rm.C0 = rsc0 * CFrame.Angles(-.15, 0, .15)
  721. end
  722. end
  723. if Grapple1 and Grapple1Hit.Parent == nil then
  724. pcall(function() Gweld:remove() end)
  725. pa.Parent = nil
  726. Grapple1 = false
  727. ro:Abort()
  728. end
  729. if Grapple2 and Grapple2Hit.Parent == nil then
  730. pcall(function() Gweld2:remove() end)
  731. pa2.Parent = nil
  732. Grapple2 = false
  733. ro2:Abort()
  734. end
  735. if Grapple1 and Grapple2 and (humanoid.PlatformStand or not hitz) then
  736. local distance = (pa.Position-pa2.Position).magnitude
  737. bodygyro.Parent = torso
  738. torso.CFrame = CFrame.new(torso.Position, Vector3.new(camera.CoordinateFrame.x, camera.CoordinateFrame.y, camera.CoordinateFrame.z)) * CFrame.Angles(0, math.pi, 0)
  739. bodygyro.cframe = CFrame.new(torso.Position, Vector3.new(camera.CoordinateFrame.x, camera.CoordinateFrame.y, camera.CoordinateFrame.z)) * CFrame.Angles(0, math.pi, 0)
  740. pa3.Parent = char
  741. if distance <= .5 then
  742. pa3.CFrame = pa.CFrame
  743. elseif distance > .5 then
  744. pa3.CFrame = CFrame.new(pa.Position, pa2.Position) * CFrame.new(0, 0, -distance/2)
  745. end
  746. if not MidPointUsed then
  747. ro3=Instance.new("RocketPropulsion",torso3)
  748. ro3.Name = 'RockatPropoolsun3'
  749. ro3.MaxSpeed=250
  750. ro3.MaxThrust=16000
  751. ro3.TurnP = 0
  752. ro3.TurnD = 0
  753. ro3.MaxTorque=Vector3.new(14e16,14e16,14e16)
  754. if humanoid.PlatformStand or not hitz then
  755. ro:Abort()
  756. ro2:Abort()
  757. end
  758. ro3.Target = pa3
  759. if humanoid.PlatformStand or not hitz then
  760. ro3:Fire()
  761. end
  762. MidPointUsed = true
  763. end
  764. elseif (not Grapple1 or not Grapple2) and MidPointUsed == true and (humanoid.PlatformStand or not hitz) then
  765. pa3.Parent = nil
  766. MidPointUsed = false
  767. ro3:Abort()
  768. ro3:Destroy()
  769. if Grapple1 then
  770. ro:Fire()
  771. end
  772. if Grapple2 then
  773. ro2:Fire()
  774. end
  775. end
  776. if not Grapple1 then
  777. pcall(function() Gweld:remove() end)
  778. end
  779. if not Grapple2 then
  780. pcall(function() Gweld2:remove() end)
  781. end
  782. if (Grapple1 or Grapple2) and not hitz then
  783. bodygyro.Parent = torso
  784. humanoid.PlatformStand = true
  785. rlegm.Parent = torso
  786. llegm.Parent = torso
  787. lm.Parent = torso
  788. rm.Parent = torso
  789. rlegm.C0 = rlc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, .1)
  790. llegm.C0 = llc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, -.1)
  791. end
  792. if (Grapple1 or Grapple2) and not hitz or humanoid.PlatformStand then
  793. bodygyro.Parent = torso
  794. bodygyro.cframe = CFrame.new(torso.Position, Vector3.new(camera.CoordinateFrame.x, camera.CoordinateFrame.y, camera.CoordinateFrame.z)) * CFrame.Angles(0, math.pi, 0)
  795. rlegm.Parent = torso
  796. llegm.Parent = torso
  797. rlegm.C0 = rlc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, .1)
  798. llegm.C0 = llc0 * CFrame.new(0, .5, -.65) * CFrame.Angles(-math.pi/8, 0, -.1)
  799. end
  800. end)
  801.  
  802. z = Instance.new("Sound", torso)
  803. z.SoundId = "rbxassetid://813440633" -- Put Music ID Here.
  804. z.Looped = true
  805. z.Volume = 1
  806. wait(.1)
  807. z:Play()
  808.  
  809. Player = owner
  810. Character = Player.Character
  811. rarm = Character["Right Arm"]
  812. larm = Character["Left Arm"]
  813. vt = Vector3.new
  814. bc = BrickColor.new
  815. wit = bc("Magenta").Color
  816.  
  817. local prtr = Instance.new("Part",Character)
  818. prtr.Size = vt(0,0,0)
  819. prtr.CanCollide = false
  820. prtr.Transparency = 0.5
  821. prtr.Material = "Neon"
  822. prtr.BrickColor = bc("Magenta")
  823. local prtrl = Instance.new("Part",Character)
  824. prtrl.Size = vt(0,0,0)
  825. prtrl.CanCollide = false
  826. prtrl.Transparency = 0.5
  827. prtrl.Material = "Neon"
  828. prtrl.BrickColor = bc("Magenta")
  829. local eff = Instance.new("ParticleEmitter",prtr)
  830. eff.LightEmission = 30
  831. eff.Texture = "rbxassetid://348321827"
  832. eff.Color = ColorSequence.new(wit)
  833. eff.Size = NumberSequence.new(0.55,1)
  834. eff.Acceleration = vt(0,25,0)
  835. eff.Speed = NumberRange.new(5)
  836. eff.LockedToPart = false
  837. eff.Transparency = NumberSequence.new(0.95)
  838. eff.Lifetime = NumberRange.new(0.50)
  839. eff.Rate = 100000
  840. eff.VelocitySpread = 35
  841. local wld = Instance.new("Weld",Character)
  842. wld.Part0 = rarm
  843. wld.Part1 = prtr
  844. local wldl = Instance.new("Weld",Character)
  845. wldl.Part0 = rleg
  846. wldl.Part1 = prtrl
  847.  
  848. local prtr2 = Instance.new("Part",Character)
  849. prtr2.Size = vt(0,0,0)
  850. prtr2.CanCollide = false
  851. prtr2.Transparency = 0.5
  852. prtr2.Material = "Neon"
  853. prtr2.BrickColor = bc("Magenta")
  854. local prtrl2 = Instance.new("Part",Character)
  855. prtrl2.Size = vt(0,0,0)
  856. prtrl2.CanCollide = false
  857. prtrl2.Transparency = 0.5
  858. prtrl2.Material = "Neon"
  859. prtrl2.BrickColor = bc("Magenta")
  860. local eff2 = Instance.new("ParticleEmitter",prtr2)
  861. eff2.LightEmission = 30
  862. eff2.Texture = "rbxassetid://348321827"
  863. eff2.Color = ColorSequence.new(wit)
  864. eff2.Size = NumberSequence.new(0.55,1)
  865. eff2.Acceleration = vt(0,25,0)
  866. eff2.Speed = NumberRange.new(5)
  867. eff2.LockedToPart = false
  868. eff2.Transparency = NumberSequence.new(0.95)
  869. eff2.Lifetime = NumberRange.new(0.50)
  870. eff2.Rate = 100000
  871. eff2.VelocitySpread = 35
  872. local wld2 = Instance.new("Weld",Character)
  873. wld2.Part0 = larm
  874. wld2.Part1 = prtr2
  875. local wldl2 = Instance.new("Weld",Character)
  876. wldl2.Part0 = lleg
  877. wldl2.Part1 = prtrl2
Advertisement
Add Comment
Please, Sign In to add comment