-- CookFly V1 by cook45 -- LocalScript → StarterPlayerScripts local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local rootPart = character:WaitForChild("HumanoidRootPart") local flyEnabled = false local flySpeed = 50 local bodyVelocity = nil local bodyGyro = nil local connection = nil local screenGui = Instance.new("ScreenGui") screenGui.Name = "CookFly V1" screenGui.ResetOnSpawn = false screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling screenGui.Parent = player:WaitForChild("PlayerGui") local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0, 220, 0, 145) mainFrame.Position = UDim2.new(0.5, -110, 0.3, 0) mainFrame.BackgroundColor3 = Color3.fromRGB(43, 43, 43) mainFrame.BorderSizePixel = 0 mainFrame.Active = true mainFrame.Draggable = true mainFrame.Parent = screenGui Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0, 5) local titleBar = Instance.new("Frame") titleBar.Size = UDim2.new(1, 0, 0, 30) titleBar.BackgroundColor3 = Color3.fromRGB(20, 20, 46) titleBar.BorderSizePixel = 0 titleBar.Parent = mainFrame Instance.new("UICorner", titleBar).CornerRadius = UDim.new(0, 5) local titleFix = Instance.new("Frame") titleFix.Size = UDim2.new(1, 0, 0, 6) titleFix.Position = UDim2.new(0, 0, 1, -6) titleFix.BackgroundColor3 = Color3.fromRGB(20, 20, 46) titleFix.BorderSizePixel = 0 titleFix.Parent = titleBar local titleLabel = Instance.new("TextLabel") titleLabel.Text = "CookFly V1" titleLabel.Size = UDim2.new(1, -60, 1, 0) titleLabel.Position = UDim2.new(0, 10, 0, 0) titleLabel.BackgroundTransparency = 1 titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) titleLabel.TextSize = 13 titleLabel.Font = Enum.Font.GothamBold titleLabel.TextXAlignment = Enum.TextXAlignment.Center titleLabel.Parent = titleBar local minBtn = Instance.new("TextButton") minBtn.Text = "-" minBtn.Size = UDim2.new(0, 22, 0, 18) minBtn.Position = UDim2.new(1, -48, 0.5, -9) minBtn.BackgroundColor3 = Color3.fromRGB(80, 80, 80) minBtn.TextColor3 = Color3.fromRGB(255, 255, 255) minBtn.TextSize = 14 minBtn.Font = Enum.Font.GothamBold minBtn.BorderSizePixel = 0 minBtn.Parent = titleBar Instance.new("UICorner", minBtn).CornerRadius = UDim.new(0, 3) local closeBtn = Instance.new("TextButton") closeBtn.Text = "X" closeBtn.Size = UDim2.new(0, 22, 0, 18) closeBtn.Position = UDim2.new(1, -23, 0.5, -9) closeBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50) closeBtn.TextColor3 = Color3.fromRGB(255, 255, 255) closeBtn.TextSize = 11 closeBtn.Font = Enum.Font.GothamBold closeBtn.BorderSizePixel = 0 closeBtn.Parent = titleBar Instance.new("UICorner", closeBtn).CornerRadius = UDim.new(0, 3) local toggleBtn = Instance.new("TextButton") toggleBtn.Text = "ENABLE" toggleBtn.Size = UDim2.new(1, -20, 0, 45) toggleBtn.Position = UDim2.new(0, 10, 0, 38) toggleBtn.BackgroundColor3 = Color3.fromRGB(41, 128, 185) toggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255) toggleBtn.TextSize = 16 toggleBtn.Font = Enum.Font.GothamBold toggleBtn.BorderSizePixel = 0 toggleBtn.Parent = mainFrame Instance.new("UICorner", toggleBtn).CornerRadius = UDim.new(0, 5) local speedLabel = Instance.new("TextLabel") speedLabel.Text = "Speed:" speedLabel.Size = UDim2.new(0, 70, 0, 30) speedLabel.Position = UDim2.new(0, 10, 0, 95) speedLabel.BackgroundTransparency = 1 speedLabel.TextColor3 = Color3.fromRGB(200, 200, 200) speedLabel.TextSize = 13 speedLabel.Font = Enum.Font.Gotham speedLabel.TextXAlignment = Enum.TextXAlignment.Left speedLabel.Parent = mainFrame local speedBox = Instance.new("TextBox") speedBox.Text = tostring(flySpeed) speedBox.Size = UDim2.new(0, 110, 0, 28) speedBox.Position = UDim2.new(0, 80, 0, 97) speedBox.BackgroundColor3 = Color3.fromRGB(30, 30, 30) speedBox.TextColor3 = Color3.fromRGB(255, 255, 255) speedBox.TextSize = 14 speedBox.Font = Enum.Font.GothamBold speedBox.BorderSizePixel = 0 speedBox.ClearTextOnFocus = true speedBox.PlaceholderText = "Ketik speed..." speedBox.PlaceholderColor3 = Color3.fromRGB(120, 120, 120) speedBox.Parent = mainFrame Instance.new("UICorner", speedBox).CornerRadius = UDim.new(0, 5) -- ───────────────────────────────────────────── -- FLY LOGIC -- ───────────────────────────────────────────── local function enableFly() flyEnabled = true toggleBtn.Text = "DISABLE" humanoid.PlatformStand = true bodyVelocity = Instance.new("BodyVelocity") bodyVelocity.MaxForce = Vector3.new(1e5, 1e5, 1e5) bodyVelocity.Velocity = Vector3.zero bodyVelocity.Parent = rootPart bodyGyro = Instance.new("BodyGyro") bodyGyro.MaxTorque = Vector3.new(1e5, 1e5, 1e5) bodyGyro.P = 1e4 bodyGyro.D = 100 bodyGyro.Parent = rootPart local camera = workspace.CurrentCamera connection = RunService.Heartbeat:Connect(function() local moveDir = Vector3.zero local camCF = camera.CFrame if UserInputService:IsKeyDown(Enum.KeyCode.W) then moveDir = moveDir + camCF.LookVector end if UserInputService:IsKeyDown(Enum.KeyCode.S) then moveDir = moveDir - camCF.LookVector end if UserInputService:IsKeyDown(Enum.KeyCode.A) then moveDir = moveDir - camCF.RightVector end if UserInputService:IsKeyDown(Enum.KeyCode.D) then moveDir = moveDir + camCF.RightVector end if UserInputService:IsKeyDown(Enum.KeyCode.Space) then moveDir = moveDir + Vector3.new(0,1,0) end if UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) then moveDir = moveDir - Vector3.new(0,1,0) end if moveDir.Magnitude > 0 then moveDir = moveDir.Unit end bodyVelocity.Velocity = moveDir * flySpeed bodyGyro.CFrame = camCF end) end local function disableFly() flyEnabled = false toggleBtn.Text = "ENABLE" humanoid.PlatformStand = false if connection then connection:Disconnect(); connection = nil end if bodyVelocity then bodyVelocity:Destroy(); bodyVelocity = nil end if bodyGyro then bodyGyro:Destroy(); bodyGyro = nil end end player.CharacterAdded:Connect(function(newChar) character = newChar humanoid = newChar:WaitForChild("Humanoid") rootPart = newChar:WaitForChild("HumanoidRootPart") flyEnabled = false; connection = nil; bodyVelocity = nil; bodyGyro = nil toggleBtn.Text = "ENABLE" end) -- ───────────────────────────────────────────── -- SPEED INPUT -- ───────────────────────────────────────────── local function applySpeed() local val = tonumber(speedBox.Text) if val then flySpeed = math.clamp(math.floor(val), 1, 10000) speedBox.Text = tostring(flySpeed) else speedBox.Text = tostring(flySpeed) end end speedBox.FocusLost:Connect(function() applySpeed() end) -- ───────────────────────────────────────────── -- BUTTON EVENTS -- ───────────────────────────────────────────── toggleBtn.MouseButton1Click:Connect(function() if flyEnabled then disableFly() else enableFly() end end) local minimized = false minBtn.MouseButton1Click:Connect(function() minimized = not minimized mainFrame.Size = minimized and UDim2.new(0, 220, 0, 30) or UDim2.new(0, 220, 0, 145) end) closeBtn.MouseButton1Click:Connect(function() disableFly() screenGui:Destroy() end)