Bestmmm22

Untitled

Aug 29th, 2025
115
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.89 KB | None | 1 0
  1. -- Shadow .lol Hitbox (Saber Showdown Version)
  2. local Players = game:GetService("Players")
  3. local LocalPlayer = Players.LocalPlayer
  4. -- UI
  5. local ScreenGui = Instance.new("ScreenGui")
  6. ScreenGui.Name = "ShadowLolHitbox"
  7. ScreenGui.Parent = game.CoreGui
  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. local HideBtn = Instance.new("TextButton")
  29. HideBtn.Size = UDim2.new(1, 0, 0, 30)
  30. HideBtn.Position = UDim2.new(0, 0, 0, 85)
  31. HideBtn.BackgroundColor3 = Color3.fromRGB(90, 90, 90)
  32. HideBtn.Text = "Hide Menu"
  33. HideBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  34. HideBtn.Parent = Frame
  35. local ShowBtn = Instance.new("TextButton")
  36. ShowBtn.Size = UDim2.new(0, 40, 0, 40)
  37. ShowBtn.Position = UDim2.new(0, 10, 0, 10)
  38. ShowBtn.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  39. ShowBtn.Text = "☰"
  40. ShowBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  41. ShowBtn.Visible = false
  42. ShowBtn.Parent = ScreenGui
  43. -- Vars
  44. local hitboxEnabled = false
  45. local hitboxSize = Vector3.new(10, 10, 10) -- ukuran 10
  46. -- Function buat BoxHandleAdornment (visual hitbox putih)
  47. local function makeHitbox(hrp)
  48.     if hrp and not hrp:FindFirstChild("HitboxAdornment") then
  49.         local adorn = Instance.new("BoxHandleAdornment")
  50.         adorn.Name = "HitboxAdornment"
  51.         adorn.Adornee = hrp
  52.         adorn.Size = hitboxSize
  53.         adorn.Color3 = Color3.fromRGB(255, 255, 255) -- putih
  54.         adorn.Transparency = 0.5
  55.         adorn.ZIndex = 1
  56.         adorn.AlwaysOnTop = true
  57.         adorn.Parent = hrp
  58.     end
  59. end
  60. local function removeHitbox(hrp)
  61.     local adorn = hrp:FindFirstChild("HitboxAdornment")
  62.     if adorn then adorn:Destroy() end
  63. end
  64. -- Apply ke semua player kecuali local
  65. local function applyHitboxes()
  66.     for _, p in ipairs(Players:GetPlayers()) do
  67.         if p ~= LocalPlayer and p.Character and p.Character:FindFirstChild("HumanoidRootPart") then
  68.             makeHitbox(p.Character.HumanoidRootPart)
  69.         end
  70.     end
  71. end
  72. -- Toggle button
  73. Toggle.MouseButton1Click:Connect(function()
  74.     hitboxEnabled = not hitboxEnabled
  75.     if hitboxEnabled then
  76.         Toggle.Text = "Disable Hitbox"
  77.         applyHitboxes()
  78.     else
  79.         Toggle.Text = "Enable Hitbox"
  80.         for _, p in ipairs(Players:GetPlayers()) do
  81.             if p ~= LocalPlayer and p.Character and p.Character:FindFirstChild("HumanoidRootPart") then
  82.                 removeHitbox(p.Character.HumanoidRootPart)
  83.             end
  84.         end
  85.     end
  86. end)
  87. -- Hide & Show
  88. HideBtn.MouseButton1Click:Connect(function()
  89.     Frame.Visible = false
  90.     ShowBtn.Visible = true
  91. end)
  92. ShowBtn.MouseButton1Click:Connect(function()
  93.     Frame.Visible = true
  94.     ShowBtn.Visible = false
  95. end)
  96. -- Player baru join
  97. Players.PlayerAdded:Connect(function(p)
  98.     p.CharacterAdded:Connect(function(char)
  99.         if hitboxEnabled then
  100.             local hrp = char:WaitForChild("HumanoidRootPart", 5)
  101.             if hrp then makeHitbox(hrp) end
  102.         end
  103.     end)
  104. end)
  105. -- Kalau player respawn
  106. for _, p in ipairs(Players:GetPlayers()) do
  107.     p.CharacterAdded:Connect(function(char)
  108.         if hitboxEnabled and p ~= LocalPlayer then
  109.             local hrp = char:WaitForChild("HumanoidRootPart", 5)
  110.             if hrp then makeHitbox(hrp) end
  111.         end
  112.     end)
  113. end
Advertisement
Add Comment
Please, Sign In to add comment