Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local Num = Instance.new("TextBox")
- local Plus = Instance.new("TextButton")
- local Minus = Instance.new("TextButton")
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.ResetOnSpawn = false
- Frame.Size = UDim2.new(0, 200, 0, 100)
- Frame.Position = UDim2.new(0.5, -100, 0.5, -50)
- Frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- Frame.Parent = ScreenGui
- Frame.Active = true
- Frame.Draggable = true
- Num.Size = UDim2.new(0.6, 0, 0.6, 0)
- Num.Position = UDim2.new(0.2, 0, 0.3, 0)
- Num.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- Num.TextColor3 = Color3.new(1, 1, 1)
- Num.TextScaled = true
- Num.Font = Enum.Font.SourceSans
- Num.Text = "•"
- Num.ClearTextOnFocus = true
- Num.Parent = Frame
- Plus.Size = UDim2.new(0.2, 0, 0.6, 0)
- Plus.Position = UDim2.new(0.8, 0, 0.3, 0)
- Plus.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
- Plus.TextColor3 = Color3.new(1, 1, 1)
- Plus.TextScaled = true
- Plus.Font = Enum.Font.SourceSans
- Plus.Text = "+"
- Plus.Parent = Frame
- Minus.Size = UDim2.new(0.2, 0, 0.6, 0)
- Minus.Position = UDim2.new(0, 0, 0.3, 0)
- Minus.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
- Minus.TextColor3 = Color3.new(1, 1, 1)
- Minus.TextScaled = true
- Minus.Font = Enum.Font.SourceSans
- Minus.Text = "-"
- Minus.Parent = Frame
- local DefaultSize = 1
- local character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
- local humanoidRootPart = character:WaitForChild("HumanoidRootPart", 10)
- if humanoidRootPart then
- DefaultSize = humanoidRootPart.Size.X
- end
- local number = math.floor(DefaultSize)
- local function UpdateNum()
- Num.Text = tostring(number)
- end
- local function Config()
- for _, player in next, game:GetService("Players"):GetPlayers() do
- if player.Name ~= game.Players.LocalPlayer.Name then
- pcall(function()
- local hrp = player.Character.HumanoidRootPart
- hrp.Size = Vector3.new(_G.HeadSize, _G.HeadSize, _G.HeadSize)
- hrp.Transparency = 0.4
- hrp.BrickColor = BrickColor.new("Black")
- hrp.Material = "Neon"
- hrp.CanCollide = false
- end)
- end
- end
- end
- local function DefaultConfig()
- for _, player in next, game:GetService("Players"):GetPlayers() do
- if player.Name ~= game.Players.LocalPlayer.Name then
- pcall(function()
- local hrp = player.Character.HumanoidRootPart
- hrp.Size = Vector3.new(DefaultSize, DefaultSize, DefaultSize)
- hrp.Transparency = 1
- hrp.BrickColor = BrickColor.new("Medium stone grey")
- hrp.Material = "Plastic"
- hrp.CanCollide = true
- end)
- end
- end
- end
- local function Credits() game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "HitBox Gui",
- Text = "Made By the_king.78",
- Duration = 12
- })
- end
- Plus.MouseButton1Click:Connect(function()
- number = number + 1
- UpdateNum()
- _G.HeadSize = number
- Config()
- end)
- Minus.MouseButton1Click:Connect(function()
- if number > 0 then
- number = number - 1
- UpdateNum()
- _G.HeadSize = number
- if number == 0 then
- DefaultConfig()
- else
- Config()
- end
- end
- end)
- Num.FocusLost:Connect(function(enterPressed)
- if enterPressed then
- local Value = tonumber(Num.Text)
- if Value and Value >= 0 then
- number = Value
- UpdateNum()
- _G.HeadSize = number
- if number == 0 then
- DefaultConfig()
- else
- Config()
- end
- else
- UpdateNum()
- end
- end
- end)
- _G.HeadSize = DefaultSize
- _G.Disabled = true
- game:GetService("RunService").RenderStepped:Connect(function()
- if _G.Disabled then
- if number > 0 then
- Config()
- else
- DefaultConfig()
- end
- end
- end)
- Credits()
- UpdateNum()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement