Meme ChatSpam
Chatspam with custom delays and order.
Code:
local LocalPlayer = LocalPlayerlocal concommand = concommand
local CurTime = CurTime
local hook = hook
local msg = 0
local SpamTimer = 0
local ShouldSpam = false
local Spam = {
-- [number Order] = {string Message, number Delay},
[1] = {"Message 1", 12}, -- will have a 12 second delay until the next message
[2] = {"Message 2", 2}, -- will have a 2 second delay until the next message
}
hook.Add("Tick", "Chat Spammer", function()
if not (ShouldSpam) then return end
if (CurTime() < SpamTimer) then return end
msg = msg + 1
if (msg > #Spam) then
msg = 1
end
LocalPlayer():ConCommand("say " .. Spam[i][1])
SpamTimer = CurTime() + Spam[i][2]
end)
concommand.Add("chat_spam", function() ShouldSpam = not ShouldSpam end, nil, "Toggles the chat spammer.", 0)