Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local service = game:GetService("Players")
- local isResizing = false
- function resizeHeadHitbox(character)
- local head = character:WaitForChild("Head", 5) -- Wait for head to load, with a timeout of 5 seconds
- if head then
- -- Increase head size
- head.Size = Vector3.new(5, 5, 5)
- -- Decrease transparency
- head.Transparency = 0.5
- end
- end
- function resetHeadHitbox(character)
- local head = character:FindFirstChild("Head")
- if head then
- -- Reset head size
- head.Size = Vector3.new(1, 1, 1)
- -- Reset transparency
- head.Transparency = 0
- end
- end
- for _, otherPlayer in ipairs(service:GetPlayers()) do
- otherPlayer.CharacterAdded:Connect(function(character)
- if isResizing then
- wait(1) -- Wait a second before resizing head to ensure character has fully loaded
- resizeHeadHitbox(character)
- end
- end)
- end
- game:GetService("UserInputService").InputBegan:Connect(function(input)
- if input.KeyCode == Enum.KeyCode.M then
- isResizing = not isResizing -- Toggle resizing
- if isResizing then
- for _, otherPlayer in ipairs(service:GetPlayers()) do
- resizeHeadHitbox(otherPlayer.Character)
- end
- else
- for _, otherPlayer in ipairs(service:GetPlayers()) do
- resetHeadHitbox(otherPlayer.Character)
- end
- end
- end
- end)
- -- Adding fog removal (you can remove this if not needed)
- game:GetService("Lighting").FogEnd = 99999
- game:GetService("Lighting").FogStart = 99999
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement