Dsaqwed123

Antikick

May 28th, 2024
508
1
Never
5
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LScript 1.32 KB | Gaming | 1 0
  1. --// Cache
  2.  
  3. local getgenv, getnamecallmethod, hookmetamethod, newcclosure, checkcaller, stringlower = getgenv, getnamecallmethod, hookmetamethod, newcclosure, checkcaller, string.lower
  4.  
  5. --// Loaded check
  6.  
  7. if getgenv().ED_AntiKick then return end
  8.  
  9. --// Variables
  10.  
  11. local Players, StarterGui, OldNamecall = game:GetService("Players"), game:GetService("StarterGui")
  12.  
  13. --// Global Variables
  14.  
  15. getgenv().ED_AntiKick = {
  16.     SendNotifications = true, -- Set to true if you want to get notified for every event
  17.     CheckCaller = false -- Set to true if you want to disable kicking by other executed scripts
  18. }
  19.  
  20. --// Main
  21.  
  22. OldNamecall = hookmetamethod(game, "__namecall", newcclosure(function(...)
  23.     if (getgenv().ED_AntiKick.CheckCaller and not checkcaller() or true) and stringlower(getnamecallmethod()) == "kick" then
  24.         if getgenv().ED_AntiKick.SendNotifications then
  25.             StarterGui:SetCore("SendNotification", {
  26.                 Title = "antikick god",
  27.                 Text = "a anticheat system tried to kick you lmao",
  28.                 Icon = "rbxassetid://7873533047",
  29.                 Duration = 2,
  30.             })
  31.         end
  32.  
  33.         return nil
  34.     end
  35.  
  36.     return OldNamecall(...)
  37. end))
  38.  
  39. if getgenv().ED_AntiKick.SendNotifications then
  40.     StarterGui:SetCore("SendNotification", {
  41.         Title = "antikick god",
  42.         Text = "antikick loaded",
  43.         Icon = "rbxassetid://2691749281",
  44.         Duration = 3,
  45.     })
  46. end
Comments
Add Comment
Please, Sign In to add comment