TEXT 30
Big Paintball New Working Script By venuslock on 12th September 2024 12:56:33 AM
  1. repeat task.wait() until game:IsLoaded()
  2. if not hookmetamethod then game.Players.LocalPlayer:Kick('your exploit is not supported') end
  3.  
  4. local players = game:GetService('Players')
  5. local RunService = game:GetService('RunService')
  6. local Teams = game:GetService('Teams')
  7. local user_input_service = game:GetService('UserInputService')
  8. local workspace = game:GetService('Workspace')
  9.  
  10. local camera = workspace.CurrentCamera
  11. local wtvp = camera.WorldToViewportPoint
  12. local localplayer = players.LocalPlayer
  13.  
  14. local function indexExists(object, index)
  15.     local _, value = pcall(function() return object[index] end)
  16.     return value
  17. end
  18.  
  19. local function get_character(player) return indexExists(player, 'Character') end
  20.  
  21. local function get_mouse_location() return user_input_service:GetMouseLocation() end
  22.  
  23. local function is_alive(player) return player.Character and player.Character:FindFirstChild('Humanoid') and player.Character:FindFirstChild('Humanoid').Health > 0 end
  24. local function is_team(player) return #Teams:GetChildren() > 0 and player.Team == localplayer.Team end
  25.  
  26. local function getClosestPlayerToCursor(fov)
  27.  
  28.     local maxDistance = fov or math.huge
  29.  
  30.     local closestPlayer = nil
  31.     local closestPlayerDistance = math.huge
  32.  
  33.     for _, player in pairs(players:GetPlayers()) do
  34.  
  35.         if player ~= localplayer and not is_team(player) and get_character(player) and is_alive(player) then
  36.             local pos, on_screen = wtvp(camera, get_character(player).Head.Position)
  37.  
  38.             if not on_screen then continue end
  39.  
  40.             local distance = (get_mouse_location() - Vector2.new(pos.X, pos.Y)).magnitude
  41.  
  42.             if distance <= maxDistance and distance < closestPlayerDistance then
  43.                 closestPlayer = player
  44.                 closestPlayerDistance = distance
  45.             end
  46.         end
  47.     end
  48.  
  49.     return closestPlayer
  50. end
  51.  
  52. shared.fov = 400
  53. local circle = Drawing.new('Circle')
  54. circle.Thickness = 2
  55. circle.NumSides = 12
  56. circle.Radius = shared.fov or 400
  57. circle.Filled = false
  58. circle.Transparency = 1
  59. circle.Color = Color3.new(1, 0, 0.384313)
  60. circle.Visible = true
  61. local target = nil
  62. RunService.Heartbeat:Connect(function(deltaTime)
  63.     task.wait(deltaTime ^ 2)
  64.     target = getClosestPlayerToCursor(shared.fov)
  65.     circle.Position = get_mouse_location()
  66. end)
  67.  
  68. local OldNamecall
  69. OldNamecall = hookmetamethod(workspace, '__namecall', newcclosure(function(...)
  70.     local args = { ... }
  71.     local method = string.lower(getnamecallmethod())
  72.     local caller = getcallingscript()
  73.     if method == 'findpartonraywithwhitelist' and tostring(caller) == 'First Person Controller' then
  74.  
  75.         local HitPart = target and target.Character and target.Character.Head or nil
  76.         if HitPart then
  77.             local Origin = HitPart.Position + Vector3.new(0, 5, 0)
  78.             local Direction = (HitPart.Position - Origin)
  79.             args[2] = Ray.new(Origin, Direction)
  80.  
  81.             return OldNamecall(unpack(args))
  82.         else
  83.             return OldNamecall(...)
  84.         end
  85.     end
  86.     return OldNamecall(...)
  87. end))

Texbin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.