--[[ AutoFarm Helper GUI + Panda Auth Key System Features: - Panda Auth key validation (PUSL-V4) - Copy Job ID - Copy Game ID - Copy Game URL - Create Server - Join Smallest Server ]] --================================================================== -- PANDA AUTH (must be at the very top) --================================================================== local PUSL = loadstring(game:HttpGet("https://secure.pandauth.com/pv4/lib"))() if not PUSL or type(PUSL.configure) ~= "function" then return warn("[Panda] Library failed to initialize.") end PUSL.configure({ serviceId = "4mg", }) -- Ask the user for their key via a simple prompt (or use a hardcoded one) local key = "" pcall(function() key = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui") and "" or "" end) -- If you want a built-in prompt for the key, we build a small input UI. -- Otherwise replace the line below with your key directly: -- local key = "PASTE_YOUR_KEY_HERE" --================================================================== -- SERVICES --================================================================== local Players = game:GetService("Players") local TeleportService = game:GetService("TeleportService") local HttpService = game:GetService("HttpService") local StarterGui = game:GetService("StarterGui") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local player = Players.LocalPlayer local placeId = game.PlaceId local jobId = game.JobId --================================================================== -- HELPERS --================================================================== local function copyToClipboard(text) if setclipboard then setclipboard(text) return true end if toclipboard then toclipboard(text) return true end if syn and syn.write_clipboard then syn.write_clipboard(text) return true end return false end local function notify(message, title) pcall(function() StarterGui:SetCore("SendNotification", { Title = title or "AutoFarm Helper", Text = message, Duration = 3 }) end) print("[AutoFarm Helper] " .. message) end --================================================================== -- KEY UI (shown before the main GUI) --================================================================== local function showKeyUI() local sg = Instance.new("ScreenGui") sg.Name = "PandaKeyUI" sg.ResetOnSpawn = false sg.IgnoreGuiInset = true sg.Parent = player:WaitForChild("PlayerGui") local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 360, 0, 220) frame.Position = UDim2.new(0.5, -180, 0.5, -110) frame.BackgroundColor3 = Color3.fromRGB(25, 25, 35) frame.BorderSizePixel = 0 frame.Active = true frame.Draggable = true frame.Parent = sg local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 10) corner.Parent = frame local stroke = Instance.new("UIStroke") stroke.Color = Color3.fromRGB(90, 90, 120) stroke.Thickness = 1.5 stroke.Parent = frame local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 45) title.BackgroundTransparency = 1 title.Text = "Panda Auth — Key Required" title.TextColor3 = Color3.fromRGB(255, 255, 255) title.Font = Enum.Font.GothamBold title.TextSize = 18 title.Parent = frame local box = Instance.new("TextBox") box.Size = UDim2.new(0.85, 0, 0, 42) box.Position = UDim2.new(0.075, 0, 0.28, 0) box.BackgroundColor3 = Color3.fromRGB(40, 40, 55) box.BorderSizePixel = 0 box.Text = "" box.PlaceholderText = "Enter your key..." box.TextColor3 = Color3.fromRGB(255, 255, 255) box.PlaceholderColor3 = Color3.fromRGB(150, 150, 170) box.Font = Enum.Font.Gotham box.TextSize = 15 box.ClearTextOnFocus = false box.Parent = frame local boxCorner = Instance.new("UICorner") boxCorner.CornerRadius = UDim.new(0, 8) boxCorner.Parent = box local submit = Instance.new("TextButton") submit.Size = UDim2.new(0.85, 0, 0, 42) submit.Position = UDim2.new(0.075, 0, 0.52, 0) submit.BackgroundColor3 = Color3.fromRGB(80, 120, 220) submit.BorderSizePixel = 0 submit.Text = "Validate Key" submit.TextColor3 = Color3.fromRGB(255, 255, 255) submit.Font = Enum.Font.GothamBold submit.TextSize = 15 submit.Parent = frame local submitCorner = Instance.new("UICorner") submitCorner.CornerRadius = UDim.new(0, 8) submitCorner.Parent = submit local getKey = Instance.new("TextButton") getKey.Size = UDim2.new(0.85, 0, 0, 30) getKey.Position = UDim2.new(0.075, 0, 0.77, 0) getKey.BackgroundTransparency = 1 getKey.Text = "Get a key" getKey.TextColor3 = Color3.fromRGB(120, 170, 255) getKey.Font = Enum.Font.Gotham getKey.TextSize = 14 getKey.Parent = frame local status = Instance.new("TextLabel") status.Size = UDim2.new(1, 0, 0, 20) status.Position = UDim2.new(0, 0, 1, -25) status.BackgroundTransparency = 1 status.Text = "" status.TextColor3 = Color3.fromRGB(255, 100, 100) status.Font = Enum.Font.Gotham status.TextSize = 13 status.Parent = frame local validated = false getKey.MouseButton1Click:Connect(function() local url = PUSL.getKeyUrl() pcall(function() setclipboard(url) end) status.TextColor3 = Color3.fromRGB(120, 200, 255) status.Text = "Key URL copied to clipboard." end) submit.MouseButton1Click:Connect(function() local entered = box.Text if entered == "" then status.TextColor3 = Color3.fromRGB(255, 100, 100) status.Text = "Please enter a key." return end status.TextColor3 = Color3.fromRGB(200, 200, 200) status.Text = "Validating..." local ok, result = pcall(function() return PUSL.validate(entered) end) if not ok or not result or not result.success then status.TextColor3 = Color3.fromRGB(255, 100, 100) status.Text = "Invalid key. Try again." return end validated = true status.TextColor3 = Color3.fromRGB(120, 255, 140) status.Text = "Authenticated! Loading..." task.wait(0.5) sg:Destroy() _G.__AUTOFARM_AUTHED = true if _G.__onAutoFarmAuth then _G.__onAutoFarmAuth(result) end end) -- Block the rest of the script until validated while not validated do task.wait(0.1) end return true end -- Wait for the user to authenticate before continuing showKeyUI() --================================================================== -- MAIN GUI --================================================================== local screenGui = Instance.new("ScreenGui") screenGui.Name = "AutoFarmHelper" screenGui.ResetOnSpawn = false screenGui.Parent = player:WaitForChild("PlayerGui") local mainFrame = Instance.new("Frame") mainFrame.Name = "MainFrame" mainFrame.Size = UDim2.new(0, 300, 0, 420) mainFrame.Position = UDim2.new(0.5, -150, 0.5, -210) mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 40) mainFrame.BorderSizePixel = 0 mainFrame.Active = true mainFrame.Draggable = true mainFrame.Parent = screenGui local mainCorner = Instance.new("UICorner") mainCorner.CornerRadius = UDim.new(0, 10) mainCorner.Parent = mainFrame local title = Instance.new("TextLabel") title.Name = "Title" title.Size = UDim2.new(1, 0, 0, 40) title.BackgroundColor3 = Color3.fromRGB(45, 45, 60) title.BorderSizePixel = 0 title.Text = "AutoFarm Helper" title.TextColor3 = Color3.fromRGB(255, 255, 255) title.TextScaled = true title.Font = Enum.Font.GothamBold title.Parent = mainFrame local titleCorner = Instance.new("UICorner") titleCorner.CornerRadius = UDim.new(0, 10) titleCorner.Parent = title local function createButton(name, text, yPos, color) local btn = Instance.new("TextButton") btn.Name = name btn.Size = UDim2.new(0.9, 0, 0, 40) btn.Position = UDim2.new(0.05, 0, yPos, 0) btn.BackgroundColor3 = color btn.BorderSizePixel = 0 btn.Text = text btn.TextColor3 = Color3.fromRGB(255, 255, 255) btn.TextScaled = true btn.Font = Enum.Font.Gotham btn.Parent = mainFrame local c = Instance.new("UICorner") c.CornerRadius = UDim.new(0, 8) c.Parent = btn return btn end local copyJobIdBtn = createButton("CopyJobId", "Copy Job ID", 0.15, Color3.fromRGB(60, 60, 80)) local copyGameIdBtn = createButton("CopyGameId", "Copy Game ID", 0.28, Color3.fromRGB(60, 60, 80)) local copyGameUrlBtn = createButton("CopyGameUrl", "Copy Game URL", 0.41, Color3.fromRGB(60, 60, 80)) local createServerBtn = createButton("CreateServer", "Create Server", 0.54, Color3.fromRGB(80, 120, 80)) local joinSmallestBtn = createButton("JoinSmallest", "Join Smallest Server", 0.67, Color3.fromRGB(120, 80, 80)) copyJobIdBtn.MouseButton1Click:Connect(function() if copyToClipboard(jobId) then notify("Job ID copied: " .. jobId) else notify("Clipboard not supported.") end end) copyGameIdBtn.MouseButton1Click:Connect(function() if copyToClipboard(tostring(placeId)) then notify("Game ID copied: " .. placeId) else notify("Clipboard not supported.") end end) copyGameUrlBtn.MouseButton1Click:Connect(function() local url = "https://www.roblox.com/games/" .. placeId if copyToClipboard(url) then notify("Game URL copied: " .. url) else notify("Clipboard not supported.") end end) createServerBtn.MouseButton1Click:Connect(function() local success, err = pcall(function() local _, privateServerId = TeleportService:ReserveServer(placeId) local opts = Instance.new("TeleportOptions") opts.ServerInstanceId = privateServerId TeleportService:TeleportAsync(placeId, {player}, opts) end) if success then notify("Creating new server...") else notify("Failed to create server: " .. tostring(err)) end end) joinSmallestBtn.MouseButton1Click:Connect(function() local url = "https://games.roblox.com/v1/games/" .. placeId .. "/servers/Public?sortOrder=Asc&limit=100" local ok, response = pcall(function() return HttpService:GetAsync(url) end) if not ok then notify("Failed to fetch server list.") return end local data = HttpService:JSONDecode(response) if not data or not data.data then notify("No servers found.") return end local smallest, minPlayers = nil, math.huge for _, server in ipairs(data.data) do if server.playing < minPlayers then minPlayers = server.playing smallest = server end end if smallest then local okTp, err = pcall(function() TeleportService:TeleportToPlaceInstance(placeId, smallest.id, player) end) if okTp then notify("Joining smallest server (" .. minPlayers .. " players)") else notify("Teleport failed: " .. tostring(err)) end else notify("No suitable server found.") end end) notify("AutoFarm Helper loaded. Authenticated ✔")