Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local UserInputService = game:GetService("UserInputService")
- local RunService = game:GetService("RunService")
- local Teams = game:GetService("Teams")
- local player = Players.LocalPlayer
- local hitboxSize = 5
- local hitboxTransparency = 0.5
- local affectPlayers = true
- local affectNPCs = false
- local checkTeam = false
- local updateInterval = 0.5
- local lastUpdate = 0
- local screenGui = Instance.new("ScreenGui")
- screenGui.Parent = game.CoreGui
- local function addUICorner(instance, radius)
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, radius)
- corner.Parent = instance
- end
- local function addUIStroke(instance, thickness, color)
- local stroke = Instance.new("UIStroke")
- stroke.Thickness = thickness
- stroke.Color = color
- stroke.Parent = instance
- end
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 120, 0, 40)
- button.Position = UDim2.new(0.8, 0, 0.1, 0)
- button.Text = "Abrir Menú"
- button.TextColor3 = Color3.new(1, 1, 1)
- button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- button.BackgroundTransparency = 0.25
- button.Font = Enum.Font.GothamSemibold
- button.TextSize = 14
- button.Parent = screenGui
- addUICorner(button, 8)
- addUIStroke(button, 2, Color3.new(1, 1, 1))
- local menu = Instance.new("Frame")
- menu.Size = UDim2.new(0, 300, 0, 300)
- menu.Position = UDim2.new(0.5, -150, 0.5, -150)
- menu.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
- menu.BackgroundTransparency = 0.25
- menu.Visible = false
- menu.Parent = screenGui
- addUICorner(menu, 0)
- addUIStroke(menu, 2, Color3.new(1, 1, 1))
- local title = Instance.new("TextLabel")
- title.Size = UDim2.new(1, 0, 0, 30)
- title.Position = UDim2.new(0, 0, 0, 5)
- title.Text = "Configuración de Hitbox"
- title.TextColor3 = Color3.new(1, 1, 1)
- title.BackgroundTransparency = 1
- title.Font = Enum.Font.GothamBold
- title.TextSize = 16
- title.Parent = menu
- local function createStyledTextBox(parent, position, defaultText)
- local textBox = Instance.new("TextBox")
- textBox.Size = UDim2.new(0.8, 0, 0, 25)
- textBox.Position = position
- textBox.Text = defaultText
- textBox.TextColor3 = Color3.new(1, 1, 1)
- textBox.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- textBox.BackgroundTransparency = 0.5
- textBox.Font = Enum.Font.Gotham
- textBox.TextSize = 14
- textBox.Parent = parent
- addUICorner(textBox, 4)
- addUIStroke(textBox, 1, Color3.new(1, 1, 1))
- return textBox
- end
- local function createStyledButton(parent, position, text)
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0.4, -10, 0, 25)
- button.Position = position
- button.Text = text
- button.TextColor3 = Color3.new(1, 1, 1)
- button.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- button.BackgroundTransparency = 0.5
- button.Font = Enum.Font.GothamSemibold
- button.TextSize = 12
- button.Parent = parent
- addUICorner(button, 4)
- addUIStroke(button, 1, Color3.new(1, 1, 1))
- return button
- end
- local hitboxInput = createStyledTextBox(menu, UDim2.new(0.1, 0, 0, 45), tostring(hitboxSize))
- local transparencySlider = createStyledTextBox(menu, UDim2.new(0.1, 0, 0, 85), tostring(hitboxTransparency))
- local playersOnly = createStyledButton(menu, UDim2.new(0.05, 0, 0, 125), "Solo Jugadores")
- local npcsOnly = createStyledButton(menu, UDim2.new(0.55, 0, 0, 125), "Solo NPCs")
- local bothButton = createStyledButton(menu, UDim2.new(0.3, 0, 0, 165), "Ambos")
- local checkTeamButton = createStyledButton(menu, UDim2.new(0.3, 0, 0, 205), "Revisar Equipo: OFF")
- local function makeDraggable(obj)
- local dragging, dragInput, dragStart, startPos
- obj.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = obj.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- obj.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- local delta = input.Position - dragStart
- obj.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- end)
- end
- makeDraggable(button)
- makeDraggable(menu)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement