Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Roblox -- Universal -- Anti Chat Logger
- -- Made by LuckyScripters
- -- Only works with LegacyChatService
- local CoreGui = cloneref(game:GetService("CoreGui"))
- local StarterGui = cloneref(game:GetService("StarterGui"))
- local TextChatService = cloneref(game:GetService("TextChatService"))
- local rawMetatable = getrawmetatable(StarterGui)
- local originalIndex = rawMetatable.__index
- local originalNamecall = rawMetatable.__namecall
- setreadonly(rawMetatable, false)
- local notifySound = Instance.new("Sound", CoreGui)
- notifySound.Name = "Notification"
- notifySound.Volume = 0.25
- notifySound.SoundId = "rbxassetid://261072074"
- rawMetatable.__index = newcclosure(function(self : Instance, index : any)
- if self == StarterGui and index == "SetCore" then
- local originalFunction = originalIndex(self, index)
- return function(self : StarterGui, parameterName : string, bindableEvents : {[string] : any})
- if parameterName == "CoreGuiChatConnections" then
- if bindableEvents.ChatWindow and bindableEvents.ChatWindow.MessagePosted then
- bindableEvents.ChatWindow.MessagePosted = nil
- end
- end
- return originalFunction(self, parameterName, bindableEvents)
- end
- end
- return originalIndex(self, index)
- end)
- rawMetatable.__namecall = newcclosure(function(self : Instance, ... : any)
- if self == StarterGui and getnamecallmethod() == "SetCore" then
- local arguments = {...}
- local parameterName = arguments[1]
- local bindableEvents = arguments[2]
- if parameterName == "CoreGuiChatConnections" then
- if bindableEvents.ChatWindow and bindableEvents.ChatWindow.MessagePosted then
- bindableEvents.ChatWindow.MessagePosted = nil
- end
- end
- end
- return originalNamecall(self, ...)
- end)
- setreadonly(rawMetatable, true)
- for index, value in getgc(true) do
- if typeof(value) == "table" and rawget(value, "MessagePosted") then
- for name, signalFunction in value.MessagePosted do
- if name == "fire" then
- rawset(value.MessagePosted, "fire", function()
- return
- end)
- break
- end
- end
- end
- end
- if not game:IsLoaded() then
- game.Loaded:Wait()
- end
- if TextChatService.ChatVersion ~= Enum.ChatVersion.LegacyChatService then
- StarterGui:SetCore("SendNotification", {
- Title = "Anti Chat Logger",
- Text = "Failed to disable chat logs, this game is using TextChatService and not LegacyChatService",
- Icon = "",
- Duration = 5,
- Callback = nil,
- Button1 = "Okay",
- Button2 = nil
- })
- else
- StarterGui:SetCore("SendNotification", {
- Title = "Anti Chat Logger",
- Text = "Successfully disabled chat logs, you are now unbannable, enjoy!",
- Icon = "",
- Duration = 5,
- Callback = nil,
- Button1 = "Okay",
- Button2 = nil
- })
- end
- notifySound:Play()
- notifySound.Ended:Wait()
- notifySound:Destroy()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement