Advertisement
ben10keil5

Fat's Simple Fly Gui

Apr 9th, 2022
1,502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.37 KB | None | 0 0
  1. -- Fat's Simple Fly Gui
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local ScreenGui = Instance.new("ScreenGui")
  7. local Frame = Instance.new("ImageLabel")
  8. local Frame_2 = Instance.new("ImageLabel")
  9. local TextLabel_Roundify_12px = Instance.new("ImageLabel")
  10. local TextLabel = Instance.new("TextLabel")
  11. local TextLabel_2 = Instance.new("TextLabel")
  12. local TextButton_Roundify_12px = Instance.new("ImageLabel")
  13. local TextButton = Instance.new("TextButton")
  14. local TextLabel_3 = Instance.new("TextLabel")
  15.  
  16. --Properties:
  17.  
  18. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  19.  
  20. Frame.Name = "Frame"
  21. Frame.Parent = ScreenGui
  22. Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  23. Frame.BackgroundTransparency = 1.000
  24. Frame.LayoutOrder = 1
  25. Frame.Position = UDim2.new(0.373277903, 0, 0.223860547, 0)
  26. Frame.Size = UDim2.new(0, 374, 0, 217)
  27. Frame.Image = "rbxassetid://3570695787"
  28. Frame.ImageColor3 = Color3.fromRGB(92, 91, 93)
  29. Frame.ScaleType = Enum.ScaleType.Slice
  30. Frame.SliceCenter = Rect.new(100, 100, 100, 100)
  31. Frame.SliceScale = 0.120
  32.  
  33. Frame_2.Name = "Frame"
  34. Frame_2.Parent = Frame
  35. Frame_2.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  36. Frame_2.BackgroundTransparency = 1.000
  37. Frame_2.Position = UDim2.new(-0.00323713943, 0, -0.00194585323, 0)
  38. Frame_2.Size = UDim2.new(0, 25, 0, 217)
  39. Frame_2.Image = "rbxassetid://3570695787"
  40. Frame_2.ImageColor3 = Color3.fromRGB(0, 0, 0)
  41. Frame_2.ScaleType = Enum.ScaleType.Slice
  42. Frame_2.SliceCenter = Rect.new(100, 100, 100, 100)
  43. Frame_2.SliceScale = 0.120
  44.  
  45. TextLabel_Roundify_12px.Name = "TextLabel_Roundify_12px"
  46. TextLabel_Roundify_12px.Parent = Frame_2
  47. TextLabel_Roundify_12px.AnchorPoint = Vector2.new(0.5, 0.5)
  48. TextLabel_Roundify_12px.BackgroundColor3 = Color3.fromRGB(254, 252, 255)
  49. TextLabel_Roundify_12px.BackgroundTransparency = 1.000
  50. TextLabel_Roundify_12px.Position = UDim2.new(7.49943352, 0, 0.125559643, 0)
  51. TextLabel_Roundify_12px.Size = UDim2.new(9.76669598, 0, 0.189940825, 0)
  52. TextLabel_Roundify_12px.Image = "rbxassetid://3570695787"
  53. TextLabel_Roundify_12px.ImageColor3 = Color3.fromRGB(0, 0, 0)
  54. TextLabel_Roundify_12px.ScaleType = Enum.ScaleType.Slice
  55. TextLabel_Roundify_12px.SliceCenter = Rect.new(100, 100, 100, 100)
  56. TextLabel_Roundify_12px.SliceScale = 0.120
  57.  
  58. TextLabel.Parent = TextLabel_Roundify_12px
  59. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  60. TextLabel.BackgroundTransparency = 1.000
  61. TextLabel.Position = UDim2.new(0.119872868, 0, 0.094785884, 0)
  62. TextLabel.Size = UDim2.new(0, 185, 0, 32)
  63. TextLabel.Font = Enum.Font.SourceSansBold
  64. TextLabel.Text = "Fly Gui"
  65. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  66. TextLabel.TextScaled = true
  67. TextLabel.TextSize = 14.000
  68. TextLabel.TextStrokeColor3 = Color3.fromRGB(254, 252, 255)
  69. TextLabel.TextWrapped = true
  70.  
  71. TextLabel_2.Parent = TextLabel
  72. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  73. TextLabel_2.BackgroundTransparency = 1.000
  74. TextLabel_2.Position = UDim2.new(-0.104133546, 0, 2.86736774, 0)
  75. TextLabel_2.Size = UDim2.new(0, 224, 0, 21)
  76. TextLabel_2.Font = Enum.Font.SourceSansBold
  77. TextLabel_2.Text = "Press E to Toggle"
  78. TextLabel_2.TextColor3 = Color3.fromRGB(254, 252, 255)
  79. TextLabel_2.TextScaled = true
  80. TextLabel_2.TextSize = 56.000
  81. TextLabel_2.TextWrapped = true
  82.  
  83. TextButton_Roundify_12px.Name = "TextButton_Roundify_12px"
  84. TextButton_Roundify_12px.Parent = Frame
  85. TextButton_Roundify_12px.Active = true
  86. TextButton_Roundify_12px.AnchorPoint = Vector2.new(0.5, 0.5)
  87. TextButton_Roundify_12px.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  88. TextButton_Roundify_12px.BackgroundTransparency = 1.000
  89. TextButton_Roundify_12px.Position = UDim2.new(0.497326195, 0, 0.698156655, 0)
  90. TextButton_Roundify_12px.Selectable = true
  91. TextButton_Roundify_12px.Size = UDim2.new(0.647058845, 0, 0.262672812, 0)
  92. TextButton_Roundify_12px.Image = "rbxassetid://3570695787"
  93. TextButton_Roundify_12px.ImageColor3 = Color3.fromRGB(0, 0, 0)
  94. TextButton_Roundify_12px.ScaleType = Enum.ScaleType.Slice
  95. TextButton_Roundify_12px.SliceCenter = Rect.new(100, 100, 100, 100)
  96. TextButton_Roundify_12px.SliceScale = 0.120
  97.  
  98. TextButton.Parent = TextButton_Roundify_12px
  99. TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  100. TextButton.BackgroundTransparency = 1.000
  101. TextButton.BorderSizePixel = 0
  102. TextButton.Position = UDim2.new(0, 0, 0.0589374751, 0)
  103. TextButton.Size = UDim2.new(0, 241, 0, 50)
  104. TextButton.Font = Enum.Font.SourceSansBold
  105. TextButton.Text = "Fly"
  106. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  107. TextButton.TextScaled = true
  108. TextButton.TextSize = 14.000
  109. TextButton.TextWrapped = true
  110. TextButton.MouseButton1Down:connect(function()
  111.     repeat wait()
  112.     until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Torso") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
  113.     local mouse = game.Players.LocalPlayer:GetMouse()
  114.     repeat wait() until mouse
  115.     local plr = game.Players.LocalPlayer
  116.     local torso = plr.Character.Torso
  117.     local flying = true
  118.     local deb = true
  119.     local ctrl = {f = 0, b = 0, l = 0, r = 0}
  120.     local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  121.     local maxspeed = 50
  122.     local speed = 0
  123.  
  124.     function Fly()
  125.         local bg = Instance.new("BodyGyro", torso)
  126.         bg.P = 9e4
  127.         bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  128.         bg.cframe = torso.CFrame
  129.         local bv = Instance.new("BodyVelocity", torso)
  130.         bv.velocity = Vector3.new(0,0.1,0)
  131.         bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  132.         repeat wait()
  133.             plr.Character.Humanoid.PlatformStand = true
  134.             if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  135.                 speed = speed+.5+(speed/maxspeed)
  136.                 if speed > maxspeed then
  137.                     speed = maxspeed
  138.                 end
  139.             elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  140.                 speed = speed-1
  141.                 if speed < 0 then
  142.                     speed = 0
  143.                 end
  144.             end
  145.             if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  146.                 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
  147.                 lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  148.             elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  149.                 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
  150.             else
  151.                 bv.velocity = Vector3.new(0,0.1,0)
  152.             end
  153.             bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  154.         until not flying
  155.         ctrl = {f = 0, b = 0, l = 0, r = 0}
  156.         lastctrl = {f = 0, b = 0, l = 0, r = 0}
  157.         speed = 0
  158.         bg:Destroy()
  159.         bv:Destroy()
  160.         plr.Character.Humanoid.PlatformStand = false
  161.     end
  162.     mouse.KeyDown:connect(function(key)
  163.         if key:lower() == "e" then
  164.             if flying then flying = false
  165.             else
  166.                 flying = true
  167.                 Fly()
  168.             end
  169.         elseif key:lower() == "w" then
  170.             ctrl.f = 1
  171.         elseif key:lower() == "s" then
  172.             ctrl.b = -1
  173.         elseif key:lower() == "a" then
  174.             ctrl.l = -1
  175.         elseif key:lower() == "d" then
  176.             ctrl.r = 1
  177.         end
  178.     end)
  179.     mouse.KeyUp:connect(function(key)
  180.         if key:lower() == "w" then
  181.             ctrl.f = 0
  182.         elseif key:lower() == "s" then
  183.             ctrl.b = 0
  184.         elseif key:lower() == "a" then
  185.             ctrl.l = 0
  186.         elseif key:lower() == "d" then
  187.             ctrl.r = 0
  188.         end
  189.     end)
  190.     Fly()
  191. end)
  192. TextLabel_3.Parent = Frame
  193. TextLabel_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  194. TextLabel_3.BackgroundTransparency = 1.000
  195. TextLabel_3.Position = UDim2.new(0.382352948, 0, 0.898617625, 0)
  196. TextLabel_3.Size = UDim2.new(0, 224, 0, 21)
  197. TextLabel_3.Font = Enum.Font.SourceSansBold
  198. TextLabel_3.Text = "Made By Fat#3323"
  199. TextLabel_3.TextColor3 = Color3.fromRGB(254, 252, 255)
  200. TextLabel_3.TextScaled = true
  201. TextLabel_3.TextSize = 56.000
  202. TextLabel_3.TextWrapped = true
  203.  
  204. -- Scripts:
  205.  
  206. local function PUJAVZT_fake_script() -- Frame.Dragify
  207.     local script = Instance.new('LocalScript', Frame)
  208.  
  209.     local UIS = game:GetService("UserInputService")
  210.     function dragify(Frame)
  211.         dragToggle = nil
  212.         local dragSpeed = 0
  213.         dragInput = nil
  214.         dragStart = nil
  215.         local dragPos = nil
  216.         function updateInput(input)
  217.             local Delta = input.Position - dragStart
  218.             local Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + Delta.X, startPos.Y.Scale, startPos.Y.Offset + Delta.Y)
  219.             game:GetService("TweenService"):Create(Frame, TweenInfo.new(0.25), {Position = Position}):Play()
  220.         end
  221.         Frame.InputBegan:Connect(function(input)
  222.             if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and UIS:GetFocusedTextBox() == nil then
  223.                 dragToggle = true
  224.                 dragStart = input.Position
  225.                 startPos = Frame.Position
  226.                 input.Changed:Connect(function()
  227.                     if input.UserInputState == Enum.UserInputState.End then
  228.                         dragToggle = false
  229.                     end
  230.                 end)
  231.             end
  232.         end)
  233.         Frame.InputChanged:Connect(function(input)
  234.             if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  235.                 dragInput = input
  236.             end
  237.         end)
  238.         game:GetService("UserInputService").InputChanged:Connect(function(input)
  239.             if input == dragInput and dragToggle then
  240.                 updateInput(input)
  241.             end
  242.         end)
  243.     end
  244.    
  245.     dragify(script.Parent)
  246. end
  247. coroutine.wrap(PUJAVZT_fake_script)()
  248.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement