Advertisement
Guest User

Hitbox Expander

a guest
Dec 4th, 2021
1,755
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. _G.NPCName = "Bandit" -- only for if you're doing npc, you can do partial.
  2. _G.HitboxToggled = true -- set to false if you want off.
  3. _G.Type = 1 -- 1 means all players; 2 means NPCs, 3 Means both.
  4. _G.Size = 100
  5.  
  6. function Player(Toggled)
  7. for i,v in pairs(game:GetService("Players"):GetChildren()) do
  8. if v.Name ~= game.Players.LocalPlayer.Name then
  9. pcall(function()
  10. if _G.AlreadyDone ~= true then
  11. _G.AlreadyDone = true
  12. _G.OGPSize = v.Character.HumanoidRootPart.Size
  13. end
  14. end)
  15. if Toggled == false then
  16. v.Character.HumanoidRootPart.Size = Vector3.new(_G.OGPSize, _G.OGPSize, _G.OGPSize)
  17. else
  18. v.Character.HumanoidRootPart.CanCollide = false
  19. v.Character.HumanoidRootPart.Size = Vector3.new(_G.Size, _G.Size, _G.Size)
  20. v.Character.HumanoidRootPart.Color = Color3.new(193, 193, 193)
  21. v.Character.HumanoidRootPart.Transparency = 0.8
  22. end
  23. end
  24. end
  25. end
  26.  
  27. function NPC(Toggled)
  28. for i,v in pairs(game:GetService("Workspace"):GetDescendants()) do
  29. if v:FindFirstChild("HumanoidRootPart") and string.match(v.Name:lower(),_G.NPCName:lower()) or v:FindFirstChild("HumanoidRootPart") and v.Name == _G.NPCName then
  30. pcall(function()
  31. if _G.AlreadyDone2 ~= true then
  32. _G.AlreadyDone2 = true
  33. _G.OGNSize = v.HumanoidRootPart.Size
  34. end
  35. end)
  36. if Toggled == false then
  37. v.HumanoidRootPart.Size = Vector3.new(_G.OGNSize, _G.OGNSize, _G.OGNSize)
  38. else
  39. v.HumanoidRootPart.CanCollide = false
  40. v.HumanoidRootPart.Size = Vector3.new(_G.Size, _G.Size, _G.Size)
  41. v.HumanoidRootPart.Color = Color3.new(193, 193, 193)
  42. v.HumanoidRootPart.Transparency = 0.8
  43. end
  44. end
  45. end
  46. end
  47.  
  48. if _G.HitboxToggled == true then
  49. if _G.Type == 1 then
  50. repeat Player(true) wait(1) until _G.HitboxToggled == false
  51. elseif _G.Type == 2 then
  52. repeat NPC(true) wait(1) until _G.HitboxToggled == false
  53. elseif _G.Type == 3 then
  54. repeat Player(true) NPC(true) wait(1) until _G.HitboxToggled == false
  55. end
  56. else
  57. Player(false)
  58. NPC(false)
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement