Zulkin

Hitbox Expander

Oct 21st, 2021 (edited)
539
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Credits to Rex (C/E)#9115
  2. -- Global Hitbox Expander (Players & NPCs)
  3. -- Im not gonna make this a GUI because it'll be easier to patch, sorry :(
  4. -- Updated 11/24/2021, Exact time 2:48 PM PDT
  5. -- Update: Fixed some stuff that I left broken (I do develop games not just exploits lol)
  6.  
  7. local players = game:GetService("Players")
  8. local plr = players.LocalPlayer
  9. local workspace = game:GetService("Workspace")
  10. local Size = 5 -- Change this number to the stud range in width, length, and height you want it to be. One number because its used for all axis.
  11. local Repeat = false -- Change it to make it repeat or not (if its repeating, it might lag a bit. but manually changing it can be annoying too)
  12. local NPCExtend = true
  13. local PlayerExtend = false
  14. local RepeatCooldown = 5
  15. local ExpandPart = "Head"
  16. local Collide = false
  17.  
  18. players.LocalPlayer.Chatted:Connect(function(message)
  19.     if message == "/e yes" and Repeat then
  20.         Repeat = true
  21.     end
  22.     if message == "/e yes" and not Repeat then
  23.         Repeat = false
  24.     end
  25. end)
  26.  
  27. if Repeat then
  28.     while Repeat do
  29.         wait(RepeatCooldown)
  30.         children = workspace:GetDescendants()
  31.         entities = players:GetChildren()
  32.         if PlayerExtend then
  33.             for i,v in pairs(entities) do
  34.                 if v.Name ~= players.LocalPlayer.Name then
  35.                     v.Character:WaitForChild(ExpandPart).Size = Vector3.new(Size,Size,Size)
  36.                     if Collide then
  37.                         v.Character:WaitForChild(ExpandPart).CanCollide = true
  38.                     else
  39.                         v.Character:WaitForChild(ExpandPart).CanCollide = false
  40.                     end
  41.                 end
  42.             end
  43.         else
  44.         end
  45.         if NPCExtend then
  46.             for i,v in pairs(children) do
  47.                 if v.Name == ExpandPart and v.Parent:IsA("Model") and v.Parent:FindFirstChildOfClass("Humanoid") and not players:GetPlayerFromCharacter(v.Parent) then
  48.                     v.Size = Vector3.new(Size,Size,Size)
  49.                     if Collide then
  50.                         v.CanCollide = true
  51.                     else
  52.                         v.CanCollide = false
  53.                     end
  54.                 end
  55.             end
  56.         else
  57.         end
  58.     end
  59. else
  60.     children = workspace:GetDescendants()
  61.     entities = players:GetChildren()
  62.     if PlayerExtend then
  63.         for i,v in pairs(entities) do
  64.             if v.Name ~= players.LocalPlayer.Name then
  65.                 v.Character:WaitForChild(ExpandPart).Size = Vector3.new(Size,Size,Size)
  66.                 if Collide then
  67.                     v.Character:WaitForChild(ExpandPart).CanCollide = true
  68.                 else
  69.                     v.Character:WaitForChild(ExpandPart).CanCollide = false
  70.                 end
  71.             end
  72.         end
  73.     else
  74.     end
  75.     if NPCExtend then
  76.         for i,v in pairs(children) do
  77.             if v.Name == ExpandPart and v.Parent:IsA("Model") and v.Parent:FindFirstChildOfClass("Humanoid") and not players:GetPlayerFromCharacter(v.Parent) then
  78.                 v.Size = Vector3.new(Size,Size,Size)
  79.                 if Collide then
  80.                     v.CanCollide = true
  81.                 else
  82.                     v.CanCollide = false
  83.                 end
  84.             end
  85.         end
  86.     else
  87.     end
  88. end
RAW Paste Data