
Key Required

-- Auto Give Money Helper
-- Place this LocalScript in StarterPlayer > StarterPlayerScripts.
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local player = Players.LocalPlayer
local CONFIG = {
SendInterval = 10.1,
MaxSendAmount = 250000,
ReserveAmount = 20000,
TowGuiNames = { "TowFarm1_0Gui", "TowAdminFarmGui" },
TargetPlaceholder = "Enter target username",
}
local remotes = {
GiveMoneyToPlr = nil,
UpdateCash = nil,
}
local ui = {
ScreenGui = nil,
StatusLabel = nil,
TargetOwnerBox = nil,
}
local function trim(text)
return string.match(text or "", "^%s*(.-)%s*$") or ""
end
local function setStatus(text)
if ui.StatusLabel then
ui.StatusLabel.Text = text
end
end
local function buildGui()
local playerGui = player:WaitForChild("PlayerGui")
local existing = playerGui:FindFirstChild("AutoGiveMoneyHelperGui")
if existing then
existing:Destroy()
end
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "AutoGiveMoneyHelperGui"
screenGui.IgnoreGuiInset = true
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui
ui.ScreenGui = screenGui
local frame = Instance.new("Frame")
frame.AnchorPoint = Vector2.new(0, 1)
frame.Position = UDim2.new(0, 14, 1, -14)
frame.Size = UDim2.new(0, 320, 0, 96)
frame.BackgroundColor3 = Color3.fromRGB(21, 28, 36)
frame.BorderSizePixel = 0
frame.Parent = screenGui
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 12)
corner.Parent = frame
local stroke = Instance.new("UIStroke")
stroke.Color = Color3.fromRGB(58, 123, 255)
stroke.Transparency = 0.45
stroke.Parent = frame
local targetBox = Instance.new("TextBox")
targetBox.BackgroundColor3 = Color3.fromRGB(15, 20, 26)
targetBox.BorderSizePixel = 0
targetBox.ClearTextOnFocus = false
targetBox.Font = Enum.Font.Gotham
targetBox.PlaceholderText = "Target username"
targetBox.Position = UDim2.new(0, 12, 0, 10)
targetBox.Size = UDim2.new(1, -24, 0, 34)
targetBox.Text = ""
targetBox.TextColor3 = Color3.fromRGB(230, 237, 243)
targetBox.PlaceholderColor3 = Color3.fromRGB(139, 152, 165)
targetBox.TextSize = 14
targetBox.Parent = frame
ui.TargetOwnerBox = targetBox
local targetCorner = Instance.new("UICorner")
targetCorner.CornerRadius = UDim.new(0, 10)
targetCorner.Parent = targetBox
local label = Instance.new("TextLabel")
label.BackgroundTransparency = 1
label.Position = UDim2.new(0, 12, 0, 52)
label.Size = UDim2.new(1, -24, 0, 32)
label.Font = Enum.Font.Code
label.TextColor3 = Color3.fromRGB(230, 237, 243)
label.TextSize = 13
label.TextWrapped = true
label.TextXAlignment = Enum.TextXAlignment.Left
label.TextYAlignment = Enum.TextYAlignment.Center
label.Text = "Auto money helper starting..."
label.Parent = frame
ui.StatusLabel = label
end
local function resolveRemotes()
local eventsFolder = ReplicatedStorage:FindFirstChild("_CS")
eventsFolder = eventsFolder and eventsFolder:FindFirstChild("Events") or ReplicatedStorage:FindFirstChild("_CS.Events")
if not eventsFolder then
return false
end
remotes.GiveMoneyToPlr = eventsFolder:FindFirstChild("GiveMoneyToPlr")
remotes.UpdateCash = eventsFolder:FindFirstChild("UpdateCash")
return remotes.GiveMoneyToPlr ~= nil
end
local function getTargetPlayer()
local targetBox = ui.TargetOwnerBox
if not targetBox then
return nil, "Target box not ready"
end
local targetName = trim(targetBox.Text)
if targetName == "" then
return nil, "Target user is empty"
end
local targetPlayer = Players:FindFirstChild(targetName)
if not targetPlayer then
return nil, "Target user not found: " .. targetName
end
if targetPlayer == player then
return nil, "Target user is yourself"
end
return targetPlayer
end
local function parseCashDisplayValue(text)
local rawText = tostring(text or ""):gsub("%s+", "")
if rawText == "" then
return nil
end
local numericPart, suffix = rawText:match("([%+%-]?%d[%d,%.]*)([KMBTkmbt]?)")
if not numericPart or numericPart == "" then
return nil
end
suffix = suffix ~= "" and string.upper(suffix) or nil
local cleaned = numericPart
local hasComma = string.find(cleaned, ",", 1, true) ~= nil
local hasDot = string.find(cleaned, ".", 1, true) ~= nil
if hasComma and hasDot then
local reversed = string.reverse(cleaned)
local lastCommaFromEnd = string.find(reversed, ",", 1, true)
local lastDotFromEnd = string.find(reversed, ".", 1, true)
local lastCommaIndex = lastCommaFromEnd and (#cleaned - lastCommaFromEnd + 1) or nil
local lastDotIndex = lastDotFromEnd and (#cleaned - lastDotFromEnd + 1) or nil
if lastCommaIndex and lastDotIndex and lastCommaIndex > lastDotIndex then
cleaned = cleaned:gsub("%.", "")
cleaned = cleaned:gsub(",", ".")
else
cleaned = cleaned:gsub(",", "")
end
elseif hasComma then
local commaCount = select(2, cleaned:gsub(",", ""))
if commaCount == 1 then
cleaned = cleaned:gsub(",", ".")
else
cleaned = cleaned:gsub(",", "")
end
end
local numericValue = tonumber(cleaned)
if not numericValue then
return nil
end
local multipliers = {
K = 1e3,
M = 1e6,
B = 1e9,
T = 1e12,
}
return numericValue * (multipliers[suffix] or 1)
end
local function getCashDisplayLabel()
local playerGui = player:FindFirstChild("PlayerGui")
if not playerGui then
return nil
end
for _, object in ipairs(playerGui:GetDescendants()) do
if object:IsA("TextLabel") and object.Name == "CashDisplay" then
return object
end
end
return nil
end
local function getCurrentCash()
if remotes.UpdateCash and remotes.UpdateCash:IsA("RemoteFunction") then
local ok, cashValue = pcall(function()
return remotes.UpdateCash:InvokeServer()
end)
if ok then
local numericCashValue = tonumber(cashValue)
if numericCashValue then
return numericCashValue
end
end
end
local cashLabel = getCashDisplayLabel()
if cashLabel then
return parseCashDisplayValue(cashLabel.Text)
end
return nil
end
local function getSendAmount(currentCash)
local cashValue = math.floor(tonumber(currentCash) or 0)
local sendable = cashValue - CONFIG.ReserveAmount
if sendable <= 0 then
return 0
end
return math.min(CONFIG.MaxSendAmount, sendable)
end
buildGui()
if not resolveRemotes() then
setStatus("GiveMoneyToPlr remote not found")
return
end
setStatus("Auto money helper ready")
task.spawn(function()
while true do
local targetPlayer, targetError = getTargetPlayer()
if not targetPlayer then
setStatus(targetError or "Waiting for target user")
task.wait(CONFIG.SendInterval)
continue
end
local currentCash = getCurrentCash()
if not currentCash then
setStatus("Cash value unavailable")
task.wait(CONFIG.SendInterval)
continue
end
local sendAmount = getSendAmount(currentCash)
if sendAmount <= 0 then
setStatus("Not enough cash to send | need more than " .. tostring(CONFIG.ReserveAmount))
task.wait(CONFIG.SendInterval)
continue
end
local ok, err = pcall(function()
remotes.GiveMoneyToPlr:FireServer(targetPlayer, tostring(sendAmount))
end)
if ok then
setStatus("Sent " .. tostring(sendAmount) .. " to " .. targetPlayer.Name)
else
setStatus("Send failed: " .. tostring(err))
end
task.wait(CONFIG.SendInterval)
end
end)No comments yet for this script.



