Bestmmm22

Untitled

Aug 27th, 2025
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.75 KB | None | 0 0
  1. -- Shadow .lol Hitbox
  2. local Players = game:GetService("Players")
  3. local LocalPlayer = Players.LocalPlayer
  4. -- UI Setup
  5. local ScreenGui = Instance.new("ScreenGui")
  6. ScreenGui.Parent = game.CoreGui
  7. ScreenGui.Name = "ShadowLolHitbox"
  8. local Frame = Instance.new("Frame")
  9. Frame.Size = UDim2.new(0, 200, 0, 120)
  10. Frame.Position = UDim2.new(0.35, 0, 0.3, 0)
  11. Frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  12. Frame.Active = true
  13. Frame.Draggable = true
  14. Frame.Parent = ScreenGui
  15. local Title = Instance.new("TextLabel")
  16. Title.Size = UDim2.new(1, 0, 0, 30)
  17. Title.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  18. Title.Text = "Shadow .lol Hitbox"
  19. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  20. Title.Parent = Frame
  21. local Toggle = Instance.new("TextButton")
  22. Toggle.Size = UDim2.new(1, 0, 0, 40)
  23. Toggle.Position = UDim2.new(0, 0, 0, 40)
  24. Toggle.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
  25. Toggle.Text = "Enable Hitbox"
  26. Toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
  27. Toggle.Parent = Frame
  28. -- Vars
  29. local hitboxEnabled = false
  30. local hitboxSize = Vector3.new(10, 10, 10)
  31. -- Function to apply hitbox to one character
  32. local function setHitbox(char)
  33.     local hrp = char:FindFirstChild("HumanoidRootPart")
  34.     if hrp then
  35.         hrp.Size = hitboxSize
  36.         hrp.Transparency = 0.7
  37.         hrp.Color = Color3.fromRGB(255, 0, 0)
  38.         hrp.Material = Enum.Material.Neon
  39.         hrp.CanCollide = false
  40.     end
  41. end
  42. -- Function to restore normal HRP
  43. local function resetHitbox(char)
  44.     local hrp = char:FindFirstChild("HumanoidRootPart")
  45.     if hrp then
  46.         hrp.Size = Vector3.new(2, 2, 1) -- default
  47.         hrp.Transparency = 0
  48.         hrp.Color = Color3.fromRGB(163, 162, 165)
  49.         hrp.Material = Enum.Material.Plastic
  50.         hrp.CanCollide = true
  51.     end
  52. end
  53. -- Loop apply hitbox ke semua player lain
  54. local function applyLoop()
  55.     while hitboxEnabled do
  56.         for _, p in ipairs(Players:GetPlayers()) do
  57.             if p ~= LocalPlayer and p.Character then
  58.                 setHitbox(p.Character)
  59.             end
  60.         end
  61.         task.wait(1) -- cek tiap 1 detik biar ga berat
  62.     end
  63. end
  64. -- Toggle button
  65. Toggle.MouseButton1Click:Connect(function()
  66.     hitboxEnabled = not hitboxEnabled
  67.     if hitboxEnabled then
  68.         Toggle.Text = "Disable Hitbox"
  69.         task.spawn(applyLoop)
  70.     else
  71.         Toggle.Text = "Enable Hitbox"
  72.         for _, p in ipairs(Players:GetPlayers()) do
  73.             if p ~= LocalPlayer and p.Character then
  74.                 resetHitbox(p.Character)
  75.             end
  76.         end
  77.     end
  78. end)
  79. -- Kalau ada player baru join
  80. Players.PlayerAdded:Connect(function(p)
  81.     p.CharacterAdded:Connect(function(char)
  82.         if hitboxEnabled then
  83.             task.wait(1)
  84.             setHitbox(char)
  85.         end
  86.     end)
  87. end)
Advertisement
Add Comment
Please, Sign In to add comment