local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local Player = Players.LocalPlayer local PROXY_URL = "https://lootlabs-auth.nguyenvantoan-info.workers.dev" local SCRIPT_ID = "attack" local FILE_NAME = "Key_" .. SCRIPT_ID .. ".txt" local requestFunc = (syn and syn.request) or (http and http.request) or http_request or request local writeFunc = writefile or (syn and syn.writefile) local readFunc = readfile or (syn and syn.readfile) local isfileFunc = isfile or (syn and syn.isfile) local function FetchUrl(targetUrl) if requestFunc then local res = requestFunc({ Url = targetUrl, Method = "GET" }) return res.Body else return game:HttpGet(targetUrl) end end local function SaveKey(key) pcall(function() if writeFunc then writeFunc(FILE_NAME, tostring(key)) end if getgenv then getgenv()["SAVED_KEY_" .. SCRIPT_ID] = tostring(key) end end) end local function GetSavedKey() if getgenv and getgenv()["SAVED_KEY_" .. SCRIPT_ID] then return tostring(getgenv()["SAVED_KEY_" .. SCRIPT_ID]):gsub("%s+", "") end local hasFile = false if isfileFunc then pcall(function() hasFile = isfileFunc(FILE_NAME) end) else hasFile = true end if hasFile and readFunc then local success, content = pcall(function() return readFunc(FILE_NAME) end) if success and type(content) == "string" and content ~= "" then return content:gsub("%s+", "") end end return nil end local function TryVerifyAndRun(key) if not key or key == "" then return false end local targetUrl = PROXY_URL .. "/get-script?script=" .. SCRIPT_ID .. "&key=" .. key local success, response = pcall(function() return FetchUrl(targetUrl) end) if success and response and not response:find("^%-%-") then local runScript, err = loadstring(response) if runScript then SaveKey(key) task.spawn(runScript) return true end end return false end -- ⚡ 1. KIỂM TRA AUTO-LOGIN local savedKey = GetSavedKey() if savedKey then if TryVerifyAndRun(savedKey) then return end end -- ⚡ 2. COPY ĐƯỜNG DẪN /start local gatewayUrl = "https://lootlabs-auth.nguyenvantoan-info.workers.dev/start?script=" .. SCRIPT_ID if setclipboard then setclipboard(gatewayUrl) end -- ⚡ 3. GIAO DIỆN NHẬP KEY (GUI) local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "KeySystem_" .. SCRIPT_ID ScreenGui.ResetOnSpawn = false ScreenGui.Parent = (gethui and gethui()) or Player:WaitForChild("PlayerGui") local Frame = Instance.new("Frame") Frame.Size = UDim2.new(0, 320, 0, 190) Frame.Position = UDim2.new(0.5, -160, 0.5, -95) Frame.BackgroundColor3 = Color3.fromRGB(24, 24, 32) Frame.BorderSizePixel = 0 Frame.Active = true Frame.Draggable = true Frame.Parent = ScreenGui Instance.new("UICorner", Frame).CornerRadius = UDim.new(0, 8) -- Nút Close (✕) local CloseBtn = Instance.new("TextButton") CloseBtn.Size = UDim2.new(0, 24, 0, 24) CloseBtn.Position = UDim2.new(1, -30, 0, 6) CloseBtn.BackgroundColor3 = Color3.fromRGB(220, 50, 50) CloseBtn.Text = "✕" CloseBtn.TextColor3 = Color3.fromRGB(255, 255, 255) CloseBtn.Font = Enum.Font.GothamBold CloseBtn.TextSize = 12 CloseBtn.Parent = Frame Instance.new("UICorner", CloseBtn).CornerRadius = UDim.new(0, 6) CloseBtn.MouseButton1Click:Connect(function() ScreenGui:Destroy() end) local Title = Instance.new("TextLabel") Title.Size = UDim2.new(1, -40, 0, 35) Title.Position = UDim2.new(0, 10, 0, 0) Title.BackgroundTransparency = 1 Title.Text = "🔑 Auto Farm (8H Key)" Title.TextColor3 = Color3.fromRGB(255, 255, 255) Title.Font = Enum.Font.GothamBold Title.TextSize = 14 Title.TextXAlignment = Enum.TextXAlignment.Center Title.Parent = Frame local Note = Instance.new("TextLabel") Note.Size = UDim2.new(1, -20, 0, 25) Note.Position = UDim2.new(0, 10, 0, 35) Note.BackgroundTransparency = 1 Note.Text = "(Key link automatically copied to clipboard)" Note.TextColor3 = Color3.fromRGB(160, 160, 180) Note.Font = Enum.Font.Gotham Note.TextSize = 11 Note.Parent = Frame local TextBox = Instance.new("TextBox") TextBox.Size = UDim2.new(1, -20, 0, 36) TextBox.Position = UDim2.new(0, 10, 0, 68) TextBox.BackgroundColor3 = Color3.fromRGB(36, 36, 48) TextBox.PlaceholderText = "Paste Key here..." TextBox.Text = "" TextBox.TextColor3 = Color3.fromRGB(255, 255, 255) TextBox.Font = Enum.Font.Gotham TextBox.TextSize = 13 TextBox.Parent = Frame Instance.new("UICorner", TextBox).CornerRadius = UDim.new(0, 6) local SubmitBtn = Instance.new("TextButton") SubmitBtn.Size = UDim2.new(0.5, -15, 0, 34) SubmitBtn.Position = UDim2.new(0, 10, 0, 115) SubmitBtn.BackgroundColor3 = Color3.fromRGB(40, 140, 70) SubmitBtn.Text = "Submit" SubmitBtn.TextColor3 = Color3.fromRGB(255, 255, 255) SubmitBtn.Font = Enum.Font.GothamBold SubmitBtn.TextSize = 13 SubmitBtn.Parent = Frame Instance.new("UICorner", SubmitBtn).CornerRadius = UDim.new(0, 6) local CopyLinkBtn = Instance.new("TextButton") CopyLinkBtn.Size = UDim2.new(0.5, -15, 0, 34) CopyLinkBtn.Position = UDim2.new(0.5, 5, 0, 115) CopyLinkBtn.BackgroundColor3 = Color3.fromRGB(60, 110, 220) CopyLinkBtn.Text = "Copy Link" CopyLinkBtn.TextColor3 = Color3.fromRGB(255, 255, 255) CopyLinkBtn.Font = Enum.Font.GothamBold CopyLinkBtn.TextSize = 13 CopyLinkBtn.Parent = Frame Instance.new("UICorner", CopyLinkBtn).CornerRadius = UDim.new(0, 6) local Status = Instance.new("TextLabel") Status.Size = UDim2.new(1, -20, 0, 25) Status.Position = UDim2.new(0, 10, 0, 155) Status.BackgroundTransparency = 1 Status.Text = "" Status.TextColor3 = Color3.fromRGB(255, 100, 100) Status.Font = Enum.Font.Gotham Status.TextSize = 12 Status.Parent = Frame CopyLinkBtn.MouseButton1Click:Connect(function() if setclipboard then setclipboard(gatewayUrl) Status.TextColor3 = Color3.fromRGB(100, 255, 100) Status.Text = "Link copied to clipboard!" end end) SubmitBtn.MouseButton1Click:Connect(function() local userKey = TextBox.Text:gsub("%s+", "") if userKey == "" then Status.TextColor3 = Color3.fromRGB(255, 100, 100) Status.Text = "Please enter your key!" return end Status.TextColor3 = Color3.fromRGB(200, 200, 200) Status.Text = "Verifying key..." if TryVerifyAndRun(userKey) then Status.TextColor3 = Color3.fromRGB(100, 255, 100) Status.Text = "Success! Loading menu..." task.wait(0.2) ScreenGui:Destroy() else Status.TextColor3 = Color3.fromRGB(255, 100, 100) Status.Text = "Invalid key for " .. "Auto Farm" .. "!" end end)