local Players = game:GetService("Players") local RunService = game:GetService("RunService") local plr = Players.LocalPlayer local cam = workspace.CurrentCamera local main = Instance.new("ScreenGui", plr.PlayerGui) main.ResetOnSpawn = false -- // The gui local Frame = Instance.new("Frame", main) Frame.Size = UDim2.new(0,190,0,70) Frame.Position = UDim2.new(0.1,0,0.38,0) Frame.BackgroundColor3 = Color3.fromRGB(200,200,200) Frame.Active = true Frame.Draggable = true local title = Instance.new("TextLabel", Frame) title.Size = UDim2.new(1,0,0,20) title.Text = "Vencible Fly Gui" title.BackgroundColor3 = Color3.fromRGB(200,200,200) title.TextScaled = true local up = Instance.new("TextButton", Frame) up.Position = UDim2.new(0,0,0.3,0) up.Size = UDim2.new(0,44,0,25) up.Text = "Up" local down = Instance.new("TextButton", Frame) down.Position = UDim2.new(0,0,0.65,0) down.Size = UDim2.new(0,44,0,25) down.Text = "Down" local onof = Instance.new("TextButton", Frame) onof.Position = UDim2.new(0.7,0,0.65,0) onof.Size = UDim2.new(0,56,0,25) onof.Text = "Fly" local plus = Instance.new("TextButton", Frame) plus.Position = UDim2.new(0.23,0,0.3,0) plus.Size = UDim2.new(0,45,0,25) plus.Text = "+" local speedTxt = Instance.new("TextLabel", Frame) speedTxt.Position = UDim2.new(0.47,0,0.65,0) speedTxt.Size = UDim2.new(0,44,0,25) speedTxt.Text = "50" local mine = Instance.new("TextButton", Frame) mine.Position = UDim2.new(0.23,0,0.65,0) mine.Size = UDim2.new(0,45,0,25) mine.Text = "-" -- // Logic of the fly local char local hum local root local flyTrack local flyIdleTrack local flying = false local speed = 50 local manualY = 0 local bv = Instance.new("BodyVelocity") bv.MaxForce = Vector3.new(1e9,1e9,1e9) local bg = Instance.new("BodyGyro") bg.MaxTorque = Vector3.new(1e9,1e9,1e9) local function setupCharacter(c) char = c hum = char:WaitForChild("Humanoid") root = char:WaitForChild("HumanoidRootPart") local flyAnim = Instance.new("Animation") flyAnim.AnimationId = "rbxassetid://110309410329597" flyTrack = hum:LoadAnimation(flyAnim) local flyIdleAnim = Instance.new("Animation") flyIdleAnim.AnimationId = "rbxassetid://110863385954626" flyIdleTrack = hum:LoadAnimation(flyIdleAnim) if flying then bv.Parent = root bg.Parent = root hum.PlatformStand = true end end setupCharacter(plr.Character or plr.CharacterAdded:Wait()) plr.CharacterAdded:Connect(setupCharacter) onof.MouseButton1Click:Connect(function() flying = not flying if flying then bv.Parent = root bg.Parent = root hum.PlatformStand = true else bv.Parent = nil bg.Parent = nil hum.PlatformStand = false flyTrack:Stop() flyIdleTrack:Stop() end end) plus.MouseButton1Click:Connect(function() speed += 10 speedTxt.Text = tostring(speed) end) mine.MouseButton1Click:Connect(function() speed = math.max(10, speed - 10) speedTxt.Text = tostring(speed) end) up.MouseButton1Down:Connect(function() manualY = 1 end) up.MouseButton1Up:Connect(function() manualY = 0 end) down.MouseButton1Down:Connect(function() manualY = -1 end) down.MouseButton1Up:Connect(function() manualY = 0 end) RunService.RenderStepped:Connect(function() if not flying or not char or not root or not hum then return end local move = hum.MoveDirection local camCF = cam.CFrame local lookY = camCF.LookVector.Y local y = 0 local moving = move.Magnitude > 0 if manualY ~= 0 then y = manualY elseif moving then if lookY > 0.3 then y = lookY elseif lookY < -0.3 then y = lookY end else y = 0 end local vel = Vector3.new(move.X, y, move.Z) if vel.Magnitude > 0 then vel = vel.Unit * speed if not flyTrack.IsPlaying then flyIdleTrack:Stop() flyTrack:Play() end else vel = Vector3.zero if not flyIdleTrack.IsPlaying then flyTrack:Stop() flyIdleTrack:Play() end end bv.Velocity = vel bg.CFrame = camCF end)