Advertisement
Ban43_GodOfEdits

req[plfq

Jul 4th, 2018
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.86 KB | None | 0 0
  1. function sandbox(var,func)
  2. local env = getfenv(func)
  3. local newenv = setmetatable({},{
  4. __index = function(self,k)
  5. if k=="script" then
  6. return var
  7. else
  8. return env[k]
  9. end
  10. end,
  11. })
  12. setfenv(func,newenv)
  13. return func
  14. end
  15. cors = {}
  16. mas = Instance.new("Model",game:GetService("Lighting"))
  17. LocalScript0 = Instance.new("LocalScript")
  18. Sound1 = Instance.new("Sound")
  19. LocalScript2 = Instance.new("LocalScript")
  20. ParticleEmitter3 = Instance.new("ParticleEmitter")
  21. Animation4 = Instance.new("Animation")
  22. LocalScript0.Name = "Rocket Boots"
  23. LocalScript0.Parent = mas
  24. table.insert(cors,sandbox(LocalScript0,function()
  25. --Made by Luckymaxer
  26. wait(1)
  27. Player = game.Players.LocalPlayer
  28. Character = Player.Character
  29. Humanoid = Character:FindFirstChild("Humanoid")
  30. Torso = Character:FindFirstChild("Torso")
  31. Tool = script.Parent
  32.  
  33. Players = game:GetService("Players")
  34. Debris = game:GetService("Debris")
  35.  
  36.  
  37. Animations = {
  38. Pose = {Animation = script:WaitForChild("Pose"), FadeTime = nil, Weight = nil, Speed = nil}
  39. }
  40.  
  41. Flying = false
  42.  
  43. ServerControl = (script:FindFirstChild("ServerControl") or Instance.new("RemoteFunction"))
  44. ServerControl.Name = "ServerControl"
  45. ServerControl.Parent = script
  46.  
  47. ClientControl = (script:FindFirstChild("ClientControl") or Instance.new("RemoteFunction"))
  48. ClientControl.Name = "ClientControl"
  49. ClientControl.Parent = script
  50.  
  51.  
  52. function GetTotalMass(Parent)
  53. TotalMass = 0
  54. function GetMass(Parent)
  55. for i, v in pairs(Parent:GetChildren()) do
  56. if v:IsA("BasePart") then
  57. TotalMass = TotalMass + v:GetMass()
  58. end
  59. GetMass(v)
  60. end
  61. end
  62. GetMass(Parent)
  63. return TotalMass
  64. end
  65.  
  66. function CheckIfAlive()
  67. return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent and Player and Player.Parent) and true) or false)
  68. end
  69.  
  70.  
  71. function OnServerInvoke(player, mode, value)
  72. if player ~= Player or not CheckIfAlive() then
  73. return
  74. end
  75. if mode == "Flying" and value then
  76. local Mode = value.Flying
  77. if Mode then
  78. Flying = true
  79. else
  80. Flying = false
  81. end
  82. end
  83. end
  84.  
  85. function InvokeClient(Mode, Value)
  86. local ClientReturn = nil
  87. pcall(function()
  88. ClientReturn = ClientControl:InvokeClient(Player, Mode, Value)
  89. end)
  90. return ClientReturn
  91. end
  92.  
  93. ServerControl.OnServerInvoke = OnServerInvoke
  94. end))
  95. Sound1.Name = "Wind"
  96. Sound1.Parent = LocalScript0
  97. Sound1.Looped = true
  98. Sound1.EmitterSize = 0
  99. Sound1.MinDistance = 0
  100. Sound1.SoundId = "http://www.roblox.com/asset?id=97179333"
  101. Sound1.Volume = 4
  102. LocalScript2.Parent = LocalScript0
  103. table.insert(cors,sandbox(LocalScript2,function()
  104. --Made by Luckymaxer
  105. wait(1)
  106. function EquipWings()
  107. lboot=Instance.new('Part')
  108. lboot.Transparency=1
  109. lboot.FormFactor=Enum.FormFactor.Custom
  110. lboot.CanCollide=false
  111. lboot.Size=Vector3.new(0,0,0)
  112. lboot.CFrame=Character['Left Leg'].CFrame+Vector3.new(0,-1.2,0)
  113. f=script.Fire:Clone()
  114. f.Parent=lboot
  115. lw=Instance.new('Weld')
  116. lw.Part0=lboot
  117. lw.Part1=Character['Left Leg']
  118. lw.Parent=lboot
  119. lw.C0=lboot.CFrame:inverse()
  120. lw.C1=Character['Left Leg'].CFrame:inverse()
  121. lboot.Parent=Character
  122.  
  123. rboot=Instance.new('Part')
  124. rboot.Transparency=1
  125. rboot.FormFactor=Enum.FormFactor.Custom
  126. rboot.CanCollide=false
  127. rboot.Size=Vector3.new(0,0,0)
  128. rboot.CFrame=Character['Right Leg'].CFrame+Vector3.new(0,-1.2,0)
  129. f=script.Fire:Clone()
  130. f.Parent=rboot
  131. rw=Instance.new('Weld')
  132. rw.Part0=rboot
  133. rw.Part1=Character['Right Leg']
  134. rw.Parent=rboot
  135. rw.C0=rboot.CFrame:inverse()
  136. rw.C1=Character['Right Leg'].CFrame:inverse()
  137. rboot.Parent=Character
  138.  
  139. larm=Instance.new('Part')
  140. larm.Transparency=1
  141. larm.FormFactor=Enum.FormFactor.Custom
  142. larm.CanCollide=false
  143. larm.Size=Vector3.new(0,0,0)
  144. larm.CFrame=Character['Left Arm'].CFrame+Vector3.new(0,0,0)
  145. f=script.Fire:Clone()
  146. f.Parent=larm
  147. lw2=Instance.new('Weld')
  148. lw2.Part0=larm
  149. lw2.Part1=Character['Left Arm']
  150. lw2.Parent=larm
  151.  
  152. larm.Parent=Character
  153.  
  154. rarm=Instance.new('Part')
  155. rarm.Transparency=1
  156. rarm.FormFactor=Enum.FormFactor.Custom
  157. rarm.CanCollide=false
  158. rarm.Size=Vector3.new(0,0,0)
  159. rarm.CFrame=Character['Right Arm'].CFrame+Vector3.new(5,0,0)
  160. f=script.Fire:Clone()
  161. f.Parent=rarm
  162. rw2=Instance.new('Weld')
  163. rw2.Part0=rarm
  164. rw2.Part1=Character['Right Arm']
  165. rw2.Parent=rarm
  166.  
  167. rarm.Parent=Character
  168.  
  169.  
  170. BodyVelocity = Instance.new("BodyVelocity")
  171. BodyVelocity.P = (10 ^ 4)
  172. BodyVelocity.velocity = Vector3.new(0, 0, 0)
  173. BodyVelocity.maxForce = Vector3.new(0, 0, 0)
  174. BodyVelocity.Parent = Torso
  175. BodyGyro = Instance.new("BodyGyro")
  176. BodyGyro.P = (10 ^ 6)
  177. BodyGyro.maxTorque = Vector3.new(0, 0, 0)
  178. BodyGyro.cframe = Torso.CFrame
  179. BodyGyro.Parent = Torso
  180.  
  181. InvokeClient("DisableJump")
  182.  
  183. end
  184. Player = game.Players.LocalPlayer
  185. Character = Player.Character
  186. Humanoid = Character:FindFirstChild("Humanoid")
  187. Torso = Character:FindFirstChild("Torso")
  188.  
  189. Tool = script.Parent
  190.  
  191. Players = game:GetService("Players")
  192. Debris = game:GetService("Debris")
  193. RunService = game:GetService("RunService")
  194.  
  195. Camera = game:GetService("Workspace").CurrentCamera
  196.  
  197. Animations = {}
  198. LocalObjects = {}
  199.  
  200. Speed = {
  201. CurrentSpeed = 2,
  202. MaxSpeed = 185
  203. }
  204.  
  205. Jumping = {
  206. JumpTick = 0,
  207. Jumps = 0,
  208. JumpTime = 0.25,
  209. JumpsRequired = 2
  210. }
  211.  
  212. Controls = {
  213. Forward = {Number = 0, Numbers = {On = -1, Off = 0}, Keys = {"W", 17}},
  214. Backward = {Number = 0, Numbers = { On = 1, Off = 0}, Keys = {"S", 18}},
  215. Left = {Number = 0, Numbers = {On = -1, Off = 0}, Keys = {"A", 20}},
  216. Right = {Number = 0, Numbers = {On = 1, Off = 0}, Keys = {"D", 19}}
  217. }
  218.  
  219. UsableAnimations = {
  220. Pose = {Animation = Tool:WaitForChild("Pose"), FadeTime = nil, Weight = nil, Speed = nil},
  221. }
  222.  
  223. Sounds = {
  224. Wind = Tool:WaitForChild("Wind"),
  225. }
  226.  
  227. FlyRate = (1 / 40)
  228.  
  229. Debounce = false
  230. Flying = false
  231.  
  232. ServerControl = Tool:WaitForChild("ServerControl")
  233. ClientControl = Tool:WaitForChild("ClientControl")
  234.  
  235. function InvokeClient(Mode, Value)
  236. local ClientReturn = nil
  237. pcall(function()
  238. ClientReturn = ClientControl:InvokeClient(Player, Mode, Value)
  239. end)
  240. return ClientReturn
  241. end
  242. function SetAnimation(Mode, Value)
  243. if Mode == "PlayAnimation" and Value and Humanoid then
  244. for i, v in pairs(Animations) do
  245. if v.Animation == Value.Animation then
  246. v.AnimationTrack:Stop()
  247. table.remove(Animations, i)
  248. end
  249. end
  250. local AnimationTrack = Humanoid:LoadAnimation(Value.Animation)
  251. table.insert(Animations, {Animation = Value.Animation, AnimationTrack = AnimationTrack})
  252. AnimationTrack:Play(Value.FadeTime, Value.Weight, Value.Speed)
  253. elseif Mode == "StopAnimation" and Value then
  254. for i, v in pairs(Animations) do
  255. if v.Animation == Value.Animation then
  256. v.AnimationTrack:Stop()
  257. table.remove(Animations, i)
  258. end
  259. end
  260. end
  261. end
  262.  
  263. function DisableJump(Boolean)
  264. if PreventJump then
  265. PreventJump:disconnect()
  266. end
  267. if Boolean then
  268. PreventJump = Humanoid.Changed:connect(function(Property)
  269. if Property == "Jump" then
  270. Humanoid.Jump = false
  271. end
  272. end)
  273. end
  274. end
  275.  
  276. function Clamp(Number, Min, Max)
  277. return math.max(math.min(Max, Number), Min)
  278. end
  279.  
  280. function Fly()
  281. if Flying and Player and Torso and Humanoid and Humanoid.Health > 0 then
  282. local Momentum = Vector3.new(0, 0, 0)
  283. local LastMomentum = Vector3.new(0, 0, 0)
  284. local LastTilt = 0
  285. local LastFlap = 0
  286. local CurrentSpeed = Speed.MaxSpeed
  287. local Inertia = (1 - (Speed.CurrentSpeed / CurrentSpeed))
  288.  
  289. Momentum = (Torso.Velocity + (Torso.CFrame.lookVector * 3) + Vector3.new(0, 10, 0))
  290. Momentum = Vector3.new(Clamp(Momentum.X, -15, 15), Clamp(Momentum.Y, -15, 15), Clamp(Momentum.Z, -15, 15))
  291.  
  292. BodyVelocity.maxForce = Vector3.new(1, 1, 1) * (10 ^ 6)
  293.  
  294. BodyGyro.maxTorque = Vector3.new(BodyGyro.P, BodyGyro.P, BodyGyro.P)
  295. BodyGyro.cframe = Torso.CFrame
  296.  
  297. Spawn(function()
  298. InvokeServer("Flying", {Flying = true})
  299. end)
  300.  
  301. SetAnimation("PlayAnimation", UsableAnimations.Pose)
  302.  
  303. Humanoid.AutoRotate = false
  304.  
  305. while Flying and Torso and Humanoid and Humanoid.Health > 0 do
  306.  
  307. if CurrentSpeed ~= Speed.MaxSpeed then
  308. CurrentSpeed = Speed.MaxSpeed
  309. Inertia = (1 - (Speed.CurrentSpeed / CurrentSpeed))
  310. end
  311.  
  312. local Direction = Camera.CoordinateFrame:vectorToWorldSpace(Vector3.new(Controls.Left.Number + Controls.Right.Number, math.abs(Controls.Forward.Number) * 0.2, Controls.Forward.Number + Controls.Backward.Number))
  313. local Movement = Direction * Speed.CurrentSpeed
  314.  
  315. Momentum = (Momentum * Inertia) + Movement
  316.  
  317. local TotalMomentum = Momentum.magnitude
  318.  
  319. if TotalMomentum > CurrentSpeed then
  320. TotalMomentum = CurrentSpeed
  321. end
  322.  
  323. local Tilt = ((Momentum * Vector3.new(1, 0, 1)).unit:Cross(((LastMomentum * Vector3.new(1, 0, 1)).unit))).y
  324. local StringTilt = tostring(Tilt)
  325.  
  326. if StringTilt == "-1.#IND" or StringTilt == "1.#IND" or Tilt == math.huge or Tilt == -math.huge or StringTilt == tostring(0 / 0) then
  327. Tilt = 0
  328. end
  329.  
  330. local AbsoluteTilt = math.abs(Tilt)
  331.  
  332. if AbsoluteTilt > 0.1 or AbsoluteTilt < 0.09 then
  333. if math.abs(LastTilt) > 0.0001 then
  334. Tilt = (LastTilt * 0.9)
  335. else
  336. Tilt = 0
  337. end
  338. else
  339. Tilt = ((LastTilt * 0.77) + (Tilt * 0.25))
  340. end
  341.  
  342. LastTilt = Tilt
  343.  
  344. if TotalMomentum < 0.5 then
  345. Momentum = Vector3.new(0, 0, 0)
  346. TotalMomentum = 0
  347. BodyGyro.cframe = Camera.CoordinateFrame
  348. else
  349. BodyGyro.cframe = CFrame.new(Vector3.new(0, 0, 0), Momentum) * CFrame.Angles(0, 0, (Tilt * -20)) * CFrame.Angles((math.pi * -0.5 * (TotalMomentum / CurrentSpeed)), 0, 0)
  350. end
  351.  
  352. local GravityDelta = ((((Momentum * Vector3.new(0, 1, 0)) - Vector3.new(0, -Speed.MaxSpeed, 0)).magnitude / Speed.MaxSpeed) * 0.5)
  353. if GravityDelta > 0.45 and tick() > LastFlap then
  354. LastFlap = (tick() + 0.5)
  355. Spawn(function()
  356. if not Flying then
  357. return
  358. end
  359. if not Sounds.Wind.IsPlaying then
  360. Sounds.Wind:Play()
  361. end
  362. wait(0.25)
  363. end)
  364. elseif GravityDelta <= 0.45 then
  365. Sounds.Wind:Stop()
  366. end
  367.  
  368. BodyVelocity.velocity = Momentum
  369. LastMomentum = Momentum
  370.  
  371. wait(FlyRate)
  372.  
  373. end
  374.  
  375. Sounds.Wind:Stop()
  376.  
  377. Spawn(function()
  378. InvokeServer("Flying", {Flying = false})
  379. end)
  380.  
  381. SetAnimation("StopAnimation", UsableAnimations.Pose)
  382.  
  383. BodyVelocity.maxForce = Vector3.new(0, 0, 0)
  384. BodyGyro.maxTorque = Vector3.new(0, 0, 0)
  385.  
  386. if CheckIfAlive() then
  387. Humanoid.AutoRotate = true
  388. Humanoid:ChangeState(Enum.HumanoidStateType.Freefall)
  389. end
  390.  
  391. end
  392. end
  393.  
  394. function StopFlying()
  395. Flying = false
  396. BodyVelocity.maxForce = Vector3.new(0, 0, 0)
  397. BodyGyro.maxTorque = Vector3.new(0, 0, 0)
  398. end
  399.  
  400. function CheckIfAlive()
  401. return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent and Player and Player.Parent) and true) or false)
  402. end
  403.  
  404. if not CheckIfAlive() then
  405. return
  406. end
  407. PlayerMouse = Player:GetMouse()
  408. PlayerMouse.Button1Down:connect(function()
  409. InvokeServer("MouseClick", {Down = true})
  410. end)
  411. PlayerMouse.Button1Up:connect(function()
  412. InvokeServer("MouseClick", {Down = false})
  413. end)
  414. PlayerMouse.KeyDown:connect(function(Key)
  415. local Key = string.lower(Key)
  416. local ByteKey = string.byte(Key)
  417. if ByteKey == string.byte(" ") and not Debounce then
  418. if Flying then
  419. StopFlying()
  420. for i, v in pairs({BodyVelocity, BodyGyro, lboot, rboot, larm, rarm}) do
  421. if v and v.Parent then
  422. v:Destroy()
  423. end
  424. end
  425. elseif not Flying then
  426. if (tick() - Jumping.JumpTick) <= Jumping.JumpTime or Jumping.JumpTick == 0 then
  427. Jumping.JumpTick = tick()
  428. Jumping.Jumps = Jumping.Jumps + 1
  429. if Jumping.Jumps >= Jumping.JumpsRequired then
  430. Debounce = true
  431. Jumping.JumpTick = 0
  432. Jumping.Jumps = 0
  433. Flying = true
  434. Spawn(EquipWings)
  435. Spawn(Fly)
  436. Debounce = false
  437. end
  438. else
  439. Jumping.JumpTick = tick()
  440. Jumping.Jumps = 1
  441. end
  442. end
  443. end
  444. for i, v in pairs(Controls) do
  445. for ii, vv in pairs(v.Keys) do
  446. v.Number = ((((string.lower(type(vv)) == string.lower("String") and Key == string.lower(vv)) or (string.lower(type(vv)) == string.lower("Number") and ByteKey == vv)) and v.Numbers.On) or v.Number)
  447. end
  448. end
  449. end)
  450. PlayerMouse.KeyUp:connect(function(Key)
  451. local Key = string.lower(Key)
  452. local ByteKey = string.byte(Key)
  453. for i, v in pairs(Controls) do
  454. for ii, vv in pairs(v.Keys) do
  455. v.Number = ((((string.lower(type(vv)) == string.lower("String") and Key == string.lower(vv)) or (string.lower(type(vv)) == string.lower("Number") and ByteKey == vv)) and v.Numbers.Off) or v.Number)
  456. end
  457. end
  458. end)
  459. while not BodyVelocity or not BodyVelocity.Parent or not BodyGyro or not BodyGyro.Parent and CheckIfAlive() do
  460. BodyVelocity = Torso:FindFirstChild("BodyVelocity")
  461. BodyGyro = Torso:FindFirstChild("BodyGyro")
  462. RunService.Stepped:wait()
  463. end
  464.  
  465. function InvokeServer(Mode, Value)
  466. pcall(function()
  467. local ServerReturn = ServerControl:InvokeServer(Mode, Value)
  468. return ServerReturn
  469. end)
  470. end
  471.  
  472. function OnClientInvoke(Mode, Value)
  473. if Mode == "PlayAnimation" and Value and Humanoid then
  474. SetAnimation("PlayAnimation", Value)
  475. elseif Mode == "StopAnimation" and Value then
  476. SetAnimation("StopAnimation", Value)
  477. elseif Mode == "PlaySound" and Value then
  478. Value:Play()
  479. elseif Mode == "StopSound" and Value then
  480. Value:Stop()
  481. elseif Mode == "MousePosition" then
  482. return PlayerMouse.Hit.p
  483. elseif Mode == "DisableJump" then
  484. DisableJump(Value)
  485. elseif Mode == "Fly" and not Flying then
  486. Flying = true
  487. Spawn(function()
  488. Fly()
  489. end)
  490. end
  491. end
  492.  
  493. function InvokeClient(Mode, Value)
  494. local ClientReturn = nil
  495. pcall(function()
  496. ClientReturn = ClientControl:InvokeClient(Player, Mode, Value)
  497. end)
  498. return ClientReturn
  499. end
  500. ClientControl.OnClientInvoke = OnClientInvoke
  501. end))
  502. ParticleEmitter3.Name = "Fire"
  503. ParticleEmitter3.Parent = LocalScript2
  504. ParticleEmitter3.Speed = NumberRange.new(-5, -5)
  505. ParticleEmitter3.Color = ColorSequence.new(Color3.new(0.992157, 1, 0.67451),Color3.new(1, 0.658824, 0.321569))
  506. ParticleEmitter3.LightEmission = 4
  507. ParticleEmitter3.Texture = "http://www.roblox.com/asset/?id=48229939"
  508. ParticleEmitter3.Transparency = NumberSequence.new(0.44374999403954,0.89375001192093,0.91874998807907,1)
  509. ParticleEmitter3.Size = NumberSequence.new(0.60000002384186,0.60000002384186)
  510. ParticleEmitter3.Lifetime = NumberRange.new(0.30000001192093, 0.30000001192093)
  511. ParticleEmitter3.LockedToPart = true
  512. ParticleEmitter3.Rate = 45645648
  513. Animation4.Name = "Pose"
  514. Animation4.Parent = LocalScript0
  515. Animation4.AnimationId = "http://www.roblox.com/Asset?ID=97172005"
  516. for i,v in pairs(mas:GetChildren()) do
  517. v.Parent = game:GetService("Players").LocalPlayer.Character
  518. pcall(function() v:MakeJoints() end)
  519. end
  520. mas:Destroy()
  521. for i,v in pairs(cors) do
  522. spawn(function()
  523. pcall(v)
  524. end)
  525. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement