kaualima12

Untitled

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