Spam script somewhere in my game

If they gave you that many scripts, then it’s probably a troll. You should probably delete them and either create one of your own of whatever you’re creating or find a more reliable one in the toolbox.

I just want to get rid of the spam, there is a weird shop that comes up in-game that I don’t want there…

Check each and every one of those 15 scripts and check if they have a ScreenGui in it if they do that might be the culprit

They all look like the ones I pasted above. When I deleted those, I was in testing mode so they didn’t delete, but they don’t show up when I am not testing the game.

Here’s one named “ChatScript”

--	// FileName: ChatScript.lua
--	// Written by: Xsitsu
--	// Description: Hooks main chat module up to Topbar in corescripts.

local FFlagUserHandleChatHotKeyWithContextActionService = false do
	local ok, value = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserHandleChatHotKeyWithContextActionService")
	end)
	if ok then
		FFlagUserHandleChatHotKeyWithContextActionService = value
	end
end

local StarterGui = game:GetService("StarterGui")
local GuiService = game:GetService("GuiService")
local ChatService = game:GetService("Chat")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local MAX_COREGUI_CONNECTION_ATTEMPTS = 10

local ClientChatModules = ChatService:WaitForChild("ClientChatModules")
local ChatSettings = require(ClientChatModules:WaitForChild("ChatSettings"))

local function DoEverything()
	local Chat = require(script:WaitForChild("ChatMain"))

	local containerTable = {}
	containerTable.ChatWindow = {}
	containerTable.SetCore = {}
	containerTable.GetCore = {}

	containerTable.ChatWindow.ChatTypes = {}
	containerTable.ChatWindow.ChatTypes.BubbleChatEnabled = ChatSettings.BubbleChatEnabled
	containerTable.ChatWindow.ChatTypes.ClassicChatEnabled = ChatSettings.ClassicChatEnabled

	--// Connection functions
	local function ConnectEvent(name)
		local event = Instance.new("BindableEvent")
		event.Name = name
		containerTable.ChatWindow[name] = event

		event.Event:connect(function(...) Chat[name](Chat, ...) end)
	end

	local function ConnectFunction(name)
		local func = Instance.new("BindableFunction")
		func.Name = name
		containerTable.ChatWindow[name] = func

		func.OnInvoke = function(...) return Chat[name](Chat, ...) end
	end

	local function ReverseConnectEvent(name)
		local event = Instance.new("BindableEvent")
		event.Name = name
		containerTable.ChatWindow[name] = event

		Chat[name]:connect(function(...) event:Fire(...) end)
	end

	local function ConnectSignal(name)
		local event = Instance.new("BindableEvent")
		event.Name = name
		containerTable.ChatWindow[name] = event

		event.Event:connect(function(...) Chat[name]:fire(...) end)
	end

	local function ConnectSetCore(name)
		local event = Instance.new("BindableEvent")
		event.Name = name
		containerTable.SetCore[name] = event

		event.Event:connect(function(...) Chat[name.."Event"]:fire(...) end)
	end

	local function ConnectGetCore(name)
		local func = Instance.new("BindableFunction")
		func.Name = name
		containerTable.GetCore[name] = func

		func.OnInvoke = function(...) return Chat["f"..name](...) end
	end

	--// Do connections
	ConnectEvent("ToggleVisibility")
	ConnectEvent("SetVisible")
	ConnectEvent("FocusChatBar")
	ConnectEvent("EnterWhisperState")
	ConnectFunction("GetVisibility")
	ConnectFunction("GetMessageCount")
	ConnectEvent("TopbarEnabledChanged")
	ConnectFunction("IsFocused")

	ReverseConnectEvent("ChatBarFocusChanged")
	ReverseConnectEvent("VisibilityStateChanged")
	ReverseConnectEvent("MessagesChanged")
	ReverseConnectEvent("MessagePosted")

	ConnectSignal("CoreGuiEnabled")

	ConnectSetCore("ChatMakeSystemMessage")
	ConnectSetCore("ChatWindowPosition")
	ConnectSetCore("ChatWindowSize")
	ConnectGetCore("ChatWindowPosition")
	ConnectGetCore("ChatWindowSize")
	ConnectSetCore("ChatBarDisabled")
	ConnectGetCore("ChatBarDisabled")

    if not FFlagUserHandleChatHotKeyWithContextActionService then    
        ConnectEvent("SpecialKeyPressed")
    end

	SetCoreGuiChatConnections(containerTable)
end

function SetCoreGuiChatConnections(containerTable)
	local tries = 0
	while tries < MAX_COREGUI_CONNECTION_ATTEMPTS do
		tries = tries + 1
		local success, ret = pcall(function() StarterGui:SetCore("CoreGuiChatConnections", containerTable) end)
		if success then
			break
		end
		if not success and tries == MAX_COREGUI_CONNECTION_ATTEMPTS then
			error("Error calling SetCore CoreGuiChatConnections: " .. ret)
		end
		wait()
	end
end

function checkBothChatTypesDisabled()
	if ChatSettings.BubbleChatEnabled ~= nil then
		if ChatSettings.ClassicChatEnabled ~= nil then
			return not (ChatSettings.BubbleChatEnabled or ChatSettings.ClassicChatEnabled)
		end
	end
	return false
end

if (not GuiService:IsTenFootInterface()) and (not game:GetService('UserInputService').VREnabled) then
	if not checkBothChatTypesDisabled() then
		DoEverything()
	else
		local containerTable = {}
		containerTable.ChatWindow = {}

		containerTable.ChatWindow.ChatTypes = {}
		containerTable.ChatWindow.ChatTypes.BubbleChatEnabled = false
		containerTable.ChatWindow.ChatTypes.ClassicChatEnabled = false
		SetCoreGuiChatConnections(containerTable)
	end
else
	-- Make init data request to register as a speaker
	local EventFolder = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents")
	EventFolder.GetInitDataRequest:InvokeServer()
end

Well this script is outdated because of the TopBar was removed and now there are just buttons

I don’t know what that means but ok! I really don’t know what to do. This has been a problem since April.

Delete its lie and virus If you scroll down you will see req(******) Its inserts virus(s)

Ok! The problem with that is that the only time I see these scripts is when I’m testing the game. I can’t delete things when I’m testing the game, and I can’t see them when I’m not testing it. How do I fix it?

Delete that script now. Roblox runs their scripts where you don’t see them where this shows and roblox would never do that unless you enable the option to view every thing

How do I delete it? It’s only visible when I am testing it, I can’t delete while testing or it won’t save.

1 Like

Go to expolorer and type Script and check all script If you find like this
— This is roblox anti cheat script dont delete it—
Probably %99 Its virus

And If you see req(1234567890) also It can be virus too

I can’t, it doesn’t show up in editing mode. Only in testing mode. I have search the explorer through and through, no luck.

1 Like

It’s definitely - probably - a plugin.

If you uninstall a plugin/disable it then it will still have it’s stuff in that game until you make a new game. I could be wrong, I don’t know. Whilst writing this I found out that this might not be true because like you said,

Yeah I did have a plugin that I uninstalled because it was a free version of already pro’s character plugin, I brought the real one instead recently. (I didn’t have any robux until recently.) It might be this, but I’ve used that knock-off plugin in a few of my games and this one was the only one affected.
I still don’t know what’s wrong.