Advertisement
C-H-4-0-S

Antifling G

May 1st, 2024 (edited)
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. G.AntiFlingConfig = {
  2. -- this will remove your rotational velocity every frame
  3. disable_rotation = true;
  4.  
  5. -- this slows you down if you're moving too fast, works well but can give you a low gravity effect
  6. limit_velocity = true;
  7. limit_velocity_sensitivity = 150; -- how fast you have to be moving before you get slowed down
  8. limit_velocity_slow = 0; -- the amount of velocity you keep; a lower number increases how much you slow down by
  9.  
  10. -- stops you from ragdolling or falling over and losing control
  11. anti_ragdoll = true;
  12.  
  13. -- completely freezes you if someone gets too close to you
  14. anchor = false;
  15. smart_anchor = true; -- only anchors if someone is considered flinging, this likely won't detect many flings
  16. anchor_dist = 30; -- how close someone has to be to trigger anchor
  17.  
  18. -- teleport away if someone gets too close
  19. teleport = false;
  20. smart_teleport = true; -- only teleports if someone is considered flinging, this likely won't detect many flings
  21. teleport_dist = 30; -- how close someone has to be to teleport you
  22. }
  23. -- run _G.disable() to disable the script completely
  24.  
  25.  
  26. local Players = Game:GetService"Players"
  27. local plr = Players.LocalPlayer
  28.  
  29. local function Enable()
  30. for i,v in pairs (Players:GetPlayers()) do
  31. Collide(v)
  32. end
  33. end
  34.  
  35.  
  36.  
  37. function G:Enable()
  38. C = game:GetService"RunService".RenderStepped: Connect (Enable)
  39. end
  40. function G:Disable()
  41. C: Disconnect ()
  42. for i,v in pairs(game.Players:GetPlayers()) do
  43. if v ~= plr then
  44. for h,b in pairs(v.Character:GetDescendants()) do
  45. if b:IsA"BasePart" and b.CanCollide == false then
  46. b.CanCollide = true
  47. end
  48. end
  49. end
  50. end
  51. end
  52.  
  53. G:Enable()
  54. return G
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement