--BROUGHT TO YOU BY RobloxScripter.com!--
local http_service = game:GetService("HttpService");
local main_actor;
shared.cfg = {
spam_file_name = "pf_spam_messages.txt",
time_between_chat = 7
};
assert(getactors()[1], "phantom forces changed.")
main_actor = getactors()[1];
function send_chat(msg)
syn.run_on_actor(main_actor, [[
local network, message = nil, ...;
for idx, tbl in pairs(getgc(true)) do
if (typeof(tbl) == "table" and rawget(tbl, "send")) then
network = tbl;
end;
end;
network:send("chatted", message);
]], msg);
end;
local selected_message, count = nil, 1;
local spam_messages = {"you suck at pf :(((", "omg guys HACKER!!!!!!"};
if (isfile(shared.cfg.spam_file_name)) then
spam_messages = http_service:JSONDecode(readfile(shared.cfg.spam_file_name));
else
writefile(shared.cfg.spam_file_name, http_service:JSONEncode(spam_messages));
end;
while true do
selected_message = spam_messages[count];
if (selected_message) then
send_chat(selected_message);
if (count == #spam_messages) then
count = 1;
else
count = count + 1;
end;
end;
task.wait(shared.cfg.time_between_chat);
end;