foxywolf233

do not look

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