Range Changer OP
Key Required

Range Changer OP

[UPDATE] Ability WarsRoyalthessRoyalthess 2.9K views 2.7K executesUpdated Dec 1, 2025
Unrated
00
Lua Script•424 lines (12901 chars)
-- Ability Wars Hitbox Changer GUI
-- Place this in StarterGui or StarterPlayerScripts

local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")

local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

local currentHitboxSize = 2 -- Default hitbox size
local espEnabled = false

-- Create ScreenGui
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "HitboxChangerGui"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui

-- Create main frame
local frame = Instance.new("Frame")
frame.Name = "HitboxFrame"
frame.Size = UDim2.new(0, 300, 0, 300)
frame.Position = UDim2.new(0.5, -150, 0.3, 0)
frame.BackgroundColor3 = Color3.fromRGB(25, 25, 35)
frame.BorderSizePixel = 2
frame.BorderColor3 = Color3.fromRGB(100, 200, 255)
frame.Active = true
frame.Draggable = true
frame.Parent = screenGui

-- Add corner rounding
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 12)
corner.Parent = frame

-- Create title bar
local titleBar = Instance.new("Frame")
titleBar.Name = "TitleBar"
titleBar.Size = UDim2.new(1, 0, 0, 40)
titleBar.Position = UDim2.new(0, 0, 0, 0)
titleBar.BackgroundColor3 = Color3.fromRGB(35, 35, 50)
titleBar.BorderSizePixel = 0
titleBar.Parent = frame

-- Add corner to title bar
local titleCorner = Instance.new("UICorner")
titleCorner.CornerRadius = UDim.new(0, 12)
titleCorner.Parent = titleBar

-- Create title label
local titleLabel = Instance.new("TextLabel")
titleLabel.Name = "Title"
titleLabel.Size = UDim2.new(1, -45, 1, 0)
titleLabel.Position = UDim2.new(0, 12, 0, 0)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = "⚔️ Hitbox Changer"
titleLabel.TextColor3 = Color3.fromRGB(100, 200, 255)
titleLabel.TextSize = 18
titleLabel.Font = Enum.Font.GothamBold
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.Parent = titleBar

-- Create close button
local closeButton = Instance.new("TextButton")
closeButton.Name = "CloseButton"
closeButton.Size = UDim2.new(0, 35, 0, 35)
closeButton.Position = UDim2.new(1, -38, 0, 2.5)
closeButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
closeButton.BorderSizePixel = 0
closeButton.Text = "X"
closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
closeButton.TextSize = 18
closeButton.Font = Enum.Font.GothamBold
closeButton.Parent = titleBar

local closeCorner = Instance.new("UICorner")
closeCorner.CornerRadius = UDim.new(0, 10)
closeCorner.Parent = closeButton

-- Info label
local infoLabel = Instance.new("TextLabel")
infoLabel.Size = UDim2.new(1, -24, 0, 50)
infoLabel.Position = UDim2.new(0, 12, 0, 50)
infoLabel.BackgroundColor3 = Color3.fromRGB(40, 40, 60)
infoLabel.BorderSizePixel = 0
infoLabel.Text = "Expand enemy hitboxes\nfor easier hits!"
infoLabel.TextColor3 = Color3.fromRGB(200, 200, 220)
infoLabel.TextSize = 13
infoLabel.Font = Enum.Font.Gotham
infoLabel.Parent = frame

local infoCorner = Instance.new("UICorner")
infoCorner.CornerRadius = UDim.new(0, 8)
infoCorner.Parent = infoLabel

-- Range label
local rangeLabel = Instance.new("TextLabel")
rangeLabel.Size = UDim2.new(1, -24, 0, 25)
rangeLabel.Position = UDim2.new(0, 12, 0, 110)
rangeLabel.BackgroundTransparency = 1
rangeLabel.Text = "Hitbox Size (1-100):"
rangeLabel.TextColor3 = Color3.fromRGB(200, 200, 220)
rangeLabel.TextSize = 14
rangeLabel.Font = Enum.Font.GothamMedium
rangeLabel.TextXAlignment = Enum.TextXAlignment.Left
rangeLabel.Parent = frame

-- Range input box
local rangeInput = Instance.new("TextBox")
rangeInput.Size = UDim2.new(1, -24, 0, 45)
rangeInput.Position = UDim2.new(0, 12, 0, 135)
rangeInput.BackgroundColor3 = Color3.fromRGB(50, 50, 70)
rangeInput.BorderSizePixel = 0
rangeInput.PlaceholderText = "Enter size (1-100)"
rangeInput.PlaceholderColor3 = Color3.fromRGB(120, 120, 140)
rangeInput.Text = "2"
rangeInput.TextColor3 = Color3.fromRGB(100, 200, 255)
rangeInput.TextSize = 18
rangeInput.Font = Enum.Font.GothamBold
rangeInput.ClearTextOnFocus = false
rangeInput.Parent = frame

local inputCorner = Instance.new("UICorner")
inputCorner.CornerRadius = UDim.new(0, 8)
inputCorner.Parent = rangeInput

-- Confirm button
local confirmButton = Instance.new("TextButton")
confirmButton.Size = UDim2.new(1, -24, 0, 48)
confirmButton.Position = UDim2.new(0, 12, 0, 188)
confirmButton.BackgroundColor3 = Color3.fromRGB(100, 200, 255)
confirmButton.BorderSizePixel = 0
confirmButton.Text = "Apply Hitbox Size"
confirmButton.TextColor3 = Color3.fromRGB(255, 255, 255)
confirmButton.TextSize = 18
confirmButton.Font = Enum.Font.GothamBold
confirmButton.Parent = frame

local confirmCorner = Instance.new("UICorner")
confirmCorner.CornerRadius = UDim.new(0, 10)
confirmCorner.Parent = confirmButton

-- ESP Toggle button
local espButton = Instance.new("TextButton")
espButton.Size = UDim2.new(1, -24, 0, 48)
espButton.Position = UDim2.new(0, 12, 0, 244)
espButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
espButton.BorderSizePixel = 0
espButton.Text = "ESP: OFF"
espButton.TextColor3 = Color3.fromRGB(255, 255, 255)
espButton.TextSize = 18
espButton.Font = Enum.Font.GothamBold
espButton.Parent = frame

local espCorner = Instance.new("UICorner")
espCorner.CornerRadius = UDim.new(0, 10)
espCorner.Parent = espButton

-- Function to update ESP for a player
local function updateESP(character, enable)
	if not character then return end
	
	local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
	if not humanoidRootPart then return end
	
	-- Remove existing ESP
	local existingBox = humanoidRootPart:FindFirstChild("HitboxESP")
	if existingBox then
		existingBox:Destroy()
	end
	
	if enable then
		-- Create ESP box
		local espBox = Instance.new("BoxHandleAdornment")
		espBox.Name = "HitboxESP"
		espBox.Adornee = humanoidRootPart
		espBox.Size = humanoidRootPart.Size
		espBox.Color3 = Color3.fromRGB(255, 0, 100)
		espBox.Transparency = 0.7
		espBox.AlwaysOnTop = true
		espBox.ZIndex = 10
		espBox.Parent = humanoidRootPart
		
		-- Update ESP size when hitbox size changes
		RunService.Heartbeat:Connect(function()
			if espBox and espBox.Parent and espEnabled then
				espBox.Size = humanoidRootPart.Size
			end
		end)
	end
end

-- Function to toggle ESP for all players
local function toggleESP()
	espEnabled = not espEnabled
	
	if espEnabled then
		espButton.BackgroundColor3 = Color3.fromRGB(50, 255, 100)
		espButton.Text = "ESP: ON"
		
		-- Enable ESP for all enemies
		for _, otherPlayer in pairs(Players:GetPlayers()) do
			if otherPlayer ~= player and otherPlayer.Character then
				updateESP(otherPlayer.Character, true)
			end
		end
	else
		espButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
		espButton.Text = "ESP: OFF"
		
		-- Disable ESP for all enemies
		for _, otherPlayer in pairs(Players:GetPlayers()) do
			if otherPlayer ~= player and otherPlayer.Character then
				updateESP(otherPlayer.Character, false)
			end
		end
	end
	
	print("⚔️ ESP: " .. (espEnabled and "ON" or "OFF"))
end

-- Function to change hitbox sizes
local function changeHitboxes()
	local sizeValue = tonumber(rangeInput.Text)
	
	-- Validate input
	if not sizeValue then
		confirmButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
		confirmButton.Text = "Invalid Number!"
		task.wait(1.5)
		confirmButton.BackgroundColor3 = Color3.fromRGB(100, 200, 255)
		confirmButton.Text = "Apply Hitbox Size"
		return
	end
	
	if sizeValue < 1 or sizeValue > 100 then
		confirmButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
		confirmButton.Text = "Range: 1-100 only!"
		task.wait(1.5)
		confirmButton.BackgroundColor3 = Color3.fromRGB(100, 200, 255)
		confirmButton.Text = "Apply Hitbox Size"
		return
	end
	
	currentHitboxSize = sizeValue
	
	-- Apply hitbox changes to all players except yourself
	for _, otherPlayer in pairs(Players:GetPlayers()) do
		if otherPlayer ~= player then
			local character = otherPlayer.Character
			if character then
				local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
				if humanoidRootPart then
					-- Expand the hitbox
					humanoidRootPart.Size = Vector3.new(sizeValue, sizeValue, sizeValue)
					humanoidRootPart.Transparency = 0.9
					humanoidRootPart.CanCollide = false
					
					-- Update ESP if enabled
					if espEnabled then
						updateESP(character, true)
					end
				end
			end
		end
	end
	
	-- Visual feedback
	confirmButton.BackgroundColor3 = Color3.fromRGB(50, 255, 100)
	confirmButton.Text = "✓ Applied: " .. sizeValue
	task.wait(2)
	confirmButton.BackgroundColor3 = Color3.fromRGB(100, 200, 255)
	confirmButton.Text = "Apply Hitbox Size"
	
	print("⚔️ Hitbox size set to: " .. sizeValue)
end

-- Auto-update hitboxes for new players
Players.PlayerAdded:Connect(function(newPlayer)
	newPlayer.CharacterAdded:Connect(function(character)
		task.wait(1) -- Wait for character to fully load
		
		if newPlayer ~= player then
			local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
			if humanoidRootPart then
				humanoidRootPart.Size = Vector3.new(currentHitboxSize, currentHitboxSize, currentHitboxSize)
				humanoidRootPart.Transparency = 0.7
				humanoidRootPart.CanCollide = false
				
				if not humanoidRootPart:FindFirstChild("HitboxIndicator") then
					local indicator = Instance.new("SelectionBox")
					indicator.Name = "HitboxIndicator"
					indicator.Adornee = humanoidRootPart
					indicator.Color3 = Color3.fromRGB(100, 200, 255)
					indicator.LineThickness = 0.05
					indicator.Transparency = 0.5
					indicator.Parent = humanoidRootPart
				end
			end
		end
	end)
end)

-- Auto-update existing players when they respawn
for _, otherPlayer in pairs(Players:GetPlayers()) do
	if otherPlayer ~= player then
		otherPlayer.CharacterAdded:Connect(function(character)
			task.wait(1)
			
			local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
			if humanoidRootPart then
				humanoidRootPart.Size = Vector3.new(currentHitboxSize, currentHitboxSize, currentHitboxSize)
				humanoidRootPart.Transparency = 0.7
				humanoidRootPart.CanCollide = false
				
				if not humanoidRootPart:FindFirstChild("HitboxIndicator") then
					local indicator = Instance.new("SelectionBox")
					indicator.Name = "HitboxIndicator"
					indicator.Adornee = humanoidRootPart
					indicator.Color3 = Color3.fromRGB(100, 200, 255)
					indicator.LineThickness = 0.05
					indicator.Transparency = 0.5
					indicator.Parent = humanoidRootPart
				end
			end
		end)
	end
end

-- Confirm button click
confirmButton.MouseButton1Click:Connect(changeHitboxes)

-- Allow Enter key to confirm
rangeInput.FocusLost:Connect(function(enterPressed)
	if enterPressed then
		changeHitboxes()
	end
end)

-- Close button
closeButton.MouseButton1Click:Connect(function()
	-- Disable ESP
	espEnabled = false
	
	-- Reset all hitboxes before closing
	for _, otherPlayer in pairs(Players:GetPlayers()) do
		if otherPlayer ~= player and otherPlayer.Character then
			local humanoidRootPart = otherPlayer.Character:FindFirstChild("HumanoidRootPart")
			if humanoidRootPart then
				humanoidRootPart.Size = Vector3.new(2, 2, 1) -- Default size
				humanoidRootPart.Transparency = 1
				
				-- Remove ESP
				local espBox = humanoidRootPart:FindFirstChild("HitboxESP")
				if espBox then
					espBox:Destroy()
				end
			end
		end
	end
	
	-- Fade out animation
	local tween = TweenService:Create(frame, TweenInfo.new(0.3), {
		BackgroundTransparency = 1
	})
	tween:Play()
	
	-- Fade out all children
	for _, child in ipairs(frame:GetDescendants()) do
		if child:IsA("GuiObject") then
			if child:IsA("TextLabel") or child:IsA("TextButton") or child:IsA("TextBox") then
				TweenService:Create(child, TweenInfo.new(0.3), {
					TextTransparency = 1,
					BackgroundTransparency = 1
				}):Play()
			else
				TweenService:Create(child, TweenInfo.new(0.3), {
					BackgroundTransparency = 1
				}):Play()
			end
		end
	end
	
	task.wait(0.3)
	screenGui:Destroy()
end)

-- Hover effects
confirmButton.MouseEnter:Connect(function()
	confirmButton.BackgroundColor3 = Color3.fromRGB(120, 220, 255)
end)

confirmButton.MouseLeave:Connect(function()
	confirmButton.BackgroundColor3 = Color3.fromRGB(100, 200, 255)
end)

espButton.MouseEnter:Connect(function()
	if espEnabled then
		espButton.BackgroundColor3 = Color3.fromRGB(70, 255, 120)
	else
		espButton.BackgroundColor3 = Color3.fromRGB(220, 70, 70)
	end
end)

espButton.MouseLeave:Connect(function()
	if espEnabled then
		espButton.BackgroundColor3 = Color3.fromRGB(50, 255, 100)
	else
		espButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
	end
end)

closeButton.MouseEnter:Connect(function()
	closeButton.BackgroundColor3 = Color3.fromRGB(220, 70, 70)
end)

closeButton.MouseLeave:Connect(function()
	closeButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
end)

print("⚔️ Ability Wars Hitbox Changer loaded!")
print("⚔️ Expand enemy hitboxes for easier hits!")
print("⚔️ ESP available for hitbox visualization!")

Features & Information

No key Open source

Community Comments (1)

holy ai

More Scripts for [UPDATE] Ability Wars