Garry's Mod (Internal) Смерть в нищите на ClassicRP (Минус денешки)

ussssaaarr2321

Subscriber
RC
0



Для тех кто хочет побаловаться вот LUA-шка

local SPAM_INTERVAL = 0.1 -- интервал между пакетами (сек)
local CHECK_MONEY = true -- проверять остаток денег и останавливаться при <5000
local START_KEY = KEY_K -- клавиша для запуска спама
local STOP_KEY = KEY_L -- клавиша для остановки спама
-- ================================

local spamActive = false
local targetEntity = nil


local function getStoredTarget()
local ply = LocalPlayer()
if not IsValid(ply) then return nil end
local target = ply:GetNWEntity("GrabitKogo")
if IsValid(target) and target:IsPlayer() then
return target
end
return nil
end

local function getTargetMoney(ent)
if not IsValid(ent) then return nil end
if ent.GetMoney then
return ent:GetMoney()
elseif ent.GetNWInt then
return ent:GetNWInt("money", 0)
elseif ent.GetNWVar then
return ent:GetNWVar("money", 0)
end
return nil
end

local function sendGrab(target)
if not IsValid(target) then return false end
net.Start("EndGrab")
net.WriteEntity(target)
net.SendToServer()
return true
end

local function startSpam(target)
if spamActive then return end
if not IsValid(target) or not target:IsPlayer() then
print("[GrabAll] Нет цели (ни в прицеле, ни сохранённой)")
return
end
targetEntity = target
spamActive = true
print("[GrabAll] Начат спам на " .. target:Nick())

timer.Create("GrabAllTimer", SPAM_INTERVAL, 0, function()
if not spamActive or not IsValid(targetEntity) then
timer.Remove("GrabAllTimer")
spamActive = false
print("[GrabAll] Остановлено (цель потеряна)")
return
end

sendGrab(targetEntity)

if CHECK_MONEY then
local money = getTargetMoney(targetEntity)
if money ~= nil and money < 5000 then
print("[GrabAll] Денег меньше 5000, автоматическая остановка")
timer.Remove("GrabAllTimer")
spamActive = false
end
end
end)
end


local function stopSpam()
if spamActive then
timer.Remove("GrabAllTimer")
spamActive = false
print("[GrabAll] Спам остановлен вручную")
end
end

hook.Add("Think", "GrabAllKeys", function()
if input.IsKeyDown(START_KEY) then
if not spamActive then
local target = LocalPlayer():GetEyeTrace().Entity
-- Если в прицеле игрок, используем его, иначе пробуем сохранённого
if IsValid(target) and target:IsPlayer() then
startSpam(target)
else
local stored = getStoredTarget()
if stored then
print("[GrabAll] Использую сохранённую цель: " .. stored:Nick())
startSpam(stored)
end
end
end
elseif input.IsKeyDown(STOP_KEY) then
stopSpam()
end
end)

____________________________________________________________________________________________________________________________________________________________________________________

Как юзать:
Ранскриптишь, берешь карманика свепом кликаешь на ребёнка и вауля жмем К и фармим дырявые NET-ы, на L отмена.
GG, WP.

P.S Героиновый пулемёт
 
Последнее редактирование:
  • Like
Реакции: SDDD
Сверху