Advertisement
Smartdumgood

HELICOPTER

Jan 2nd, 2025
2,039
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. local OrionLib = loadstring(game:HttpGet(('https://raw.githubusercontent.com/shlexware/Orion/main/source')))()
  2.  
  3. local Window = OrionLib:MakeWindow({Name = "Helicopter Controls", HidePremium = false})
  4.  
  5. local Tab = Window:MakeTab({
  6. Name = "Helicopter Mode",
  7. Icon = "rbxassetid://4483345998"
  8. })
  9.  
  10. local function createRotor(character)
  11. local rotor = Instance.new("Part")
  12. rotor.Size = Vector3.new(15, 0.5, 1)
  13. rotor.BrickColor = BrickColor.new("Really black")
  14. rotor.Material = Enum.Material.Metal
  15. rotor.CanCollide = false
  16. rotor.CFrame = character.HumanoidRootPart.CFrame * CFrame.new(0, 3, 0)
  17.  
  18. local weld = Instance.new("WeldConstraint")
  19. weld.Part0 = rotor
  20. weld.Part1 = character.HumanoidRootPart
  21. weld.Parent = rotor
  22.  
  23. rotor.Parent = character
  24.  
  25. local spin = Instance.new("BodyAngularVelocity")
  26. spin.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  27. spin.AngularVelocity = Vector3.new(0, 20, 0)
  28. spin.Parent = rotor
  29.  
  30. return rotor
  31. end
  32.  
  33. local function enableFlight(character)
  34. local bodyVelocity = Instance.new("BodyVelocity")
  35. bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  36. bodyVelocity.Velocity = Vector3.new(0, 0, 0)
  37. bodyVelocity.Name = "HelicopterForce"
  38. bodyVelocity.Parent = character.HumanoidRootPart
  39.  
  40. return bodyVelocity
  41. end
  42.  
  43. local rotor = nil
  44. local flying = false
  45. local bodyVelocity = nil
  46.  
  47. Tab:AddButton({
  48. Name = "Transform into Helicopter",
  49. Callback = function()
  50. local player = game.Players.LocalPlayer
  51. local character = player.Character
  52.  
  53. if character and not rotor then
  54. rotor = createRotor(character)
  55. bodyVelocity = enableFlight(character)
  56. flying = true
  57.  
  58. -- Flight controls
  59. game:GetService("RunService").RenderStepped:Connect(function()
  60. if flying and character and bodyVelocity then
  61. local humanoidRootPart = character.HumanoidRootPart
  62. local moveDirection = Vector3.new(0, 0, 0)
  63.  
  64. -- Controls
  65. if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.W) then
  66. moveDirection = moveDirection + humanoidRootPart.CFrame.LookVector
  67. end
  68. if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.S) then
  69. moveDirection = moveDirection - humanoidRootPart.CFrame.LookVector
  70. end
  71. if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.Space) then
  72. moveDirection = moveDirection + Vector3.new(0, 1, 0)
  73. end
  74. if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftControl) then
  75. moveDirection = moveDirection - Vector3.new(0, 1, 0)
  76. end
  77.  
  78. bodyVelocity.Velocity = moveDirection * 50
  79. end
  80. end)
  81. end
  82. end
  83. })
  84.  
  85. Tab:AddButton({
  86. Name = "Stop Helicopter Mode",
  87. Callback = function()
  88. if rotor then
  89. rotor:Destroy()
  90. rotor = nil
  91. end
  92. if bodyVelocity then
  93. bodyVelocity:Destroy()
  94. bodyVelocity = nil
  95. end
  96. flying = false
  97. end
  98. })
  99.  
  100. OrionLib:Init()
  101.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement