Advertisement
rrixh

anti xhat logger/anti ban

Sep 26th, 2023
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 12.03 KB | None | 0 0
  1. -- this basikally prevents roblox from logging your xhat messages sent in-game Meaning if u get reported for saying something bad u wont get banned!
  2. -- Store in autoexek folder
  3. -- kredits: AnthonyIsntHere and ArianBlaack
  4.  
  5. local ACL_LoadTime = tick()
  6.  
  7. local ChatChanged = false
  8. local OldSetting = nil
  9. local WhitelistedCoreTypes = {
  10.     "Chat",
  11.     "All",
  12.     Enum.CoreGuiType.Chat,
  13.     Enum.CoreGuiType.All
  14. }
  15.  
  16. local StarterGui = game:GetService("StarterGui")
  17.  
  18. local FixCore = function(x)
  19.     local CoreHook; CoreHook = hookmetamethod(x, "__namecall", function(self, ...)
  20.         local Method = getnamecallmethod()
  21.         local Arguments = {...}
  22.        
  23.         if self == x and Method == "SetCoreGuiEnabled" and not checkcaller() then
  24.             local CoreType = Arguments[1]
  25.             local Enabled = Arguments[2]
  26.            
  27.             if table.find(WhitelistedCoreTypes, CoreType) and not Enabled then
  28.                 if CoreType == ("Chat" or Enum.CoreGuiType.Chat) then
  29.                     OldSetting = Enabled
  30.                 end
  31.                 ChatChanged = true
  32.             end
  33.         end
  34.        
  35.         return CoreHook(self, ...)
  36.     end)
  37.    
  38.     x.CoreGuiChangedSignal:Connect(function(Type)
  39.         if table.find(WhitelistedCoreTypes, Type) and ChatChanged then
  40.             task.wait()
  41.             if not StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Chat) then
  42.                 x:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
  43.             end
  44.             wait(1)
  45.              if StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Chat) then
  46.                 x:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, OldSetting) -- probably defaults to false i am too tired for the making of this lol
  47.             end
  48.             ChatChanged = false
  49.         end
  50.     end)
  51. end
  52.  
  53. if StarterGui then
  54.     FixCore(StarterGui)
  55.     if not StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Chat) then
  56.         StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
  57.     end
  58. else
  59.     local Connection; Connection = game.ChildAdded:Connect(function(x)
  60.         if x:IsA("StarterGui") then
  61.             FixCore(x)
  62.             Connection:Disconnect()
  63.         end
  64.     end)
  65. end
  66.  
  67. if not game:IsLoaded() then
  68.     game.Loaded:wait()
  69. end
  70.  
  71. local CoreGui = game:GetService("CoreGui")
  72. local TweenService = game:GetService("TweenService")
  73. local Players = game:GetService("Players")
  74.  
  75. local Player = Players.LocalPlayer
  76.  
  77. local PlayerGui = Player:FindFirstChildWhichIsA("PlayerGui") do
  78.     if not PlayerGui then
  79.         repeat task.wait() until Player:FindFirstChildWhichIsA("PlayerGui")
  80.         PlayerGui = Player:FindFirstChildWhichIsA("PlayerGui")
  81.     end
  82. end
  83.  
  84. local Notify = function(_Title, _Text , Time)
  85.     StarterGui:SetCore("SendNotification", {Title = _Title, Text = _Text, Icon = "rbxassetid://2541869220", Duration = Time})
  86. end
  87.  
  88. local Tween = function(Object, Time, Style, Direction, Property)
  89.     return TweenService:Create(Object, TweenInfo.new(Time, Enum.EasingStyle[Style], Enum.EasingDirection[Direction]), Property)
  90. end
  91.  
  92. local ACLWarning = Instance.new("ScreenGui")
  93. local Background = Instance.new("Frame")
  94. local Top = Instance.new("Frame")
  95. local Exit = Instance.new("TextButton")
  96. local UICorner = Instance.new("UICorner")
  97. local WarningLbl = Instance.new("TextLabel")
  98. local Loading = Instance.new("Frame")
  99. local Bar = Instance.new("Frame")
  100. local WarningBackground = Instance.new("Frame")
  101. local WarningFrame = Instance.new("Frame")
  102. local Despair = Instance.new("TextLabel")
  103. local UIListLayout = Instance.new("UIListLayout")
  104. local Reason_1 = Instance.new("TextLabel")
  105. local Reason_2 = Instance.new("TextLabel")
  106. local Trollge = Instance.new("ImageLabel")
  107. local UIPadding = Instance.new("UIPadding")
  108.  
  109. local MakeGuiThread = coroutine.wrap(function()
  110.     if syn then
  111.         if gethui then
  112.             gethui(ACLwarning)
  113.         else
  114.             syn.protect_gui(ACLWarning)
  115.         end
  116.     end
  117.    
  118.     ACLWarning.Name = "ACL Warning"
  119.     ACLWarning.Parent = CoreGui
  120.     ACLWarning.Enabled = false
  121.     ACLWarning.DisplayOrder = -2147483648
  122.    
  123.     Background.Name = "Background"
  124.     Background.Parent = ACLWarning
  125.     Background.AnchorPoint = Vector2.new(0.5, 0.5)
  126.     Background.BackgroundColor3 = Color3.fromRGB(21, 0, 0)
  127.     Background.BorderSizePixel = 0
  128.     Background.Position = UDim2.new(0.5, 0, 0.5, 0)
  129.     Background.Size = UDim2.new(0.300000012, 0, 0.5, 0)
  130.    
  131.     Top.Name = "Top"
  132.     Top.Parent = Background
  133.     Top.AnchorPoint = Vector2.new(0.5, 0.5)
  134.     Top.BackgroundColor3 = Color3.fromRGB(18, 18, 18)
  135.     Top.BorderSizePixel = 0
  136.     Top.Position = UDim2.new(0.5, 0, 0.100000001, 0)
  137.     Top.Size = UDim2.new(0.899999976, 0, 0.100000001, 0)
  138.    
  139.     Exit.Name = "Exit"
  140.     Exit.Parent = Top
  141.     Exit.AnchorPoint = Vector2.new(0.5, 0.5)
  142.     Exit.BackgroundColor3 = Color3.fromRGB(38, 0, 0)
  143.     Exit.Position = UDim2.new(0.949999988, 0, 0.5, 0)
  144.     Exit.Size = UDim2.new(0.100000001, -6, 1, -9)
  145.     Exit.Visible = false
  146.     Exit.Font = Enum.Font.Arcade
  147.     Exit.Text = "X"
  148.     Exit.TextColor3 = Color3.fromRGB(255, 255, 255)
  149.     Exit.TextScaled = true
  150.     Exit.TextSize = 14.000
  151.     Exit.TextWrapped = true
  152.    
  153.     UICorner.CornerRadius = UDim.new(0.200000003, 0)
  154.     UICorner.Parent = Exit
  155.    
  156.     WarningLbl.Name = "WarningLbl"
  157.     WarningLbl.Parent = Top
  158.     WarningLbl.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  159.     WarningLbl.BackgroundTransparency = 1.000
  160.     WarningLbl.Position = UDim2.new(0, 17, 0, 0)
  161.     WarningLbl.Size = UDim2.new(0.5, 0, 1, 0)
  162.     WarningLbl.Font = Enum.Font.Arcade
  163.     WarningLbl.Text = "Warning!"
  164.     WarningLbl.TextColor3 = Color3.fromRGB(255, 255, 255)
  165.     WarningLbl.TextScaled = true
  166.     WarningLbl.TextSize = 14.000
  167.     WarningLbl.TextWrapped = true
  168.     WarningLbl.TextXAlignment = Enum.TextXAlignment.Left
  169.    
  170.     Loading.Name = "Loading"
  171.     Loading.Parent = Top
  172.     Loading.AnchorPoint = Vector2.new(0.5, 0.5)
  173.     Loading.BackgroundColor3 = Color3.fromRGB(18, 18, 18)
  174.     Loading.BorderSizePixel = 0
  175.     Loading.Position = UDim2.new(0.699999988, 0, 0.5, 0)
  176.     Loading.Size = UDim2.new(0.349999994, 0, 0.0199999996, 0)
  177.    
  178.     Bar.Name = "Bar"
  179.     Bar.Parent = Loading
  180.     Bar.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  181.     Bar.BorderSizePixel = 0
  182.     Bar.Size = UDim2.new(0, 0, 1, 0)
  183.    
  184.     WarningBackground.Name = "WarningBackground"
  185.     WarningBackground.Parent = Background
  186.     WarningBackground.AnchorPoint = Vector2.new(0.5, 0.5)
  187.     WarningBackground.BackgroundColor3 = Color3.fromRGB(9, 9, 9)
  188.     WarningBackground.BorderSizePixel = 0
  189.     WarningBackground.Position = UDim2.new(0.5, 0, 0.550000012, 0)
  190.     WarningBackground.Size = UDim2.new(0.899999976, 0, 0.800000012, 0)
  191.    
  192.     WarningFrame.Name = "WarningFrame"
  193.     WarningFrame.Parent = WarningBackground
  194.     WarningFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  195.     WarningFrame.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
  196.     WarningFrame.BorderSizePixel = 0
  197.     WarningFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
  198.     WarningFrame.Size = UDim2.new(0.899999976, 0, 0.899999976, 0)
  199.    
  200.     Despair.Name = "Despair"
  201.     Despair.Parent = WarningFrame
  202.     Despair.AnchorPoint = Vector2.new(0.5, 0.5)
  203.     Despair.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
  204.     Despair.BackgroundTransparency = 1.000
  205.     Despair.BorderColor3 = Color3.fromRGB(27, 42, 53)
  206.     Despair.BorderSizePixel = 0
  207.     Despair.Position = UDim2.new(0.5, 0, 0.100000001, 0)
  208.     Despair.Size = UDim2.new(0.949999988, 0, 0.119999997, 0)
  209.     Despair.Font = Enum.Font.Oswald
  210.     Despair.Text = "Anti Chat Logger will not work here!"
  211.     Despair.TextColor3 = Color3.fromRGB(255, 255, 255)
  212.     Despair.TextScaled = true
  213.     Despair.TextSize = 50.000
  214.     Despair.TextWrapped = true
  215.     Despair.TextYAlignment = Enum.TextYAlignment.Top
  216.    
  217.     UIListLayout.Parent = WarningFrame
  218.     UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  219.     UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  220.     UIListLayout.Padding = UDim.new(0, 15)
  221.    
  222.     Reason_1.Name = "Reason_1"
  223.     Reason_1.Parent = WarningFrame
  224.     Reason_1.AnchorPoint = Vector2.new(0.5, 0.5)
  225.     Reason_1.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
  226.     Reason_1.BackgroundTransparency = 1.000
  227.     Reason_1.BorderColor3 = Color3.fromRGB(27, 42, 53)
  228.     Reason_1.BorderSizePixel = 0
  229.     Reason_1.Position = UDim2.new(0.5, 0, 0.100000001, 0)
  230.     Reason_1.Size = UDim2.new(0.949999988, 0, 0.100000001, 0)
  231.     Reason_1.Visible = false
  232.     Reason_1.Font = Enum.Font.Oswald
  233.     Reason_1.Text = "-Chat Module was not found."
  234.     Reason_1.TextColor3 = Color3.fromRGB(255, 0, 0)
  235.     Reason_1.TextScaled = true
  236.     Reason_1.TextSize = 50.000
  237.     Reason_1.TextWrapped = true
  238.     Reason_1.TextYAlignment = Enum.TextYAlignment.Top
  239.    
  240.     Reason_2.Name = "Reason_2"
  241.     Reason_2.Parent = WarningFrame
  242.     Reason_2.AnchorPoint = Vector2.new(0.5, 0.5)
  243.     Reason_2.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
  244.     Reason_2.BackgroundTransparency = 1.000
  245.     Reason_2.BorderColor3 = Color3.fromRGB(27, 42, 53)
  246.     Reason_2.BorderSizePixel = 0
  247.     Reason_2.Position = UDim2.new(0.5, 0, 0.100000001, 0)
  248.     Reason_2.Size = UDim2.new(0.949999988, 0, 0.100000001, 0)
  249.     Reason_2.Visible = false
  250.     Reason_2.Font = Enum.Font.Oswald
  251.     Reason_2.Text = "-MessagePosted function is invalid."
  252.     Reason_2.TextColor3 = Color3.fromRGB(255, 0, 0)
  253.     Reason_2.TextScaled = true
  254.     Reason_2.TextSize = 50.000
  255.     Reason_2.TextWrapped = true
  256.     Reason_2.TextYAlignment = Enum.TextYAlignment.Top
  257.    
  258.     Trollge.Name = "Trollge"
  259.     Trollge.Parent = WarningFrame
  260.     Trollge.AnchorPoint = Vector2.new(0.5, 0.5)
  261.     Trollge.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  262.     Trollge.BackgroundTransparency = 1.000
  263.     Trollge.Position = UDim2.new(0.5, 0, 0.670000017, 0)
  264.     Trollge.Size = UDim2.new(0.449999988, 0, 0.5, 0)
  265.     Trollge.Image = "rbxassetid://10104834800"
  266.    
  267.     UIPadding.Parent = WarningFrame
  268.     UIPadding.PaddingTop = UDim.new(0, 10)
  269.    
  270.     Exit.MouseButton1Click:Connect(function()
  271.         local UpTween = Tween(Background, .2, "Quint", "Out", {Position = UDim2.new(0.5, 0, 0.45, 0)})
  272.         local DownTween = Tween(Background, 1, "Quad", "Out", {Position = UDim2.new(0.5, 0, 2, 0)})
  273.         UpTween:Play()
  274.         UpTween.Completed:wait()
  275.         DownTween:Play()
  276.         DownTween.Completed:wait()
  277.         ACLWarning:Destroy()
  278.     end)
  279. end)()
  280.  
  281. local ExitCooldown = function()
  282.     wait(.5)
  283.     local Tween = Tween(Bar, 3, "Quad", "InOut", {Size = UDim2.new(1, 0, 1, 0)})
  284.     Tween:Play()
  285.     Tween.Completed:wait()
  286.     Loading:Destroy()
  287.     Exit.Visible = true
  288. end
  289.  
  290. local PlayerScripts = Player:WaitForChild("PlayerScripts")
  291. local ChatMain = PlayerScripts:FindFirstChild("ChatMain", true) or false
  292.  
  293. if not ChatMain then
  294.     local Timer = tick()
  295.     repeat
  296.         task.wait()
  297.     until PlayerScripts:FindFirstChild("ChatMain", true) or tick() > (Timer + 3)
  298.     ChatMain = PlayerScripts:FindFirstChild("ChatMain", true)
  299.     if not ChatMain then
  300.         ACLWarning.Enabled = true
  301.         Reason_1.Visible = true
  302.         ExitCooldown()
  303.         return
  304.     end
  305. end
  306.  
  307. local PostMessage = require(ChatMain).MessagePosted
  308.  
  309. if not PostMessage then
  310.     ACLWarning.Enabled = true
  311.     Reason_2.Visible = true
  312.     ExitCooldown()
  313.     return
  314. end
  315.  
  316. local MessageEvent = Instance.new("BindableEvent")
  317. local OldFunctionHook
  318. OldFunctionHook = hookfunction(PostMessage.fire, function(self, Message)
  319.     if not checkcaller() and self == PostMessage then
  320.         MessageEvent:Fire(Message)
  321.         return
  322.     end
  323.     return OldFunctionHook(self, Message)
  324. end)
  325.  
  326. if setfflag then
  327.     setfflag("AbuseReportScreenshot", "False")
  328.     setfflag("AbuseReportScreenshotPercentage", "0")
  329. end
  330.  
  331. ChatFixToggle = false
  332. task.spawn(function()
  333.     wait(1)
  334.     ACLWarning:Destroy()
  335. end)
  336. if OldSetting then
  337.     StarterGui:SetCoreGuiEnabled(CoreGuiSettings[1], CoreGuiSettings[2])
  338. end
  339. Notify("lulaslollipop 🍭", "Anti Xhat and Skreenshot Logger Loaded!", 15)
  340. print(string.format("Anti Chat-Logger has loaded in %s seconds.", tostring(tick() - ACL_LoadTime):sub(1, 4)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement