Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// Shadow .lol Hitbox dengan Auto Respawn Support
- local player = game.Players.LocalPlayer
- local hitboxEnabled = false
- local hitboxSize = 5
- local minimized = false
- -- Buat ScreenGui
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Parent = game.CoreGui
- -- Buat Frame (UI utama)
- local Frame = Instance.new("Frame")
- Frame.Parent = ScreenGui
- Frame.Size = UDim2.new(0, 200, 0, 120)
- Frame.Position = UDim2.new(0.3, 0, 0.3, 0)
- Frame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- Frame.BorderSizePixel = 0
- Frame.Active = true
- Frame.Draggable = true -- Bisa digeser
- -- Judul
- local Title = Instance.new("TextLabel")
- Title.Parent = Frame
- Title.Size = UDim2.new(1, -25, 0, 25)
- Title.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- Title.Text = "Shadow .lol Hitbox"
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.Font = Enum.Font.SourceSansBold
- Title.TextSize = 16
- Title.TextXAlignment = Enum.TextXAlignment.Left
- -- Tombol Minimize
- local MinimizeBtn = Instance.new("TextButton")
- MinimizeBtn.Parent = Frame
- MinimizeBtn.Size = UDim2.new(0, 25, 0, 25)
- MinimizeBtn.Position = UDim2.new(1, -25, 0, 0)
- MinimizeBtn.Text = "–"
- MinimizeBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
- MinimizeBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- MinimizeBtn.Font = Enum.Font.SourceSansBold
- MinimizeBtn.TextSize = 18
- -- Tombol Toggle
- local Toggle = Instance.new("TextButton")
- Toggle.Parent = Frame
- Toggle.Size = UDim2.new(1, -20, 0, 30)
- Toggle.Position = UDim2.new(0, 10, 0, 35)
- Toggle.Text = "Enable Hitbox: OFF"
- Toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
- Toggle.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- Toggle.Font = Enum.Font.SourceSans
- Toggle.TextSize = 16
- -- Slider sederhana (pakai TextBox)
- local SizeBox = Instance.new("TextBox")
- SizeBox.Parent = Frame
- SizeBox.Size = UDim2.new(1, -20, 0, 30)
- SizeBox.Position = UDim2.new(0, 10, 0, 75)
- SizeBox.Text = "Hitbox Size: 5"
- SizeBox.TextColor3 = Color3.fromRGB(255, 255, 255)
- SizeBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- SizeBox.Font = Enum.Font.SourceSans
- SizeBox.TextSize = 16
- -- Fungsi expand hitbox
- local function expandHitbox(char)
- if not hitboxEnabled then return end
- local hrp = char:WaitForChild("HumanoidRootPart", 5)
- if hrp then
- hrp.Size = Vector3.new(hitboxSize, hitboxSize, hitboxSize)
- hrp.Transparency = 0.7
- hrp.BrickColor = BrickColor.new("Bright red")
- hrp.Material = Enum.Material.Neon
- hrp.CanCollide = false
- end
- end
- -- Apply ke semua player yang ada
- local function applyAllHitbox()
- for _,plr in pairs(game.Players:GetPlayers()) do
- if plr ~= player and plr.Character then
- expandHitbox(plr.Character)
- end
- end
- end
- -- Toggle hitbox
- Toggle.MouseButton1Click:Connect(function()
- hitboxEnabled = not hitboxEnabled
- Toggle.Text = "Enable Hitbox: " .. (hitboxEnabled and "ON" or "OFF")
- if hitboxEnabled then
- applyAllHitbox()
- end
- end)
- -- Input size via textbox
- SizeBox.FocusLost:Connect(function()
- local val = tonumber(SizeBox.Text:match("%d+"))
- if val then
- hitboxSize = math.clamp(val, 2, 20)
- SizeBox.Text = "Hitbox Size: " .. tostring(hitboxSize)
- if hitboxEnabled then
- applyAllHitbox()
- end
- else
- SizeBox.Text = "Hitbox Size: " .. tostring(hitboxSize)
- end
- end)
- -- Minimize UI
- MinimizeBtn.MouseButton1Click:Connect(function()
- minimized = not minimized
- if minimized then
- for _,obj in pairs(Frame:GetChildren()) do
- if obj ~= Title and obj ~= MinimizeBtn then
- obj.Visible = false
- end
- end
- Frame.Size = UDim2.new(0, 200, 0, 25)
- MinimizeBtn.Text = "+"
- else
- for _,obj in pairs(Frame:GetChildren()) do
- obj.Visible = true
- end
- Frame.Size = UDim2.new(0, 200, 0, 120)
- MinimizeBtn.Text = "–"
- end
- end)
- -- Event untuk player join + respawn
- local function setupPlayer(plr)
- plr.CharacterAdded:Connect(function(char)
- task.wait(1) -- tunggu spawn selesai
- expandHitbox(char)
- end)
- if plr.Character then
- expandHitbox(plr.Character)
- end
- end
- -- Apply ke semua player existing
- for _,plr in pairs(game.Players:GetPlayers()) do
- if plr ~= player then
- setupPlayer(plr)
- end
- end
- -- Listen player baru
- game.Players.PlayerAdded:Connect(function(plr)
- if plr ~= player then
- setupPlayer(plr)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment