--// SERVICES local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local RunService = game:GetService("RunService") local player = Players.LocalPlayer --// GUI local gui = Instance.new("ScreenGui") gui.Name = "UltimateFlyGui" gui.Parent = player.PlayerGui gui.ResetOnSpawn = false --// SETTINGS local ToggleKey = Enum.KeyCode.RightShift local FlyToggleKey = Enum.KeyCode.F -- NEW: Fly toggle keybind local WaitingForKey = false local WaitingForFlyKey = false -- NEW: For fly keybind setup --// MAIN FRAME local Main = Instance.new("Frame") Main.Parent = gui Main.Size = UDim2.new(0, 430, 0, 420) -- Increased height for new button Main.Position = UDim2.new(0.5,-215,0.5,-210) Main.BackgroundColor3 = Color3.fromRGB(15,15,20) Main.BorderSizePixel = 0 Main.Active = true Main.Draggable = true Instance.new("UICorner", Main).CornerRadius = UDim.new(0,14) local Stroke = Instance.new("UIStroke") Stroke.Parent = Main Stroke.Thickness = 2 --// RGB BORDER task.spawn(function() while true do for i = 0,1,0.01 do Stroke.Color = Color3.fromHSV(i,1,1) task.wait() end end end) --// TOPBAR local Topbar = Instance.new("Frame") Topbar.Parent = Main Topbar.Size = UDim2.new(1,0,0,50) Topbar.BackgroundTransparency = 1 --// TITLE local Title = Instance.new("TextLabel") Title.Parent = Topbar Title.Size = UDim2.new(1,0,1,0) Title.BackgroundTransparency = 1 Title.Text = "Universal Fly + Teleport GUI V4" Title.Font = Enum.Font.GothamBold Title.TextSize = 22 Title.TextColor3 = Color3.new(1,1,1) --// CLOSE local Close = Instance.new("TextButton") Close.Parent = Topbar Close.Size = UDim2.new(0,30,0,30) Close.Position = UDim2.new(1,-40,0.5,-15) Close.BackgroundColor3 = Color3.fromRGB(255,70,70) Close.Text = "X" Close.Font = Enum.Font.GothamBold Close.TextColor3 = Color3.new(1,1,1) Close.TextSize = 16 Close.BorderSizePixel = 0 Instance.new("UICorner", Close).CornerRadius = UDim.new(1,0) Close.MouseButton1Click:Connect(function() gui:Destroy() end) --// MINIMIZE local Minimize = Instance.new("TextButton") Minimize.Parent = Topbar Minimize.Size = UDim2.new(0,30,0,30) Minimize.Position = UDim2.new(1,-75,0.5,-15) Minimize.BackgroundColor3 = Color3.fromRGB(255,190,70) Minimize.Text = "-" Minimize.Font = Enum.Font.GothamBold Minimize.TextColor3 = Color3.new(1,1,1) Minimize.TextSize = 18 Minimize.BorderSizePixel = 0 Instance.new("UICorner", Minimize).CornerRadius = UDim.new(1,0) --// CONTAINER local Container = Instance.new("Frame") Container.Parent = Main Container.Position = UDim2.new(0,15,0,55) Container.Size = UDim2.new(1,-30,1,-70) Container.BackgroundTransparency = 1 local Layout = Instance.new("UIListLayout") Layout.Parent = Container Layout.Padding = UDim.new(0,10) --// CREATE BUTTON local function CreateButton(text,color) local btn = Instance.new("TextButton") btn.Size = UDim2.new(1,0,0,40) btn.BackgroundColor3 = color btn.Text = text btn.Font = Enum.Font.GothamBold btn.TextSize = 15 btn.TextColor3 = Color3.new(1,1,1) btn.BorderSizePixel = 0 btn.AutoButtonColor = false Instance.new("UICorner", btn).CornerRadius = UDim.new(0,10) btn.MouseEnter:Connect(function() btn.BackgroundTransparency = 0.15 end) btn.MouseLeave:Connect(function() btn.BackgroundTransparency = 0 end) return btn end --// INFO LABEL local Info = Instance.new("TextLabel") Info.Parent = Container Info.Size = UDim2.new(1,0,0,20) Info.BackgroundTransparency = 1 Info.Text = "NengzX DEVS" Info.Font = Enum.Font.Gotham Info.TextSize = 14 Info.TextColor3 = Color3.fromRGB(180,180,180) --// SPEED LABEL local SpeedLabel = Instance.new("TextLabel") SpeedLabel.Parent = Container SpeedLabel.Size = UDim2.new(1,0,0,25) SpeedLabel.BackgroundTransparency = 1 SpeedLabel.Text = "Fly Speed : 1" SpeedLabel.Font = Enum.Font.GothamSemibold SpeedLabel.TextSize = 16 SpeedLabel.TextColor3 = Color3.new(1,1,1) --// BUTTON ROW local Row = Instance.new("Frame") Row.Parent = Container Row.Size = UDim2.new(1,0,0,40) Row.BackgroundTransparency = 1 local RowLayout = Instance.new("UIListLayout") RowLayout.Parent = Row RowLayout.FillDirection = Enum.FillDirection.Horizontal RowLayout.Padding = UDim.new(0,10) --// BUTTONS local FlyBtn = CreateButton("FLY : OFF", Color3.fromRGB(60,120,255)) FlyBtn.Parent = Row FlyBtn.Size = UDim2.new(0.5,-5,1,0) local AddBtn = CreateButton("+ SPEED", Color3.fromRGB(40,200,120)) AddBtn.Parent = Row AddBtn.Size = UDim2.new(0.25,-5,1,0) local MinusBtn = CreateButton("- SPEED", Color3.fromRGB(255,90,90)) MinusBtn.Parent = Row MinusBtn.Size = UDim2.new(0.25,-5,1,0) --// KEYBIND BUTTONS local KeybindBtn = CreateButton( "HIDE/SHOW : "..ToggleKey.Name, Color3.fromRGB(255,170,60) ) KeybindBtn.Parent = Container local FlyKeybindBtn = CreateButton( -- NEW: Fly keybind button "FLY TOGGLE : "..FlyToggleKey.Name, Color3.fromRGB(100,200,255) ) FlyKeybindBtn.Parent = Container --// PLAYER TITLE local PT = Instance.new("TextLabel") PT.Parent = Container PT.Size = UDim2.new(1,0,0,20) PT.BackgroundTransparency = 1 PT.Text = "Universal Fly GUI + Teleport" PT.Font = Enum.Font.GothamSemibold PT.TextSize = 14 PT.TextColor3 = Color3.fromRGB(180,180,180) --// PLAYER LIST local PlayerList = Instance.new("ScrollingFrame") PlayerList.Parent = Container PlayerList.Size = UDim2.new(1,0,0,110) PlayerList.BackgroundColor3 = Color3.fromRGB(24,24,32) PlayerList.BorderSizePixel = 0 PlayerList.ScrollBarThickness = 4 PlayerList.CanvasSize = UDim2.new(0,0,0,0) Instance.new("UICorner", PlayerList).CornerRadius = UDim.new(0,10) local PlayerLayout = Instance.new("UIListLayout") PlayerLayout.Parent = PlayerList PlayerLayout.Padding = UDim.new(0,5) --// REFRESH BUTTON local RefreshBtn = CreateButton( "REFRESH PLAYERS", Color3.fromRGB(130,90,255) ) RefreshBtn.Parent = Container --// VARIABLES local flying = false local speed = 1 local BV local BG --// FLY TOGGLE FUNCTION (NEW) local function ToggleFly() flying = not flying local char = player.Character if not char then return end local hrp = char:FindFirstChild("HumanoidRootPart") if not hrp then return end if flying then FlyBtn.Text = "FLY : ON" BV = Instance.new("BodyVelocity") BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge) BV.Velocity = Vector3.zero BV.Parent = hrp BG = Instance.new("BodyGyro") BG.MaxTorque = Vector3.new(math.huge,math.huge,math.huge) BG.P = 10000 BG.CFrame = workspace.CurrentCamera.CFrame BG.Parent = hrp else FlyBtn.Text = "FLY : OFF" if BV then BV:Destroy() BV = nil end if BG then BG:Destroy() BG = nil end end end --// REFRESH PLAYERS local function RefreshPlayers() for _,v in pairs(PlayerList:GetChildren()) do if v:IsA("TextButton") then v:Destroy() end end local count = 0 for _,plr in pairs(Players:GetPlayers()) do if plr ~= player then count += 1 local btn = Instance.new("TextButton") btn.Parent = PlayerList btn.Size = UDim2.new(1,-6,0,32) btn.BackgroundColor3 = Color3.fromRGB(35,35,45) btn.Text = plr.Name btn.Font = Enum.Font.Gotham btn.TextSize = 14 btn.TextColor3 = Color3.new(1,1,1) btn.BorderSizePixel = 0 Instance.new("UICorner", btn).CornerRadius = UDim.new(0,8) btn.MouseButton1Click:Connect(function() local myChar = player.Character local targetChar = plr.Character if myChar and targetChar then local hrp = myChar:FindFirstChild("HumanoidRootPart") local targetHRP = targetChar:FindFirstChild("HumanoidRootPart") if hrp and targetHRP then hrp.CFrame = targetHRP.CFrame + Vector3.new(2,0,2) end end end) end end PlayerList.CanvasSize = UDim2.new(0,0,0,count * 38) end RefreshPlayers() RefreshBtn.MouseButton1Click:Connect(function() RefreshPlayers() end) --// SPEED SYSTEM AddBtn.MouseButton1Click:Connect(function() speed += 1 SpeedLabel.Text = "Fly Speed : "..speed end) MinusBtn.MouseButton1Click:Connect(function() if speed > 1 then speed -= 1 SpeedLabel.Text = "Fly Speed : "..speed end end) --// FLY TOGGLE (Updated to use ToggleFly function) FlyBtn.MouseButton1Click:Connect(function() ToggleFly() end) --// FLY LOOP RunService.RenderStepped:Connect(function() if flying and BV and BG then local cam = workspace.CurrentCamera local move = Vector3.zero if UIS:IsKeyDown(Enum.KeyCode.W) then move += cam.CFrame.LookVector end if UIS:IsKeyDown(Enum.KeyCode.S) then move -= cam.CFrame.LookVector end if UIS:IsKeyDown(Enum.KeyCode.A) then move -= cam.CFrame.RightVector end if UIS:IsKeyDown(Enum.KeyCode.D) then move += cam.CFrame.RightVector end if UIS:IsKeyDown(Enum.KeyCode.Space) then move += Vector3.new(0,1,0) end if UIS:IsKeyDown(Enum.KeyCode.LeftControl) then move -= Vector3.new(0,1,0) end BV.Velocity = move * (speed * 20) BG.CFrame = cam.CFrame end end) --// MINIMIZE local minimized = false Minimize.MouseButton1Click:Connect(function() minimized = not minimized if minimized then Container.Visible = false Main.Size = UDim2.new(0,430,0,50) else Container.Visible = true Main.Size = UDim2.new(0,430,0,420) -- Updated size end end) --// KEYBIND CHANGE (Updated to include fly keybind) KeybindBtn.MouseButton1Click:Connect(function() WaitingForKey = true KeybindBtn.Text = "PRESS ANY KEY..." end) FlyKeybindBtn.MouseButton1Click:Connect(function() -- NEW: Fly keybind setup WaitingForFlyKey = true FlyKeybindBtn.Text = "PRESS ANY KEY..." end) --// INPUT UIS.InputBegan:Connect(function(input,gpe) if gpe then return end -- SET NEW HIDE/SHOW KEY if WaitingForKey then if input.UserInputType == Enum.UserInputType.Keyboard then ToggleKey = input.KeyCode KeybindBtn.Text = "HIDE/SHOW : "..ToggleKey.Name WaitingForKey = false end return end -- SET NEW FLY TOGGLE KEY (NEW) if WaitingForFlyKey then if input.UserInputType == Enum.UserInputType.Keyboard then FlyToggleKey = input.KeyCode FlyKeybindBtn.Text = "FLY TOGGLE : "..FlyToggleKey.Name WaitingForFlyKey = false end return end -- TOGGLE GUI HIDE/SHOW if input.KeyCode == ToggleKey then Main.Visible = not Main.Visible end -- NEW: FLY TOGGLE WITH KEYBIND if input.KeyCode == FlyToggleKey then ToggleFly() end end)