local CONFIG = {
AutoFarm = false,
TeleportMode = false,
AutoSell = false,
SellOnlyWhenFull = false,
AutoUpgradeAll = false,
BatchSize = 100,
}
local Players = game:GetService("Players")
local Storage = game:GetService("ReplicatedStorage")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer
local balls = workspace:WaitForChild("ActiveGolfBalls")
local remotes = Storage:WaitForChild("RemotesNew")
local networker
pcall(function()
local modules = Storage:WaitForChild("Modules", 5)
local packageRoot = modules and modules:WaitForChild("rwque", 5)
local packages = packageRoot and packageRoot:WaitForChild("Packages", 5)
local module = packages and packages:WaitForChild("Networker", 5)
if module then
networker = require(module).new()
end
end)
local function fireServer(name, ...)
if networker then
networker:FireServer(name, ...)
else
remotes:WaitForChild(name):FireServer(...)
end
end
local function safeFire(name, ...)
local arguments = table.pack(...)
return pcall(function()
fireServer(name, table.unpack(arguments, 1, arguments.n))
end)
end
local function numericAttribute(name, fallback)
local value = player:GetAttribute(name)
return type(value) == "number" and value or fallback
end
local function bagIsFull()
local count = player:GetAttribute("BagCount")
local capacity = player:GetAttribute("BagCapacity")
return type(count) == "number"
and type(capacity) == "number"
and count >= capacity
end
local function collectBatch(origin)
local radius = numericAttribute("CollectionRange", 60)
local batch = {}
for _, ball in ipairs(balls:GetChildren()) do
if ball:IsA("BasePart") and (ball.Position - origin).Magnitude = CONFIG.BatchSize then
break
end
end
end
return batch
end
local targetList = {}
local targetIndex = 0
local function refreshTargets()
targetList = balls:GetChildren()
targetIndex = 0
end
local function nextTarget()
for _ = 1, 2 do
while targetIndex < #targetList do
targetIndex += 1
local target = targetList[targetIndex]
if target.Parent == balls and target:IsA("BasePart") then
return target
end
end
refreshTargets()
end
return nil
end
local selling = false
local lastSellAt = -math.huge
local sellStatus = "Ready"
local function sellBag(waitForBagChange)
if selling or os.clock() - lastSellAt < 0.25 then
return false
end
selling = true
sellStatus = "Selling"
local startingCount = numericAttribute("BagCount", -1)
local sold = false
for _ = 1, 3 do
local fired = safeFire("Fill")
if fired and (not waitForBagChange or startingCount < 0) then
sold = true
break
end
if fired then
local deadline = os.clock() + 0.8
repeat
task.wait(0.08)
local currentCount = numericAttribute("BagCount", startingCount)
if currentCount = deadline
end
if sold then
break
end
task.wait(0.15)
end
lastSellAt = os.clock()
sellStatus = sold and "Sold" or "Sell retry"
selling = false
return sold
end
local playerGui = player:WaitForChild("PlayerGui")
local previousGui = playerGui:FindFirstChild("GolfYardKeyless")
if previousGui then
previousGui:Destroy()
end
local gui = Instance.new("ScreenGui")
gui.Name = "GolfYardKeyless"
gui.ResetOnSpawn = false
gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
gui.Parent = playerGui
local window = Instance.new("Frame")
window.Name = "Window"
window.Size = UDim2.fromOffset(300, 370)
window.Position = UDim2.new(0, 24, 0.5, -185)
window.BackgroundColor3 = Color3.fromRGB(24, 28, 38)
window.BorderSizePixel = 0
window.Active = true
window.Draggable = true
window.Parent = gui
local windowCorner = Instance.new("UICorner")
windowCorner.CornerRadius = UDim.new(0, 10)
windowCorner.Parent = window
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, -48, 0, 42)
title.Position = UDim2.fromOffset(14, 0)
title.BackgroundTransparency = 1
title.Text = "Golf Yard"
title.TextColor3 = Color3.fromRGB(240, 243, 250)
title.TextSize = 17
title.Font = Enum.Font.GothamBold
title.TextXAlignment = Enum.TextXAlignment.Left
title.Parent = window
local close = Instance.new("TextButton")
close.Size = UDim2.fromOffset(32, 32)
close.Position = UDim2.new(1, -38, 0, 5)
close.BackgroundColor3 = Color3.fromRGB(170, 58, 68)
close.BorderSizePixel = 0
close.Text = "×"
close.TextColor3 = Color3.new(1, 1, 1)
close.TextSize = 22
close.Font = Enum.Font.GothamBold
close.Parent = window
local closeCorner = Instance.new("UICorner")
closeCorner.CornerRadius = UDim.new(0, 8)
closeCorner.Parent = close
local content = Instance.new("Frame")
content.Size = UDim2.new(1, -20, 1, -52)
content.Position = UDim2.fromOffset(10, 44)
content.BackgroundTransparency = 1
content.Parent = window
local layout = Instance.new("UIListLayout")
layout.Padding = UDim.new(0, 6)
layout.SortOrder = Enum.SortOrder.LayoutOrder
layout.Parent = content
local function round(object)
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 7)
corner.Parent = object
end
local function toggleButton(label, configKey)
local button = Instance.new("TextButton")
button.Size = UDim2.new(1, 0, 0, 34)
button.BorderSizePixel = 0
button.TextColor3 = Color3.fromRGB(245, 247, 252)
button.TextSize = 14
button.Font = Enum.Font.GothamMedium
button.Parent = content
round(button)
local function refresh()
local enabled = CONFIG[configKey]
button.Text = label .. ": " .. (enabled and "ON" or "OFF")
button.BackgroundColor3 = enabled
and Color3.fromRGB(48, 142, 96)
or Color3.fromRGB(55, 61, 78)
end
button.MouseButton1Click:Connect(function()
CONFIG[configKey] = not CONFIG[configKey]
refresh()
end)
refresh()
return button
end
toggleButton("Auto Farm", "AutoFarm")
toggleButton("Teleport Mode", "TeleportMode")
toggleButton("Auto Sell", "AutoSell")
toggleButton("Sell Only When Full", "SellOnlyWhenFull")
toggleButton("Auto Upgrade All", "AutoUpgradeAll")
local batchRow = Instance.new("Frame")
batchRow.Size = UDim2.new(1, 0, 0, 34)
batchRow.BackgroundColor3 = Color3.fromRGB(55, 61, 78)
batchRow.BorderSizePixel = 0
batchRow.Parent = content
round(batchRow)
local batchLabel = Instance.new("TextLabel")
batchLabel.Size = UDim2.fromOffset(88, 34)
batchLabel.Position = UDim2.fromOffset(10, 0)
batchLabel.BackgroundTransparency = 1
batchLabel.Text = "Batch Size"
batchLabel.TextColor3 = Color3.fromRGB(245, 247, 252)
batchLabel.TextSize = 14
batchLabel.Font = Enum.Font.GothamMedium
batchLabel.TextXAlignment = Enum.TextXAlignment.Left
batchLabel.Parent = batchRow
local batchInput = Instance.new("TextBox")
batchInput.Size = UDim2.new(1, -192, 0, 26)
batchInput.Position = UDim2.fromOffset(100, 4)
batchInput.BackgroundColor3 = Color3.fromRGB(37, 42, 55)
batchInput.BorderSizePixel = 0
batchInput.ClearTextOnFocus = false
batchInput.Text = tostring(CONFIG.BatchSize)
batchInput.PlaceholderText = "1-10000"
batchInput.TextColor3 = Color3.fromRGB(245, 247, 252)
batchInput.TextSize = 14
batchInput.Font = Enum.Font.GothamMedium
batchInput.Parent = batchRow
round(batchInput)
local function applyBatchInput()
local value = tonumber(batchInput.Text)
CONFIG.BatchSize = math.clamp(math.floor(value or CONFIG.BatchSize), 1, 1000)
batchInput.Text = tostring(CONFIG.BatchSize)
end
batchInput.FocusLost:Connect(applyBatchInput)
local function batchButton(text, xOffset, change)
local button = Instance.new("TextButton")
button.Size = UDim2.fromOffset(32, 26)
button.Position = UDim2.new(1, xOffset, 0, 4)
button.BackgroundColor3 = Color3.fromRGB(77, 86, 109)
button.BorderSizePixel = 0
button.Text = text
button.TextColor3 = Color3.new(1, 1, 1)
button.TextSize = 18
button.Font = Enum.Font.GothamBold
button.Parent = batchRow
round(button)
button.MouseButton1Click:Connect(function()
CONFIG.BatchSize = math.clamp(CONFIG.BatchSize + change, 1, 1000)
batchInput.Text = tostring(CONFIG.BatchSize)
end)
end
batchButton("−", -72, -5)
batchButton("+", -36, 5)
batchInput.Text = tostring(CONFIG.BatchSize)
local cartButton = Instance.new("TextButton")
cartButton.Size = UDim2.new(1, 0, 0, 34)
cartButton.BackgroundColor3 = Color3.fromRGB(62, 91, 151)
cartButton.BorderSizePixel = 0
cartButton.Text = "Toggle Golf Kart"
cartButton.TextColor3 = Color3.fromRGB(245, 247, 252)
cartButton.TextSize = 14
cartButton.Font = Enum.Font.GothamMedium
cartButton.Parent = content
round(cartButton)
cartButton.MouseButton1Click:Connect(function()
safeFire("ToggleGolfKart")
end)
local status = Instance.new("TextLabel")
status.Size = UDim2.new(1, 0, 0, 28)
status.BackgroundTransparency = 1
status.TextColor3 = Color3.fromRGB(177, 187, 210)
status.TextSize = 12
status.Font = Enum.Font.Gotham
status.TextXAlignment = Enum.TextXAlignment.Left
status.Parent = content
local running = true
local toggleConnection
toggleConnection = UserInputService.InputBegan:Connect(function(input, processed)
if not processed and not UserInputService:GetFocusedTextBox()
and input.KeyCode == Enum.KeyCode.RightShift then
gui.Enabled = not gui.Enabled
end
end)
close.MouseButton1Click:Connect(function()
running = false
if toggleConnection then
toggleConnection:Disconnect()
end
gui:Destroy()
end)
task.spawn(function()
while running do
status.Text = string.format(
"Bag: %s/%s Range: %s %s",
tostring(player:GetAttribute("BagCount") or "?"),
tostring(player:GetAttribute("BagCapacity") or "?"),
tostring(player:GetAttribute("CollectionRange") or 60),
sellStatus
)
task.wait(0.25)
end
end)
task.spawn(function()
while running do
if CONFIG.AutoUpgradeAll then
safeFire("BuyAllShop")
end
task.wait(0.5)
end
end)
task.spawn(function()
while running do
if not CONFIG.AutoFarm then
task.wait(0.2)
continue
end
local cooldown = math.max(0.05, numericAttribute("CollectCooldown", 0.1))
if CONFIG.AutoSell and bagIsFull() then
sellBag(true)
task.wait(cooldown)
continue
end
local character = player.Character
local root = character and character:FindFirstChild("HumanoidRootPart")
local readyToCollect = root ~= nil
if root and CONFIG.TeleportMode then
local target = nextTarget()
readyToCollect = target ~= nil
if target then
local moved = pcall(function()
root.AssemblyLinearVelocity = Vector3.zero
root.AssemblyAngularVelocity = Vector3.zero
root.CFrame = CFrame.new(target.Position + Vector3.new(0, 3, 0))
end)
readyToCollect = moved
if moved then
task.wait(0.05)
end
end
end
if root and readyToCollect then
local batch = collectBatch(root.Position)
if #batch > 0 then
safeFire("Collect2", batch)
if CONFIG.AutoSell and not CONFIG.SellOnlyWhenFull then
sellBag(false)
end
end
end
task.wait(cooldown)
end
end)