Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Shadow .lol Hitbox
- local Players = game:GetService("Players")
- local LocalPlayer = Players.LocalPlayer
- -- UI Setup
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Parent = game.CoreGui
- ScreenGui.Name = "ShadowLolHitbox"
- local Frame = Instance.new("Frame")
- Frame.Size = UDim2.new(0, 200, 0, 120)
- Frame.Position = UDim2.new(0.35, 0, 0.3, 0)
- Frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- Frame.Active = true
- Frame.Draggable = true
- Frame.Parent = ScreenGui
- local Title = Instance.new("TextLabel")
- Title.Size = UDim2.new(1, 0, 0, 30)
- Title.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- Title.Text = "Shadow .lol Hitbox"
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.Parent = Frame
- local Toggle = Instance.new("TextButton")
- Toggle.Size = UDim2.new(1, 0, 0, 40)
- Toggle.Position = UDim2.new(0, 0, 0, 40)
- Toggle.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
- Toggle.Text = "Enable Hitbox"
- Toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
- Toggle.Parent = Frame
- -- Vars
- local hitboxEnabled = false
- local hitboxSize = Vector3.new(10, 10, 10)
- -- Function to apply hitbox to one character
- local function setHitbox(char)
- local hrp = char:FindFirstChild("HumanoidRootPart")
- if hrp then
- hrp.Size = hitboxSize
- hrp.Transparency = 0.7
- hrp.Color = Color3.fromRGB(255, 0, 0)
- hrp.Material = Enum.Material.Neon
- hrp.CanCollide = false
- end
- end
- -- Function to restore normal HRP
- local function resetHitbox(char)
- local hrp = char:FindFirstChild("HumanoidRootPart")
- if hrp then
- hrp.Size = Vector3.new(2, 2, 1) -- default
- hrp.Transparency = 0
- hrp.Color = Color3.fromRGB(163, 162, 165)
- hrp.Material = Enum.Material.Plastic
- hrp.CanCollide = true
- end
- end
- -- Loop apply hitbox ke semua player lain
- local function applyLoop()
- while hitboxEnabled do
- for _, p in ipairs(Players:GetPlayers()) do
- if p ~= LocalPlayer and p.Character then
- setHitbox(p.Character)
- end
- end
- task.wait(1) -- cek tiap 1 detik biar ga berat
- end
- end
- -- Toggle button
- Toggle.MouseButton1Click:Connect(function()
- hitboxEnabled = not hitboxEnabled
- if hitboxEnabled then
- Toggle.Text = "Disable Hitbox"
- task.spawn(applyLoop)
- else
- Toggle.Text = "Enable Hitbox"
- for _, p in ipairs(Players:GetPlayers()) do
- if p ~= LocalPlayer and p.Character then
- resetHitbox(p.Character)
- end
- end
- end
- end)
- -- Kalau ada player baru join
- Players.PlayerAdded:Connect(function(p)
- p.CharacterAdded:Connect(function(char)
- if hitboxEnabled then
- task.wait(1)
- setHitbox(char)
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment