Get Packages
Key Required

Get Packages

[📩] Package RNG 📦xGhostyxtxGhostyxt 4.8K views 41 executesUpdated Jul 30, 2025
5.0/ 5(3 votes)
30100% Positive
Lua Script•223 lines (7176 chars)
--[[
    Envelope Auto-Farm GUI
    Features:
    - Toggle auto-farming
    - Adjustable speed (default 0.5s)
    - Draggable window
    - Credits with clickable link
]]

local replicated_storage = game:GetService("ReplicatedStorage")
local UserInputService = game:GetService("UserInputService")
local TextService = game:GetService("TextService")

-- Initial settings
getgenv().farmSettings = {
    enabled = false,
    speed = 0.5,  -- Default speed (0.5 seconds)
    position = UDim2.new(0.5, -150, 0.5, -85)  -- Initial position (adjusted for credits)
}

-- Control variables
local farmingCoroutine = nil

-- Create GUI
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "FarmGui"
screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")

local mainFrame = Instance.new("Frame")
mainFrame.Name = "MainFrame"
mainFrame.Size = UDim2.new(0, 300, 0, 170)  -- Increased height for credits
mainFrame.Position = farmSettings.position
mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
mainFrame.Active = true
mainFrame.Draggable = true
mainFrame.Selectable = true
mainFrame.ClipsDescendants = true
mainFrame.Parent = screenGui

local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 8)
corner.Parent = mainFrame

-- Title
local title = Instance.new("TextLabel")
title.Name = "Title"
title.Size = UDim2.new(1, 0, 0, 30)
title.Position = UDim2.new(0, 0, 0, 0)
title.BackgroundColor3 = Color3.fromRGB(45, 45, 60)
title.TextColor3 = Color3.fromRGB(255, 255, 255)
title.Text = "ENVELOPE FARMER"
title.Font = Enum.Font.GothamBold
title.TextSize = 14
title.Parent = mainFrame

local titleCorner = Instance.new("UICorner")
titleCorner.CornerRadius = UDim.new(0, 8)
titleCorner.Parent = title

-- Toggle button
local toggleButton = Instance.new("TextButton")
toggleButton.Name = "ToggleButton"
toggleButton.Size = UDim2.new(0.8, 0, 0, 35)
toggleButton.Position = UDim2.new(0.1, 0, 0.25, 0)
toggleButton.BackgroundColor3 = Color3.fromRGB(60, 180, 60)
toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
toggleButton.Text = "START FARMING"
toggleButton.Font = Enum.Font.Gotham
toggleButton.TextSize = 14
toggleButton.Parent = mainFrame

local toggleCorner = Instance.new("UICorner")
toggleCorner.CornerRadius = UDim.new(0, 6)
toggleCorner.Parent = toggleButton

-- Speed control
local speedLabel = Instance.new("TextLabel")
speedLabel.Name = "SpeedLabel"
speedLabel.Size = UDim2.new(0.6, 0, 0, 20)
speedLabel.Position = UDim2.new(0.1, 0, 0.55, 0)
speedLabel.BackgroundTransparency = 1
speedLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
speedLabel.Text = "Speed: " .. farmSettings.speed .. "s"
speedLabel.Font = Enum.Font.Gotham
speedLabel.TextSize = 12
speedLabel.TextXAlignment = Enum.TextXAlignment.Left
speedLabel.Parent = mainFrame

local speedInput = Instance.new("TextBox")
speedInput.Name = "SpeedInput"
speedInput.Size = UDim2.new(0.2, 0, 0, 25)
speedInput.Position = UDim2.new(0.7, 0, 0.55, 0)
speedInput.BackgroundColor3 = Color3.fromRGB(60, 60, 80)
speedInput.TextColor3 = Color3.fromRGB(255, 255, 255)
speedInput.Text = tostring(farmSettings.speed)
speedInput.Font = Enum.Font.Gotham
speedInput.TextSize = 12
speedInput.Parent = mainFrame

local speedCorner = Instance.new("UICorner")
speedCorner.CornerRadius = UDim.new(0, 4)
speedCorner.Parent = speedInput

-- Credits (clickable text)
local creditsText = Instance.new("TextButton")  -- Using TextButton for clickability
creditsText.Name = "CreditsText"
creditsText.Size = UDim2.new(1, 0, 0, 20)
creditsText.Position = UDim2.new(0, 0, 0.85, 0)
creditsText.BackgroundTransparency = 1
creditsText.TextColor3 = Color3.fromRGB(100, 200, 255)  -- RGB blue color
creditsText.Text = "Script by: @CatBoy (kylosilly)"
creditsText.Font = Enum.Font.Gotham
creditsText.TextSize = 12
creditsText.Parent = mainFrame

-- Function to open URL
local function openScriptBlox()
    local success, err = pcall(function()
        local httpService = game:GetService("HttpService")
        if httpService then
            -- This requires proper permission in the executor
            game:GetService("StarterGui"):SetCore("OpenBrowserWindow", {
                URL = "https://scriptblox.com/script/Package-RNG-Get-Op-Packages-For-Free-46869"
            })
        end
    end)
    
    if not success then
        -- Fallback: Copy to clipboard if can't open browser
        setclipboard("https://scriptblox.com/script/Package-RNG-Get-Op-Packages-For-Free-46869")
        creditsText.Text = "Link copied to clipboard!"
        task.wait(2)
        creditsText.Text = "Script by: @CatBoy (kylosilly)"
    end
end

-- Farming function
local function farmEnvelopes()
    while farmSettings.enabled and task.wait(farmSettings.speed) do
        replicated_storage:WaitForChild("GivePackageRemote"):FireServer()
    end
end

-- Update button appearance
local function updateButton()
    if farmSettings.enabled then
        toggleButton.Text = "STOP FARMING"
        toggleButton.BackgroundColor3 = Color3.fromRGB(180, 60, 60)
    else
        toggleButton.Text = "START FARMING"
        toggleButton.BackgroundColor3 = Color3.fromRGB(60, 180, 60)
    end
end

-- Toggle button connection
toggleButton.MouseButton1Click:Connect(function()
    farmSettings.enabled = not farmSettings.enabled
    
    if farmSettings.enabled then
        farmingCoroutine = coroutine.create(farmEnvelopes)
        coroutine.resume(farmingCoroutine)
    elseif farmingCoroutine then
        coroutine.close(farmingCoroutine)
        farmingCoroutine = nil
    end
    
    updateButton()
end)

-- Credits click connection
creditsText.MouseButton1Click:Connect(openScriptBlox)

-- Speed input handling
speedInput.FocusLost:Connect(function(enterPressed)
    local newSpeed = tonumber(speedInput.Text)
    if newSpeed and newSpeed > 0 and newSpeed <= 2 then
        farmSettings.speed = newSpeed
        speedLabel.Text = "Speed: " .. string.format("%.1f", farmSettings.speed) .. "s"
        speedInput.Text = string.format("%.1f", farmSettings.speed)
    else
        speedInput.Text = string.format("%.1f", farmSettings.speed)
    end
end)

-- Window dragging functionality
local dragging, dragInput, dragStart, startPos

local function updateInput(input)
    local delta = input.Position - dragStart
    mainFrame.Position = UDim2.new(
        startPos.X.Scale, 
        startPos.X.Offset + delta.X, 
        startPos.Y.Scale, 
        startPos.Y.Offset + delta.Y
    )
    farmSettings.position = mainFrame.Position
end

mainFrame.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        dragging = true
        dragStart = input.Position
        startPos = mainFrame.Position
        
        input.Changed:Connect(function()
            if input.UserInputState == Enum.UserInputState.End then
                dragging = false
            end
        end)
    end
end)

mainFrame.InputChanged:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseMovement then
        dragInput = input
    end
end)

UserInputService.InputChanged:Connect(function(input)
    if input == dragInput and dragging then
        updateInput(input)
    end
end)

Features & Information

Added a simple gui Because i was tired of changing True to false everytime Creds to @CatBoy(kylosilly) Chat gpt made it for me bc ts is lazy to do but at least it works Original post: https://scriptblox.com/script/Package-RNG-Get-Op-Packages-For-Free-46869

Community Comments (3)

DiscordOfficialDiscordOfficialJul 30, 2025

@CodeCraftLua Ai is gonna be the future

xtriplesx1xtriplesx1Jul 30, 2025

@CatBoy bro gave u credits lol

xGhostyxtxGhostyxtJul 30, 2025

Added the credits in the script to the original creator @CatBoy and his original post

More Scripts for [📩] Package RNG 📦