Advertisement
Jack12332

antiban

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