Advertisement
jiggahop

Untitled

Jun 4th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. addcmd('doublefrontflip',{},
  2. function(args, speaker)
  3.  
  4.  
  5. pl=game.Players.LocalPlayer
  6. me=pl.Character
  7. xl=me.Torso['Right Shoulder']
  8. t=Instance.new("HopperBin",pl.Backpack)
  9. t.Name="Double Front Flip"
  10. local debounce=false
  11. function _restoreproperties()
  12. Holder = player.Character
  13. Torso = Holder:FindFirstChild("Torso")
  14. RightS = Torso:FindFirstChild("Right Shoulder")
  15. LeftS = Torso:FindFirstChild("Left Shoulder")
  16. RightH = Torso:FindFirstChild("Right Hip")
  17. LeftH = Torso:FindFirstChild("Left Hip")
  18. RightS.MaxVelocity = .15
  19. LeftS.MaxVelocity = .15
  20. RightH.MaxVelocity = .1
  21. LeftH.MaxVelocity = .1
  22. RightS.DesiredAngle = 0
  23. LeftS.DesiredAngle = 0
  24. LeftH.DesiredAngle = 0
  25. RightH.DesiredAngle = 0
  26. end
  27. function ManageAnimation(value)
  28. Holder = player.Character
  29. Player = player
  30. if value == "no anim" then
  31. Anim = Holder:FindFirstChild("Animate")
  32. if Anim~=nil then
  33. Anim.Disabled = true
  34. Anim.Parent = Player
  35. end
  36. elseif value == "re-anim" then
  37. Anim = Player:FindFirstChild("Animate")
  38. if Anim~=nil then
  39. Anim.Disabled = false
  40. Anim.Parent = Holder
  41. end
  42. end
  43. end
  44. function Down(ml)
  45. for i=1, ml.velocity.y/3 do
  46. ml.velocity = ml.velocity+Vector3.new(0,-4.25,0)
  47. wait()
  48. end
  49. ml:Remove()
  50. end
  51. function Flip()
  52. if debounce==true then return end
  53. debounce=true
  54. Char = player.Character
  55. Human = Char.Humanoid
  56. Torso = Char.Torso
  57. CF = Torso.CFrame
  58. Human.PlatformStand = true
  59. VelUp = Instance.new("BodyVelocity")
  60. VelUp.velocity = Vector3.new(0,60,0)+Torso.CFrame.lookVector*26 --Middle (0,0,0). Change for height.
  61. VelUp.P = VelUp.P*2
  62. VelUp.maxForce = Vector3.new(10000,10000,10000)*999
  63. VelUp.Parent = Torso
  64. coroutine.resume(coroutine.create(Down),VelUp)
  65. Gyro = Instance.new("BodyGyro")
  66. Gyro.P = Gyro.P*10
  67. Gyro.maxTorque = Vector3.new(100000,100000,100000)*999
  68. Gyro.cframe = CF
  69. Gyro.Parent = Torso
  70. for i=2, 28 do --The amount of time your guy flips.
  71. Gyro.cframe = Gyro.cframe*CFrame.fromEulerAnglesXYZ(math.pi/-7,0,0) --The amount of flips. 1 = -16, 2 = -8
  72. wait()
  73. end
  74. Gyro.cframe = CF
  75. wait()
  76. Gyro:Remove()
  77. Human.PlatformStand = false
  78. _restoreproperties()
  79. debounce=false
  80. end
  81. function onActive(mouse)
  82. player = game.Players.LocalPlayer
  83. if player==nil then return end
  84. mouse.Button1Down:connect(function() Flip() end)
  85. end
  86. script.Parent = t.Selected:connect(onActive)
  87.  
  88.  
  89. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement