local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer -- ===== Defaults (all editable in the UI) ===== local DEFAULT_MIN_KPH = 69 local DEFAULT_MAX_KPH = 89 local DEFAULT_FLIP_DEG = 720 -- degrees/sec (720 = 2 full flips per second) local FLOAT_HEIGHT = 25 -- studs above starting height local FLIP_PAUSE = 0.25 -- seconds of level driving between flips local SPEED_CHANGE_EVERY = 2 -- seconds between new random speeds local STUDS_PER_METER = 1 / 0.28 -- Roblox standard: 1 stud = 0.28 m -- ============================================= local function kphToStudsPerSec(kph) return (kph / 3.6) * STUDS_PER_METER end -- ---------- UI ---------- local gui = Instance.new("ScreenGui") gui.Name = "MoneyFarmGui" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 220, 0, 200) frame.Position = UDim2.new(0.5, -110, 0, 20) frame.BackgroundColor3 = Color3.fromRGB(25, 25, 30) frame.BorderSizePixel = 0 frame.Active = true frame.Parent = gui Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 10) local titleBar = Instance.new("TextLabel") titleBar.Size = UDim2.new(1, 0, 0, 32) titleBar.BackgroundColor3 = Color3.fromRGB(45, 45, 55) titleBar.BorderSizePixel = 0 titleBar.Text = "Money Farm (drag me)" titleBar.TextColor3 = Color3.new(1, 1, 1) titleBar.Font = Enum.Font.GothamBold titleBar.TextSize = 14 titleBar.Active = true titleBar.Parent = frame Instance.new("UICorner", titleBar).CornerRadius = UDim.new(0, 10) local function makeRow(labelText, defaultValue, y) local label = Instance.new("TextLabel") label.Size = UDim2.new(0, 110, 0, 28) label.Position = UDim2.new(0, 10, 0, y) label.BackgroundTransparency = 1 label.Text = labelText label.TextColor3 = Color3.new(1, 1, 1) label.Font = Enum.Font.Gotham label.TextSize = 13 label.TextXAlignment = Enum.TextXAlignment.Left label.Parent = frame local box = Instance.new("TextBox") box.Size = UDim2.new(0, 80, 0, 28) box.Position = UDim2.new(1, -90, 0, y) box.BackgroundColor3 = Color3.fromRGB(55, 55, 65) box.TextColor3 = Color3.new(1, 1, 1) box.Font = Enum.Font.Gotham box.TextSize = 14 box.Text = tostring(defaultValue) box.ClearTextOnFocus = false box.Parent = frame Instance.new("UICorner", box).CornerRadius = UDim.new(0, 6) return box end local minBox = makeRow("Min speed (kph)", DEFAULT_MIN_KPH, 42) local maxBox = makeRow("Max speed (kph)", DEFAULT_MAX_KPH, 76) local flipBox = makeRow("Flip speed (deg/s)", DEFAULT_FLIP_DEG, 110) local button = Instance.new("TextButton") button.Size = UDim2.new(1, -20, 0, 40) button.Position = UDim2.new(0, 10, 0, 150) button.BackgroundColor3 = Color3.fromRGB(40, 170, 80) button.TextColor3 = Color3.new(1, 1, 1) button.Font = Enum.Font.GothamBold button.TextSize = 16 button.Text = "Start Money Farm" button.Parent = frame Instance.new("UICorner", button).CornerRadius = UDim.new(0, 8) -- ---------- Dragging (mouse + touch) ---------- do local dragging, dragStart, startPos titleBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = frame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) UserInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - dragStart frame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end) end -- ---------- Farm logic ---------- local running = false local conn local function readNumber(box, fallback, lo, hi) local n = tonumber(box.Text) if not n then n = fallback end n = math.clamp(n, lo, hi) box.Text = tostring(n) return n end local function getVehicleRoot() local char = player.Character local hum = char and char:FindFirstChildOfClass("Humanoid") local seat = hum and hum.SeatPart if seat then return seat.AssemblyRootPart or seat end return nil end local function stop() running = false if conn then conn:Disconnect() conn = nil end button.Text = "Start Money Farm" button.BackgroundColor3 = Color3.fromRGB(40, 170, 80) end local function start() local root = getVehicleRoot() if not root then button.Text = "Sit in a vehicle first!" task.delay(1.5, function() if not running then button.Text = "Start Money Farm" end end) return end -- Read settings at the moment you press start local minKph = readNumber(minBox, DEFAULT_MIN_KPH, 1, 1000) local maxKph = readNumber(maxBox, DEFAULT_MAX_KPH, 1, 1000) if minKph > maxKph then minKph, maxKph = maxKph, minKph minBox.Text, maxBox.Text = tostring(minKph), tostring(maxKph) end local flipSpeed = math.rad(readNumber(flipBox, DEFAULT_FLIP_DEG, 60, 5000)) running = true button.Text = "Stop Money Farm" button.BackgroundColor3 = Color3.fromRGB(190, 50, 50) local look = root.CFrame.LookVector local heading = Vector3.new(look.X, 0, look.Z).Unit local targetY = root.Position.Y + FLOAT_HEIGHT local function randomSpeed() return kphToStudsPerSec(minKph + math.random() * (maxKph - minKph)) end local speed = randomSpeed() local lastChange = os.clock() local flipAngle, pauseLeft = 0, 0 conn = RunService.Heartbeat:Connect(function(dt) local r = getVehicleRoot() if not r then stop() return end if os.clock() - lastChange >= SPEED_CHANGE_EVERY then speed = randomSpeed() lastChange = os.clock() end -- Full 360 backflip around the vehicle's own right axis, then a short pause if pauseLeft > 0 then pauseLeft -= dt else local step = math.min(flipSpeed * dt, 2 * math.pi - flipAngle) r.CFrame = r.CFrame * CFrame.Angles(-step, 0, 0) flipAngle += step if flipAngle >= 2 * math.pi - 1e-4 then flipAngle = 0 pauseLeft = FLIP_PAUSE end end -- Float (strong correction so heavy gravity can't pull you down) + drive forward local yVel = math.clamp((targetY - r.Position.Y) * 12, -150, 150) r.AssemblyLinearVelocity = heading * speed + Vector3.new(0, yVel, 0) end) end button.MouseButton1Click:Connect(function() if running then stop() else start() end end)