Advertisement
Thecodeeasar

Silent aim for da hood and other copies

Jan 5th, 2025 (edited)
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. -- Hitbox Settings
  2. getgenv().HitboxSize = Vector3.new(20, 20, 20) -- Desired size for the hitboxes
  3. getgenv().TargetPart = "HumanoidRootPart" -- Part of the character to resize
  4. getgenv().Enabled = true -- Toggle the script on/off
  5.  
  6. local Players = game:GetService("Players")
  7. local LocalPlayer = Players.LocalPlayer
  8.  
  9. -- Function to modify the hitbox size
  10. local function updateHitbox(player)
  11. if getgenv().Enabled and player ~= LocalPlayer and player.Character then
  12. local targetPart = player.Character:FindFirstChild(getgenv().TargetPart)
  13. if targetPart and targetPart:IsA("BasePart") then
  14. targetPart.Size = getgenv().HitboxSize
  15. targetPart.Transparency = 0.5 -- Optional: makes it semi-transparent
  16. targetPart.CanCollide = false -- Avoids interference with gameplay
  17. end
  18. end
  19. end
  20.  
  21. -- Function to apply the hitbox changes to all players
  22. local function applyToAllPlayers()
  23. for _, player in ipairs(Players:GetPlayers()) do
  24. updateHitbox(player)
  25. end
  26. end
  27.  
  28. -- Detect when new players join and apply hitbox changes
  29. Players.PlayerAdded:Connect(function(player)
  30. player.CharacterAdded:Connect(function()
  31. updateHitbox(player)
  32. end)
  33. end)
  34.  
  35. -- Apply hitbox changes to all existing players and detect respawns
  36. for _, player in ipairs(Players:GetPlayers()) do
  37. player.CharacterAdded:Connect(function()
  38. updateHitbox(player)
  39. end)
  40. updateHitbox(player) -- Ensure it applies to players already in the game
  41. end
  42.  
  43. -- Initial application
  44. applyToAllPlayers()
  45.  
  46. print("Hitbox script successfully loaded. Hitboxes set to:", tostring(getgenv().HitboxSize))
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement