Bestmmm22

Untitled

Aug 27th, 2025
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.47 KB | None | 0 0
  1. --// Shadow .lol Hitbox dengan Auto Respawn Support
  2. local player = game.Players.LocalPlayer
  3. local hitboxEnabled = false
  4. local hitboxSize = 5
  5. local minimized = false
  6.  
  7. -- Buat ScreenGui
  8. local ScreenGui = Instance.new("ScreenGui")
  9. ScreenGui.Parent = game.CoreGui
  10.  
  11. -- Buat Frame (UI utama)
  12. local Frame = Instance.new("Frame")
  13. Frame.Parent = ScreenGui
  14. Frame.Size = UDim2.new(0, 200, 0, 120)
  15. Frame.Position = UDim2.new(0.3, 0, 0.3, 0)
  16. Frame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  17. Frame.BorderSizePixel = 0
  18. Frame.Active = true
  19. Frame.Draggable = true -- Bisa digeser
  20.  
  21. -- Judul
  22. local Title = Instance.new("TextLabel")
  23. Title.Parent = Frame
  24. Title.Size = UDim2.new(1, -25, 0, 25)
  25. Title.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  26. Title.Text = "Shadow .lol Hitbox"
  27. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  28. Title.Font = Enum.Font.SourceSansBold
  29. Title.TextSize = 16
  30. Title.TextXAlignment = Enum.TextXAlignment.Left
  31.  
  32. -- Tombol Minimize
  33. local MinimizeBtn = Instance.new("TextButton")
  34. MinimizeBtn.Parent = Frame
  35. MinimizeBtn.Size = UDim2.new(0, 25, 0, 25)
  36. MinimizeBtn.Position = UDim2.new(1, -25, 0, 0)
  37. MinimizeBtn.Text = "–"
  38. MinimizeBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  39. MinimizeBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  40. MinimizeBtn.Font = Enum.Font.SourceSansBold
  41. MinimizeBtn.TextSize = 18
  42.  
  43. -- Tombol Toggle
  44. local Toggle = Instance.new("TextButton")
  45. Toggle.Parent = Frame
  46. Toggle.Size = UDim2.new(1, -20, 0, 30)
  47. Toggle.Position = UDim2.new(0, 10, 0, 35)
  48. Toggle.Text = "Enable Hitbox: OFF"
  49. Toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
  50. Toggle.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  51. Toggle.Font = Enum.Font.SourceSans
  52. Toggle.TextSize = 16
  53.  
  54. -- Slider sederhana (pakai TextBox)
  55. local SizeBox = Instance.new("TextBox")
  56. SizeBox.Parent = Frame
  57. SizeBox.Size = UDim2.new(1, -20, 0, 30)
  58. SizeBox.Position = UDim2.new(0, 10, 0, 75)
  59. SizeBox.Text = "Hitbox Size: 5"
  60. SizeBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  61. SizeBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  62. SizeBox.Font = Enum.Font.SourceSans
  63. SizeBox.TextSize = 16
  64.  
  65. -- Fungsi expand hitbox
  66. local function expandHitbox(char)
  67.     if not hitboxEnabled then return end
  68.     local hrp = char:WaitForChild("HumanoidRootPart", 5)
  69.     if hrp then
  70.         hrp.Size = Vector3.new(hitboxSize, hitboxSize, hitboxSize)
  71.         hrp.Transparency = 0.7
  72.         hrp.BrickColor = BrickColor.new("Bright red")
  73.         hrp.Material = Enum.Material.Neon
  74.         hrp.CanCollide = false
  75.     end
  76. end
  77.  
  78. -- Apply ke semua player yang ada
  79. local function applyAllHitbox()
  80.     for _,plr in pairs(game.Players:GetPlayers()) do
  81.         if plr ~= player and plr.Character then
  82.             expandHitbox(plr.Character)
  83.         end
  84.     end
  85. end
  86.  
  87. -- Toggle hitbox
  88. Toggle.MouseButton1Click:Connect(function()
  89.     hitboxEnabled = not hitboxEnabled
  90.     Toggle.Text = "Enable Hitbox: " .. (hitboxEnabled and "ON" or "OFF")
  91.     if hitboxEnabled then
  92.         applyAllHitbox()
  93.     end
  94. end)
  95.  
  96. -- Input size via textbox
  97. SizeBox.FocusLost:Connect(function()
  98.     local val = tonumber(SizeBox.Text:match("%d+"))
  99.     if val then
  100.         hitboxSize = math.clamp(val, 2, 20)
  101.         SizeBox.Text = "Hitbox Size: " .. tostring(hitboxSize)
  102.         if hitboxEnabled then
  103.             applyAllHitbox()
  104.         end
  105.     else
  106.         SizeBox.Text = "Hitbox Size: " .. tostring(hitboxSize)
  107.     end
  108. end)
  109.  
  110. -- Minimize UI
  111. MinimizeBtn.MouseButton1Click:Connect(function()
  112.     minimized = not minimized
  113.     if minimized then
  114.         for _,obj in pairs(Frame:GetChildren()) do
  115.             if obj ~= Title and obj ~= MinimizeBtn then
  116.                 obj.Visible = false
  117.             end
  118.         end
  119.         Frame.Size = UDim2.new(0, 200, 0, 25)
  120.         MinimizeBtn.Text = "+"
  121.     else
  122.         for _,obj in pairs(Frame:GetChildren()) do
  123.             obj.Visible = true
  124.         end
  125.         Frame.Size = UDim2.new(0, 200, 0, 120)
  126.         MinimizeBtn.Text = "–"
  127.     end
  128. end)
  129.  
  130. -- Event untuk player join + respawn
  131. local function setupPlayer(plr)
  132.     plr.CharacterAdded:Connect(function(char)
  133.         task.wait(1) -- tunggu spawn selesai
  134.         expandHitbox(char)
  135.     end)
  136.     if plr.Character then
  137.         expandHitbox(plr.Character)
  138.     end
  139. end
  140.  
  141. -- Apply ke semua player existing
  142. for _,plr in pairs(game.Players:GetPlayers()) do
  143.     if plr ~= player then
  144.         setupPlayer(plr)
  145.     end
  146. end
  147.  
  148. -- Listen player baru
  149. game.Players.PlayerAdded:Connect(function(plr)
  150.     if plr ~= player then
  151.         setupPlayer(plr)
  152.     end
  153. end)
Advertisement
Add Comment
Please, Sign In to add comment