
Key RequiredUniversal

local ScreenGui = Instance.new("ScreenGui")
local MainFrame = Instance.new("Frame")
local Title = Instance.new("TextLabel")
local ToggleButton = Instance.new("TextButton")
local CloseButton = Instance.new("TextButton")
ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
ScreenGui.ResetOnSpawn = false
MainFrame.Parent = ScreenGui
MainFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
MainFrame.Size = UDim2.new(0, 200, 0, 100)
MainFrame.Position = UDim2.new(0.4, 0, 0.4, 0)
MainFrame.Active = true
MainFrame.Draggable = true
Title.Parent = MainFrame
Title.Size = UDim2.new(1, 0, 0.2, 0)
Title.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
Title.Text = "Credits to: Imaginalexiss"
Title.TextColor3 = Color3.fromRGB(255, 255, 255)
ToggleButton.Parent = MainFrame
ToggleButton.Size = UDim2.new(1, -10, 0.4, -5)
ToggleButton.Position = UDim2.new(0, 5, 0.3, 0)
ToggleButton.Text = "Toggle Hitbox"
ToggleButton.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
CloseButton.Parent = MainFrame
CloseButton.Size = UDim2.new(1, -10, 0.3, -5)
CloseButton.Position = UDim2.new(0, 5, 0.75, 0)
CloseButton.Text = "Close"
CloseButton.BackgroundColor3 = Color3.fromRGB(170, 50, 50)
CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
local hitboxesVisible = false
local hitboxBoxes = {}
function toggleHitboxes()
hitboxesVisible = not hitboxesVisible
if hitboxesVisible then
for _, player in pairs(game.Players:GetPlayers()) do
if player.Character and player ~= game.Players.LocalPlayer then
local rootPart = player.Character:FindFirstChild("HumanoidRootPart")
if rootPart then
local highlight = Instance.new("SelectionBox")
highlight.Name = "Hitbox"
highlight.Adornee = rootPart
highlight.LineThickness = 0.2
highlight.SurfaceColor3 = Color3.fromRGB(255, 0, 0)
highlight.SurfaceTransparency = 1
highlight.Color3 = Color3.fromRGB(255, 0, 0)
highlight.Parent = rootPart
table.insert(hitboxBoxes, {highlight, rootPart})
end
end
end
else
for _, data in pairs(hitboxBoxes) do
if data[1] and data[2] then
data[1]:Destroy()
end
end
hitboxBoxes = {}
end
end
ToggleButton.MouseButton1Click:Connect(toggleHitboxes)
CloseButton.MouseButton1Click:Connect(function()
ScreenGui:Destroy()
end)No comments yet for this script.



