Advertisement
creativenico

KAT AIMBOT SCRIPT ARCEUS X

Apr 9th, 2022
648
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. game:GetService("StarterGui"):SetCore("SendNotification",{Title="Kat Aimbot by Dark X v1",Text="This is an Aimbot for Kat",Button1="Thank u!",Duration=30000000})
  2.  
  3.  
  4.  
  5. local Camera = game:GetService("Workspace").CurrentCamera
  6. local Players = game:GetService("Players")
  7. local LocalPlayer = game:GetService("Players").LocalPlayer
  8.  
  9. local function GetClosestPlayer()
  10. local ClosestPlayer = nil
  11. local FarthestDistance = math.huge
  12.  
  13. for i, v in pairs(Players.GetPlayers(Players)) do
  14. if v ~= LocalPlayer and v.Character and v.Character.FindFirstChild(v.Character, "HumanoidRootPart") then
  15. local DistanceFromPlayer = (LocalPlayer.Character.HumanoidRootPart.Position - v.Character.HumanoidRootPart.Position).Magnitude
  16.  
  17. if DistanceFromPlayer < FarthestDistance then
  18. FarthestDistance = DistanceFromPlayer
  19. ClosestPlayer = v
  20. end
  21. end
  22. end
  23.  
  24. if ClosestPlayer then
  25. return ClosestPlayer
  26. end
  27. end
  28.  
  29. local GameMetaTable = getrawmetatable(game)
  30. local OldGameMetaTableNamecall = GameMetaTable.namecall
  31. setreadonly(GameMetaTable, false)
  32.  
  33. GameMetaTable.namecall = newcclosure(function(object, ...)
  34. local NamecallMethod = getnamecallmethod()
  35. local Arguments = {...}
  36.  
  37. if tostring(NamecallMethod) == "FindPartOnRayWithIgnoreList" then
  38. local ClosestPlayer = GetClosestPlayer()
  39.  
  40. if ClosestPlayer and ClosestPlayer.Character then
  41. Arguments[1] = Ray.new(Camera.CFrame.Position, (ClosestPlayer.Character.Head.Position - Camera.CFrame.Position).Unit * (Camera.CFrame.Position - ClosestPlayer.Character.Head.Position).Magnitude)
  42. end
  43. end
  44.  
  45. return OldGameMetaTableNamecall(object, unpack(Arguments))
  46. end)
  47.  
  48. setreadonly(GameMetaTable, true)
  49.  
  50. game:GetService("StarterGui"):SetCore("SendNotification",{Title="FULLY LOADED",Text="The aimbot has been fully loaded",Duration=5})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement