
Keyless
![Auto farm cars and remove police [MegaOP] ADDED AUTO COLLECT](https://cdn.kocakz.me/images/614dd5a625554b3d82bab3f86eeb6ba49b42609b3f71f2ab0b312b09d19de43b.webp)
--[[
UNIVERSAL BASE FARMER + AUTO-COLLECTOR
Credits to Veemix
]]
-- [[ GUI SETUP ]] --
local ScreenGui = Instance.new("ScreenGui", game.CoreGui)
local MainFrame = Instance.new("Frame", ScreenGui)
MainFrame.Size = UDim2.new(0, 180, 0, 270) -- Increased height for credits
MainFrame.Position = UDim2.new(0.05, 0, 0.4, 0)
MainFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
MainFrame.BorderSizePixel = 0
MainFrame.Active = true
MainFrame.Draggable = true
Instance.new("UICorner", MainFrame).CornerRadius = UDim.new(0, 10)
-- Credits Label
local CreditsLabel = Instance.new("TextLabel", MainFrame)
CreditsLabel.Size = UDim2.new(1, 0, 0, 20)
CreditsLabel.Position = UDim2.new(0, 0, 0, 5)
CreditsLabel.Text = "Credits to veemix373"
CreditsLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
CreditsLabel.BackgroundTransparency = 1
CreditsLabel.Font = Enum.Font.GothamBold
CreditsLabel.TextSize = 10
-- Status Label
local StatusLabel = Instance.new("TextLabel", MainFrame)
StatusLabel.Size = UDim2.new(1, 0, 0, 20)
StatusLabel.Position = UDim2.new(0, 0, 0, 25)
StatusLabel.Text = "Status: Idle"
StatusLabel.TextColor3 = Color3.new(1, 1, 1)
StatusLabel.BackgroundTransparency = 1
StatusLabel.Font = Enum.Font.GothamBold
StatusLabel.TextSize = 9
local BaseInput = Instance.new("TextBox", MainFrame)
BaseInput.Size = UDim2.new(0.85, 0, 0, 30)
BaseInput.Position = UDim2.new(0.075, 0, 0, 50)
BaseInput.PlaceholderText = "Base Number"
BaseInput.Text = "1"
BaseInput.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
BaseInput.TextColor3 = Color3.new(1, 1, 1)
BaseInput.Font = Enum.Font.GothamBold
BaseInput.TextSize = 10
Instance.new("UICorner", BaseInput)
local function CreateButton(text, pos, color)
local btn = Instance.new("TextButton", MainFrame)
btn.Size = UDim2.new(0.85, 0, 0, 30)
btn.Position = UDim2.new(0.075, 0, 0, pos)
btn.Text = text
btn.BackgroundColor3 = color
btn.TextColor3 = Color3.new(1, 1, 1)
btn.Font = Enum.Font.GothamBold
btn.TextSize = 10
Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6)
return btn
end
local SlotBtn = CreateButton("AUTO-COLLECT: OFF", 85, Color3.fromRGB(30, 30, 30))
local DetectBtn = CreateButton("AUTO-DETECT BASE", 120, Color3.fromRGB(60, 60, 150))
local LoopBtn = CreateButton("LOOP FARM: OFF", 155, Color3.fromRGB(30, 30, 30))
local PoliceBtn = CreateButton("REMOVE POLICECARS", 190, Color3.fromRGB(150, 50, 50))
local UnloadBtn = CreateButton("UNLOAD SCRIPT", 225, Color3.fromRGB(80, 20, 20))
-- [[ LOGIC VARIABLES ]] --
local PLAYER = game.Players.LocalPlayer
local isLooping = false
local autoCollect = false
local detectionActive = false
-- [[ AUTO-DETECTION LOGIC ]] --
local function startDetecting(char)
local hrp = char:WaitForChild("HumanoidRootPart")
hrp.Touched:Connect(function(hit)
if detectionActive and hit:IsDescendantOf(workspace.Bases) then
local obj = hit
while obj and obj.Parent ~= workspace.Bases do
obj = obj.Parent
end
if obj and string.match(obj.Name, "Base%d+") then
local num = string.match(obj.Name, "%d+")
BaseInput.Text = num
StatusLabel.Text = "Status: Locked to " .. obj.Name
detectionActive = false
DetectBtn.Text = "AUTO-DETECT BASE"
DetectBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 150)
end
end
end)
end
if PLAYER.Character then startDetecting(PLAYER.Character) end
PLAYER.CharacterAdded:Connect(startDetecting)
-- [[ AUTO-COLLECTOR LOOP ]] --
task.spawn(function()
while true do
task.wait(2)
if autoCollect then
local targetBase = workspace.Bases:FindFirstChild("Base" .. BaseInput.Text)
if targetBase and targetBase:FindFirstChild("Slots") then
for _, slot in pairs(targetBase.Slots:GetChildren()) do
local collectPart = slot:FindFirstChild("Collect", true)
if collectPart and PLAYER.Character and PLAYER.Character:FindFirstChild("HumanoidRootPart") then
firetouchinterest(PLAYER.Character.HumanoidRootPart, collectPart, 0)
task.wait(0.05)
firetouchinterest(PLAYER.Character.HumanoidRootPart, collectPart, 1)
end
end
end
end
end
end)
-- [[ LOOP FARM LOGIC ]] --
local function runInfiniteFarm()
while isLooping do
local carsFolder = workspace:FindFirstChild("ActiveCars")
local floor = workspace:FindFirstChild("Bases") and workspace.Bases:FindFirstChild("Base4") and workspace.Bases.Base4.Floors.Floor1.Floors.BrainrotFloor
if carsFolder and floor then
for _, npc in pairs(carsFolder:GetChildren()) do
if not isLooping then break end
local prompt = npc:FindFirstChildWhichIsA("ProximityPrompt", true)
if prompt then
local char = PLAYER.Character
local hrp = char and char:FindFirstChild("HumanoidRootPart")
local backpack = PLAYER:FindFirstChild("Backpack")
if hrp and backpack then
hrp.CFrame = npc:GetPivot()
task.wait(0.1)
for _, tool in pairs(char:GetChildren()) do
if tool:IsA("Tool") then tool.Parent = backpack end
end
task.wait(0.05)
prompt:InputHoldBegin()
task.wait(prompt.HoldDuration + 0.1)
prompt:InputHoldEnd()
hrp.CFrame = floor.CFrame
task.wait(0.2)
end
end
end
end
task.wait(0.5)
end
end
-- [[ BUTTON INTERACTIONS ]] --
SlotBtn.MouseButton1Click:Connect(function()
autoCollect = not autoCollect
SlotBtn.Text = autoCollect and "AUTO-COLLECT: ON" or "AUTO-COLLECT: OFF"
SlotBtn.BackgroundColor3 = autoCollect and Color3.fromRGB(0, 120, 0) or Color3.fromRGB(30, 30, 30)
end)
DetectBtn.MouseButton1Click:Connect(function()
detectionActive = not detectionActive
if detectionActive then
StatusLabel.Text = "Status: Walk into your base!"
DetectBtn.Text = "STOP DETECTING"
DetectBtn.BackgroundColor3 = Color3.fromRGB(200, 100, 0)
else
StatusLabel.Text = "Status: Detection Off"
DetectBtn.Text = "AUTO-DETECT BASE"
DetectBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 150)
end
end)
LoopBtn.MouseButton1Click:Connect(function()
isLooping = not isLooping
LoopBtn.Text = isLooping and "LOOP FARM: ON" or "LOOP FARM: OFF"
LoopBtn.BackgroundColor3 = isLooping and Color3.fromRGB(0, 120, 0) or Color3.fromRGB(30, 30, 30)
if isLooping then task.spawn(runInfiniteFarm) end
end)
PoliceBtn.MouseButton1Click:Connect(function()
local policeFolder = workspace:FindFirstChild("PoliceCars")
if policeFolder then
for _, obj in ipairs(policeFolder:GetChildren()) do obj:Destroy() end
StatusLabel.Text = "Status: Police Removed"
task.wait(1)
StatusLabel.Text = "Status: Idle"
end
end)
UnloadBtn.MouseButton1Click:Connect(function()
ScreenGui:Destroy()
isLooping = false
autoCollect = false
detectionActive = false
end)
Dupe cars plss ππ