chatgptrusak

Untitled

Apr 11th, 2024
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. -- This script creates a universal hitbox expander for all players in the game in Roblox.
  2.  
  3. -- Custom function to expand hitbox for all players
  4. local function expandHitbox()
  5. for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
  6. local character = player.Character
  7. if character then
  8. for _, part in ipairs(character:GetDescendants()) do
  9. if part:IsA("BasePart") and part.CanCollide then
  10. -- Expand hitbox size and set opacity
  11. part.Size = part.Size * 1.5 -- Adjust hitbox size multiplier as needed
  12. part.Transparency = 0.8 -- Set opacity to 20% (0.8 = 80% transparent)
  13. part.Color = Color3.fromRGB(0, 0, 255) -- Set color to blue
  14. end
  15. end
  16. end
  17. end
  18. end
  19.  
  20. -- Run hitbox expansion initially
  21. expandHitbox()
  22.  
  23. -- Run hitbox expansion for new players
  24. game:GetService("Players").PlayerAdded:Connect(function(player)
  25. player.CharacterAdded:Connect(function(character)
  26. expandHitbox()
  27. end)
  28. end)
  29.  
Advertisement
Add Comment
Please, Sign In to add comment