Advertisement
deadropz

skydive

Apr 18th, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.04 KB | None | 0 0
  1. -------------------MADE BY ChoyKo----------------ORIGINAL------
  2.  
  3. wait(1)
  4. Character = game.Players.LocalPlayer.Character
  5. Camera = game.Workspace.CurrentCamera
  6. Mouse = game.Players.LocalPlayer:GetMouse()
  7. RArmJoint = Character.Torso:FindFirstChild("Right Shoulder")
  8. LArmJoint = Character.Torso:FindFirstChild("Left Shoulder")
  9. RHipJoint = Character.Torso:FindFirstChild("Right Hip")
  10. LHipJoint = Character.Torso:FindFirstChild("Left Hip")
  11. Tilt = 0
  12. TiltConvergence = 0
  13. Twist = 0
  14. TwistConvergence = 0
  15. Speed = 0.975
  16. SpeedConvergence = 0.975
  17. SD = 0.95
  18. Flat = Vector3.new(1, 0, 1)
  19. CurrentCameraLV = nil
  20. MinVelocity = -100
  21. HasReset = false
  22. Flying = false
  23.  
  24. function KeyPressed(Key)
  25. if Key == "d" then
  26. TwistConvergence = 1
  27. elseif Key == "a" then
  28. TwistConvergence = -1
  29. elseif Key == "w" then
  30. TiltConvergence = 1
  31. elseif Key == "s" then
  32. TiltConvergence = -1
  33. elseif Key == " " then
  34. SD = 0.95
  35. SpeedConvergence = 0.66
  36. end
  37. print(3)
  38. end
  39.  
  40. function KeyUnpressed(Key)
  41. if Key == "d" or Key == "a" then
  42. TwistConvergence = 0
  43. elseif Key == "w" or Key == "s" then
  44. TiltConvergence = 0
  45. elseif Key == " " then
  46. SD = 0.975
  47. SpeedConvergence = 1
  48. end
  49. print(4)
  50. end
  51.  
  52. Mouse.KeyDown:connect(KeyPressed)
  53. Mouse.KeyUp:connect(KeyUnpressed)
  54.  
  55. function ChangeWeld(Weld, C0, C1)
  56. Weld.C0, Weld.C1 = C0, C1
  57. end
  58.  
  59. function MakeRay(From, To)
  60. local Hit, Position = game.Workspace:FindPartOnRay(Ray.new(From, To - From), Character)
  61. return {Hit = Hit, Position = Position}
  62. end
  63.  
  64. while true do
  65. wait()
  66. Twist = (Twist * 31 + TwistConvergence) / 32
  67. Tilt = (Tilt * 31 + TiltConvergence) / 32
  68. Speed = (Speed * 15 + SpeedConvergence) / 16
  69. if Character.Torso.Velocity.y < MinVelocity and not Character.Humanoid.Sit then
  70. Character.Animate.Disabled = true
  71. VMag = math.sqrt(Character.Torso.Velocity.magnitude / 48)
  72. DMag = ((Character.Torso.CFrame * CFrame.Angles(1.57, 0, 0)).lookVector - Character.Torso.Velocity.unit).magnitude
  73. MinVelocity = -50
  74. HasReset = false
  75. Character.Humanoid.PlatformStand = true
  76. Raise = math.max(math.min(Character.Torso.Velocity.y / 800 - (DMag * VMag / 4), 1), -1)
  77. ChangeWeld(RArmJoint,
  78. CFrame.new(1.5, 0.5, 0) * CFrame.Angles(Raise, (math.random() * 0.2 - 0.1) * Raise, 2.355 / Speed - 1.57 - Twist / 1.5),
  79. CFrame.new(0, 0.5, 0))
  80. ChangeWeld(LArmJoint,
  81. CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(Raise, (math.random() * 0.2 - 0.1) * Raise, -2.355 / Speed + 1.57 - Twist / 1.5),
  82. CFrame.new(0, 0.5, 0))
  83. ChangeWeld(RHipJoint,
  84. CFrame.new(0.5, -1, 0) * CFrame.Angles(Raise, (math.random() * 0.2 - 0.1) * Raise, 1.046 / Speed - 0.698 - Twist / 1.5),
  85. CFrame.new(0, 1, 0))
  86. ChangeWeld(LHipJoint,
  87. CFrame.new(-0.5, -1, 0) * CFrame.Angles(Raise, (math.random() * 0.2 - 0.1) * Raise, -1.046 / Speed + 0.698 - Twist / 1.5),
  88. CFrame.new(0, 1, 0))
  89. CurrentCameraLV = (game.Workspace.CurrentCamera.CoordinateFrame.lookVector * Flat).unit
  90. Character.Torso.CFrame = CFrame.new(Character.Torso.Position, Character.Torso.Position + ((Character.Torso.CFrame * CFrame.Angles(1.57, 0, 0)).lookVector * Flat * 15 + CurrentCameraLV)/16) * CFrame.Angles(-Tilt - 1.57, Twist, 0)
  91. Character.Torso.Velocity = Character.Torso.Velocity*SD + CurrentCameraLV*Tilt*5 + Vector3.new(-CurrentCameraLV.z, 0, CurrentCameraLV.x)*Twist*5
  92. Character.Torso.RotVelocity = Vector3.new(0, 0, 0)
  93. elseif not HasReset then
  94. Character.Animate.Disabled = false
  95. MinVelocity = -100
  96. Character.Humanoid.PlatformStand = false
  97. RArmJoint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(0, math.pi/2, 0)
  98. RArmJoint.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, math.pi/2, 0)
  99. LArmJoint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(0, -math.pi/2, 0)
  100. LArmJoint.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, -math.pi/2, 0)
  101. RHipJoint.C0 = CFrame.new(0.5, -1, 0) * CFrame.Angles(0, math.pi/2, 0)
  102. RHipJoint.C1 = CFrame.new(0, 1, 0) * CFrame.Angles(0, math.pi/2, 0)
  103. LHipJoint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.Angles(0, -math.pi/2, 0)
  104. LHipJoint.C1 = CFrame.new(0, 1, 0) * CFrame.Angles(0, -math.pi/2, 0)
  105. HasReset = true
  106. end
  107. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement