ToysolDev

arsneal

May 13th, 2021
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. -- thanks to JasonJJK on v3rm for helping me improve this script!
  2.  
  3. hitboxSize = 13 -- Change hitbox size here
  4. visiblity = 10 -- 10 for invisible, 0 for visible
  5.  
  6.  
  7. local function expandHitbox(target) -- expand hitbox function (basic)
  8. -- Prevent errors by waiting until everything loads in for the target
  9. repeat wait() until target.Character
  10. repeat wait() until target.Character:FindFirstChild("HeadHB")
  11. repeat wait() until target.Character:FindFirstChild("HumanoidRootPart")
  12.  
  13. -- expand hitbox
  14. target.Character.HeadHB.Size = Vector3.new(hitboxSize,hitboxSize,hitboxSize)
  15. target.Character.HeadHB.CanCollide = false
  16. target.Character.HeadHB.Transparency = visiblity
  17. target.Character.HumanoidRootPart.Size = Vector3.new(hitboxSize,hitboxSize,hitboxSize)
  18. target.Character.HumanoidRootPart.CanCollide = false
  19. target.Character.HumanoidRootPart.Transparency = visiblity
  20. target.Character.RightUpperLeg.Size = Vector3.new(hitboxSize,hitboxSize,hitboxSize)
  21. target.Character.RightUpperLeg.CanCollide = false
  22. target.Character.RightUpperLeg.Transparency = 10
  23. target.Character.LeftUpperLeg.CanCollide = false
  24. target.Character.LeftUpperLeg.Size = Vector3.new(hitboxSize,hitboxSize,hitboxSize)
  25. target.Character.LeftUpperLeg.Transparency = 10
  26. end
  27.  
  28. -- What players do we do this to?
  29.  
  30. for i,v in pairs(game.Players:GetPlayers()) do --exisiting players
  31. if v ~= game:GetService("Players").LocalPlayer and v.Character then
  32. expandHitbox(v)
  33. v.CharacterAdded:Connect(function(character)
  34. expandHitbox(character)
  35. end)
  36. end
  37. end
  38.  
  39. game.Players.PlayerAdded:Connect(function(player) -- new member joins
  40. if player.character then -- if its a character
  41. expandHitbox(player)
  42. end
  43. player.CharacterAdded:Connect(function(joinedcharacter) -- if their character changes
  44. expandHitbox(joinedcharacter)
  45. end)
  46. end)
  47.  
  48. while wait(1) do -- get rid of the FUCKING THIGHS i dont care i dont care its ugly it does its job
  49. for i,v in pairs(game.Players:GetPlayers()) do --exisiting players
  50. if v ~= game:GetService("Players").LocalPlayer and v.Character then
  51. expandHitbox(v)
  52. end
  53. end
  54. end
  55.  
Add Comment
Please, Sign In to add comment