Advertisement
MawinCK

Head hitbox script edited by me v2 + better

May 7th, 2024 (edited)
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. ---press "M" to active the head hitbox also you can change Keycode of this script if you want
  2. ---you can modify or edit or make this script better no problem you can
  3. ---This script was made by "Mawin_CK"
  4. ---WARNING don't change anything about head hitbox value or head hitbox script or else the script will not work
  5. ---this script work on almost all game
  6. ---dont active or trigger Script rapidly or else is will cause error or bug or glitch or lag!
  7. ---this script only work on classic head and don't work on some kind of invisible head or invisible head or realistic head
  8. local player = game.Players.LocalPlayer
  9. local service = game:GetService("Players")
  10.  
  11. local isResizing = false
  12.  
  13. function resizeHeadHitbox()
  14. for _, otherPlayer in ipairs(service:GetPlayers()) do
  15. if otherPlayer ~= player then
  16. local character = otherPlayer.Character
  17. if character then
  18. local head = character:FindFirstChild("Head")
  19. if head then
  20. -- Increase head size
  21. head.Size = Vector3.new(5, 5, 5)
  22. -- Decrease transparency
  23. head.Transparency = 0.5
  24. end
  25. end
  26. end
  27. end
  28. end
  29.  
  30. function resetHeadHitbox()
  31. for _, otherPlayer in ipairs(service:GetPlayers()) do
  32. local character = otherPlayer.Character
  33. if character then
  34. local head = character:FindFirstChild("Head")
  35. if head then
  36. -- Reset head size
  37. head.Size = Vector3.new(1, 1, 1)
  38. -- Reset transparency
  39. head.Transparency = 0
  40. end
  41. end
  42. end
  43. end
  44.  
  45. game:GetService("Players").PlayerAdded:Connect(function(player)
  46. player.CharacterAdded:Connect(function(character)
  47. if isResizing then
  48. -- Wait a second before resizing head to ensure character has fully loaded
  49. wait(0.1)
  50. resizeHeadHitbox()
  51. end
  52. end)
  53. end)
  54.  
  55. game:GetService("UserInputService").InputBegan:Connect(function(input)
  56. if input.KeyCode == Enum.KeyCode.M then
  57. isResizing = not isResizing -- Toggle resizing
  58. if isResizing then
  59. resizeHeadHitbox()
  60. else
  61. resetHeadHitbox()
  62. end
  63. end
  64. end)
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement