Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Shadow .lol Hitbox (Saber Showdown Version)
- local Players = game:GetService("Players")
- local LocalPlayer = Players.LocalPlayer
- -- UI
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Name = "ShadowLolHitbox"
- ScreenGui.Parent = game.CoreGui
- 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
- local HideBtn = Instance.new("TextButton")
- HideBtn.Size = UDim2.new(1, 0, 0, 30)
- HideBtn.Position = UDim2.new(0, 0, 0, 85)
- HideBtn.BackgroundColor3 = Color3.fromRGB(90, 90, 90)
- HideBtn.Text = "Hide Menu"
- HideBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
- HideBtn.Parent = Frame
- local ShowBtn = Instance.new("TextButton")
- ShowBtn.Size = UDim2.new(0, 40, 0, 40)
- ShowBtn.Position = UDim2.new(0, 10, 0, 10)
- ShowBtn.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- ShowBtn.Text = "☰"
- ShowBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
- ShowBtn.Visible = false
- ShowBtn.Parent = ScreenGui
- -- Vars
- local hitboxEnabled = false
- local hitboxSize = Vector3.new(10, 10, 10) -- ukuran 10
- -- Function buat BoxHandleAdornment (visual hitbox putih)
- local function makeHitbox(hrp)
- if hrp and not hrp:FindFirstChild("HitboxAdornment") then
- local adorn = Instance.new("BoxHandleAdornment")
- adorn.Name = "HitboxAdornment"
- adorn.Adornee = hrp
- adorn.Size = hitboxSize
- adorn.Color3 = Color3.fromRGB(255, 255, 255) -- putih
- adorn.Transparency = 0.5
- adorn.ZIndex = 1
- adorn.AlwaysOnTop = true
- adorn.Parent = hrp
- end
- end
- local function removeHitbox(hrp)
- local adorn = hrp:FindFirstChild("HitboxAdornment")
- if adorn then adorn:Destroy() end
- end
- -- Apply ke semua player kecuali local
- local function applyHitboxes()
- for _, p in ipairs(Players:GetPlayers()) do
- if p ~= LocalPlayer and p.Character and p.Character:FindFirstChild("HumanoidRootPart") then
- makeHitbox(p.Character.HumanoidRootPart)
- end
- end
- end
- -- Toggle button
- Toggle.MouseButton1Click:Connect(function()
- hitboxEnabled = not hitboxEnabled
- if hitboxEnabled then
- Toggle.Text = "Disable Hitbox"
- applyHitboxes()
- else
- Toggle.Text = "Enable Hitbox"
- for _, p in ipairs(Players:GetPlayers()) do
- if p ~= LocalPlayer and p.Character and p.Character:FindFirstChild("HumanoidRootPart") then
- removeHitbox(p.Character.HumanoidRootPart)
- end
- end
- end
- end)
- -- Hide & Show
- HideBtn.MouseButton1Click:Connect(function()
- Frame.Visible = false
- ShowBtn.Visible = true
- end)
- ShowBtn.MouseButton1Click:Connect(function()
- Frame.Visible = true
- ShowBtn.Visible = false
- end)
- -- Player baru join
- Players.PlayerAdded:Connect(function(p)
- p.CharacterAdded:Connect(function(char)
- if hitboxEnabled then
- local hrp = char:WaitForChild("HumanoidRootPart", 5)
- if hrp then makeHitbox(hrp) end
- end
- end)
- end)
- -- Kalau player respawn
- for _, p in ipairs(Players:GetPlayers()) do
- p.CharacterAdded:Connect(function(char)
- if hitboxEnabled and p ~= LocalPlayer then
- local hrp = char:WaitForChild("HumanoidRootPart", 5)
- if hrp then makeHitbox(hrp) end
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment