Advertisement
C-H-4-0-S

Antifling peice

Oct 24th, 2024 (edited)
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. _G.AntiFling = true
  2.  
  3. local Players = game:GetService("Players")
  4. local RunService = game:GetService("RunService")
  5.  
  6. -- Function to disable collisions for all parts of a character
  7. local function disableCollisions(character)
  8. if character then
  9. for _, descendant in ipairs(character:GetDescendants()) do
  10. if descendant:IsA("BasePart") and descendant.CanCollide then
  11. descendant.CanCollide = false
  12. end
  13. end
  14. end
  15. end
  16.  
  17. -- Main loop to continuously check for players
  18. while _G.AntiFling do
  19. RunService.Stepped:Wait()
  20.  
  21. for _, player in ipairs(Players:GetPlayers()) do
  22. if player ~= Players.LocalPlayer then
  23. -- Safely handle potential errors with pcall
  24. pcall(function()
  25. disableCollisions(player.Character)
  26. end)
  27. end
  28. end
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement