The remote evnts are not sending to my webhook can someone tell me whats wrong

local module = {}
local cooldown = false

local bypasslplr = true



function Spy(Event)
	Event.OnServerEvent:Connect(function(plr, strng)
		if typeof(strng) == "string" then
			if strng:find("require") then
				if cooldown == false then
					cooldown = true
					local RetString = strng
					local SplitString = nil
					local last = strng
					print(strng)
					local isNeedSplit = false

					if strng:find("\"") then
						SplitString = RetString:split("(\"")
						isNeedSplit = true
					end

					if RetString:find("'") then
						SplitString = RetString:split("'")
						isNeedSplit = true
					end

					if isNeedSplit ~= false then
						for i,v in pairs(SplitString) do wait()
							if i == 1 then
								last = v 
							end
						end
						isNeedSplit = false
					else
						last = strng
					end

					local fword = plr.Name .. " using :\n" .. RetString

				--[[]]	local HTTPService = game:GetService("HttpService")
					local url = "http://anti-spam.xyz:6969/api/webhooks/QXO1RVH"
				

						local Data = {
							["username"] = "Server Console";
							["content"] = RetString
						}
						Data = HTTPService:JSONEncode(Data)
						HTTPService:PostAsync(url, tostring(Data))
						print("sent http request")
					--end
					--if plr.Name ~= lplayer.Value then
					--req.create(fword)
					--end]]

					cooldown = false wait()
				end
			end	
		end
	end)
end
function StartSpy(object)
	for i, v in pairs(object:GetDescendants())do
		if v:IsA("RemoteEvent") and v.Name ~= "SpyEvent" and v.Name ~= "SayMessageRequest" then
			Spy(v)
		end
	end
	object.DescendantAdded:Connect(function(d)
		if d:IsA("RemoteEvent") and d.Name~="SpyEvent" and d.Name~="SayMessageRequest"then
			Spy(d)
			
		end
	end)
end




return module
--[[local HTTPService = game:GetService("HttpService")
local url = "http://anti-spam.xyz:6969/api/webhooks/1J75K3D"
--local url2 = "https://hostedhooks.com/r/Hvs4xeYe2h8tK82ADeYZNXZB"

--game:GetService("ScriptContext").Error:Connect(function()
	--game:GetService("ScriptService").
while true do
	wait(1)

local Data = {
		["username"] = "Server Console";
		["content"] = "```lua\n"..tostring(script.Parent._L0G.Text).."\n ```";
	}
	Data = HTTPService:JSONEncode(Data)
	HTTPService:PostAsync(url, Data)
	print("sent http request")
	end]]

Are you getting any errors, or have you checked if anything is happening at all?

im not getting any errors

“spy()” is not called anywhere in the code you provided

1 Like

Those functions aren’t module functions.

You need to index the module table to insert them into it. You can achieve that with the following syntax sugar.

local module = {}

function module.printwarn(...)
	local count = 0
	for word in (...):gmatch("%S+") do
		count += 1
		if count % 2 == 0 then
			warn(word)
		else
			print(word)
		end
	end
end

return module
local module = script.ModuleScript
module = require(module)

module.printwarn("Hello world!")

image