Advertisement
giorgichadunelipro

jjezz

Mar 7th, 2022
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.16 KB | None | 0 0
  1. local ScreenGui = Instance.new("ScreenGui")
  2. local FlyFrame = Instance.new("Frame")
  3. local TextButton = Instance.new("TextButton")
  4. local TextLabel = Instance.new("TextLabel")
  5. local TextLabel_2 = Instance.new("TextLabel")
  6.  
  7.  
  8. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  9. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  10.  
  11. FlyFrame.Name = "FlyFrame"
  12. FlyFrame.Parent = ScreenGui
  13. FlyFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  14. FlyFrame.Position = UDim2.new(0.363351613, 0, 0.380106568, 0)
  15. FlyFrame.Size = UDim2.new(0, 290, 0, 180)
  16. FlyFrame.Style = Enum.FrameStyle.ChatBlue
  17.  
  18. TextButton.Parent = FlyFrame
  19. TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  20. TextButton.Position = UDim2.new(0.106896549, 0, 0.477777749, 0)
  21. TextButton.Size = UDim2.new(0, 200, 0, 50)
  22. TextButton.Style = Enum.ButtonStyle.RobloxRoundDefaultButton
  23. TextButton.Font = Enum.Font.Cartoon
  24. TextButton.Text = "Fly"
  25. TextButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  26. TextButton.TextSize = 40.000
  27. TextButton.TextWrapped = true
  28. TextButton.MouseButton1Down:connect(function()
  29. repeat wait()
  30. until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Torso") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
  31. local mouse = game.Players.LocalPlayer:GetMouse()
  32. repeat wait() until mouse
  33. local plr = game.Players.LocalPlayer
  34. local torso = plr.Character.Torso
  35. local flying = true
  36. local deb = true
  37. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  38. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  39. local maxspeed = 100
  40. local speed = 0
  41.  
  42. function Fly()
  43. local bg = Instance.new("BodyGyro", torso)
  44. bg.P = 9e4
  45. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  46. bg.cframe = torso.CFrame
  47. local bv = Instance.new("BodyVelocity", torso)
  48. bv.velocity = Vector3.new(0,0.1,0)
  49. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  50. repeat wait()
  51. plr.Character.Humanoid.PlatformStand = true
  52. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  53. speed = speed+.5+(speed/maxspeed)
  54. if speed > maxspeed then
  55. speed = maxspeed
  56. end
  57. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  58. speed = speed-1
  59. if speed < 0 then
  60. speed = 0
  61. end
  62. end
  63. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  64. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  65. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  66. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  67. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  68. else
  69. bv.velocity = Vector3.new(0,0.1,0)
  70. end
  71. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  72. until not flying
  73. ctrl = {f = 0, b = 0, l = 0, r = 0}
  74. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  75. speed = 0
  76. bg:Destroy()
  77. bv:Destroy()
  78. plr.Character.Humanoid.PlatformStand = false
  79. end
  80. mouse.KeyDown:connect(function(key)
  81. if key:lower() == "e" then
  82. if flying then flying = false
  83. else
  84. flying = true
  85. Fly()
  86. end
  87. elseif key:lower() == "w" then
  88. ctrl.f = 1
  89. elseif key:lower() == "s" then
  90. ctrl.b = -1
  91. elseif key:lower() == "a" then
  92. ctrl.l = -1
  93. elseif key:lower() == "d" then
  94. ctrl.r = 1
  95. end
  96. end)
  97. mouse.KeyUp:connect(function(key)
  98. if key:lower() == "w" then
  99. ctrl.f = 0
  100. elseif key:lower() == "s" then
  101. ctrl.b = 0
  102. elseif key:lower() == "a" then
  103. ctrl.l = 0
  104. elseif key:lower() == "d" then
  105. ctrl.r = 0
  106. end
  107. end)
  108. Fly()
  109. end)
  110.  
  111. TextLabel.Parent = FlyFrame
  112. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  113. TextLabel.BackgroundTransparency = 1.000
  114. TextLabel.Position = UDim2.new(0.106896549, 0, 0.0500000007, 0)
  115. TextLabel.Size = UDim2.new(0, 200, 0, 50)
  116. TextLabel.Font = Enum.Font.Cartoon
  117. TextLabel.Text = "Fly Gui"
  118. TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  119. TextLabel.TextScaled = true
  120. TextLabel.TextSize = 14.000
  121. TextLabel.TextWrapped = true
  122.  
  123. TextLabel_2.Parent = FlyFrame
  124. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  125. TextLabel_2.BackgroundTransparency = 1.000
  126. TextLabel_2.Position = UDim2.new(0.107443348, 0, 0.923075914, 0)
  127. TextLabel_2.Size = UDim2.new(0, 200, 0, 18)
  128. TextLabel_2.Font = Enum.Font.Cartoon
  129. TextLabel_2.Text = "Creds: Brehtato"
  130. TextLabel_2.TextColor3 = Color3.fromRGB(0, 0, 0)
  131. TextLabel_2.TextScaled = true
  132. TextLabel_2.TextSize = 14.000
  133. TextLabel_2.TextWrapped = true
  134.  
  135. local function FEXB_fake_script()
  136. local script = Instance.new('Script', ScreenGui)
  137.  
  138. frame = script.Parent.FlyFrame
  139. frame.Draggable = true
  140. frame.Active = true
  141. frame.Selectable = true
  142. end
  143. coroutine.wrap(FEXB_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement