New paste Use cases Explore public pastes Text tools Developer API The Paste Library Journal Security Sign in with Google
LUACreated 2026-09-1012 viewsNo expiry

Hunting Season [Testing]

Raw New paste
luaRead-only
1
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")

local Player = Players.LocalPlayer
local DeadAnimals = Workspace:WaitForChild("DeadAnimals")
local Animals = Workspace:WaitForChild("Animals")
local Vehicles = Workspace:WaitForChild("Vehicles")
local HuntingTowers = Workspace:FindFirstChild("HuntingTowers")

local Config = {
	DeadAnimalMaxDistance = 300,
	AnimalMaxDistance = 0,
	PlayersMaxDistance = math.huge,
	ATVMaxDistance = 300,
	Font = Enum.Font.BuilderSansExtraBold,
	TextSize = 14,
	StrokeThickness = 0,
	StrokeColor = Color3.fromRGB(0, 0, 0)
}

_G.DeadAnimalConnections = _G.DeadAnimalConnections or {}
for _, conn in ipairs(_G.DeadAnimalConnections) do conn:Disconnect() end
_G.DeadAnimalConnections = {}

_G.LiveAnimalConnections = _G.LiveAnimalConnections or {}
for _, conn in ipairs(_G.LiveAnimalConnections) do conn:Disconnect() end
_G.LiveAnimalConnections = {}

_G.PlayerConnections = _G.PlayerConnections or {}
for _, conn in ipairs(_G.PlayerConnections) do conn:Disconnect() end
_G.PlayerConnections = {}

_G.VehicleConnections = _G.VehicleConnections or {}
for _, conn in ipairs(_G.VehicleConnections) do conn:Disconnect() end
_G.VehicleConnections = {}

_G.DeadAnimalESP = _G.DeadAnimalESP or {}
for _, data in pairs(_G.DeadAnimalESP) do if data.Billboard then data.Billboard:Destroy() end end
_G.DeadAnimalESP = {}

_G.LiveAnimalESP = _G.LiveAnimalESP or {}
for _, data in pairs(_G.LiveAnimalESP) do if data.Billboard then data.Billboard:Destroy() end end
_G.LiveAnimalESP = {}

_G.PlayerESP = _G.PlayerESP or {}
for _, data in pairs(_G.PlayerESP) do if data.Billboard then data.Billboard:Destroy() end end
_G.PlayerESP = {}

_G.VehicleESP = _G.VehicleESP or {}
for _, data in pairs(_G.VehicleESP) do if data.Billboard then data.Billboard:Destroy() end end
_G.VehicleESP = {}

local function formatName(name)
	local formatted = name:gsub("(%u)", " %1")
	return formatted:sub(1,1):upper() .. formatted:sub(2)
end

local function getRootPart(model)
	if not model or not model:IsA("Model") then return nil end
	local goosePart = model:FindFirstChild("Goose", true)
	if goosePart and goosePart:IsA("BasePart") then
		return goosePart
	end
	return model.PrimaryPart or model:FindFirstChildWhichIsA("BasePart", true)
end

local function setupDeadAnimal(model)
	if not model:IsA("Model") then return end
	local root = getRootPart(model)
	if not root then return end

	if _G.DeadAnimalESP[model] then
		if _G.DeadAnimalESP[model].Billboard then _G.DeadAnimalESP[model].Billboard:Destroy() end
		_G.DeadAnimalESP[model] = nil
	end

	local billboard = Instance.new("BillboardGui")
	billboard.Name = "DeadAnimalBillboard"
	billboard.Adornee = root
	billboard.Size = UDim2.fromOffset(200, 40)
	billboard.StudsOffset = Vector3.new(0, 3, 0)
	billboard.AlwaysOnTop = true
	billboard.Enabled = false
	billboard.Parent = root

	local textLabel = Instance.new("TextLabel")
	textLabel.Name = "InfoText"
	textLabel.Size = UDim2.fromScale(1, 1)
	textLabel.BackgroundTransparency = 1
	textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
	textLabel.TextStrokeTransparency = 1
	textLabel.Font = Config.Font
	textLabel.TextSize = Config.TextSize
	textLabel.Text = formatName(model.Name) .. " | 0m"
	textLabel.Parent = billboard

	local uiStroke = Instance.new("UIStroke")
	uiStroke.Thickness = Config.StrokeThickness
	uiStroke.Color = Config.StrokeColor
	uiStroke.Parent = textLabel

	_G.DeadAnimalESP[model] = {Billboard = billboard, TextLabel = textLabel}
end

local function cleanupDeadAnimal(model)
	local objects = _G.DeadAnimalESP[model]
	if objects then
		if objects.Billboard then objects.Billboard:Destroy() end
		_G.DeadAnimalESP[model] = nil
	end
end

local function setupLiveAnimal(model)
	if not model:IsA("Model") then return end
	local root = getRootPart(model)
	if not root then return end

	if _G.LiveAnimalESP[model] then
		if _G.LiveAnimalESP[model].Billboard then _G.LiveAnimalESP[model].Billboard:Destroy() end
		_G.LiveAnimalESP[model] = nil
	end

	local billboard = Instance.new("BillboardGui")
	billboard.Name = "LiveAnimalBillboard"
	billboard.Adornee = root
	billboard.Size = UDim2.fromOffset(200, 40)
	billboard.StudsOffset = Vector3.new(0, 3, 0)
	billboard.AlwaysOnTop = true
	billboard.Enabled = false
	billboard.Parent = root

	local textLabel = Instance.new("TextLabel")
	textLabel.Name = "InfoText"
	textLabel.Size = UDim2.fromScale(1, 1)
	textLabel.BackgroundTransparency = 1
	textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
	textLabel.TextStrokeTransparency = 1
	textLabel.Font = Config.Font
	textLabel.TextSize = Config.TextSize
	textLabel.Text = formatName(model.Name) .. " | 0m"
	textLabel.Parent = billboard

	local uiStroke = Instance.new("UIStroke")
	uiStroke.Thickness = Config.StrokeThickness
	uiStroke.Color = Config.StrokeColor
	uiStroke.Parent = textLabel

	_G.LiveAnimalESP[model] = {Billboard = billboard, TextLabel = textLabel}
end

local function cleanupLiveAnimal(model)
	local objects = _G.LiveAnimalESP[model]
	if objects then
		if objects.Billboard then objects.Billboard:Destroy() end
		_G.LiveAnimalESP[model] = nil
	end
end

local function setupVehicle(model)
	if not model:IsA("Model") or model.Name ~= "ATV" then return end
	local root = getRootPart(model)
	if not root then return end

	if _G.VehicleESP[model] then
		if _G.VehicleESP[model].Billboard then _G.VehicleESP[model].Billboard:Destroy() end
		_G.VehicleESP[model] = nil
	end

	local billboard = Instance.new("BillboardGui")
	billboard.Name = "VehicleESPBillboard"
	billboard.Adornee = root
	billboard.Size = UDim2.fromOffset(200, 40)
	billboard.StudsOffset = Vector3.new(0, 3, 0)
	billboard.AlwaysOnTop = true
	billboard.Enabled = false
	billboard.Parent = root

	local textLabel = Instance.new("TextLabel")
	textLabel.Name = "InfoText"
	textLabel.Size = UDim2.fromScale(1, 1)
	textLabel.BackgroundTransparency = 1
	textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
	textLabel.TextStrokeTransparency = 1
	textLabel.Font = Config.Font
	textLabel.TextSize = Config.TextSize
	textLabel.Text = formatName(model.Name) .. " | 0m"
	textLabel.Parent = billboard

	local uiStroke = Instance.new("UIStroke")
	uiStroke.Thickness = Config.StrokeThickness
	uiStroke.Color = Config.StrokeColor
	uiStroke.Parent = textLabel

	_G.VehicleESP[model] = {Billboard = billboard, TextLabel = textLabel}
end

local function cleanupVehicle(model)
	local objects = _G.VehicleESP[model]
	if objects then
		if objects.Billboard then objects.Billboard:Destroy() end
		_G.VehicleESP[model] = nil
	end
end

local function setupPlayerESP(targetPlayer)
	if targetPlayer == Player then return end

	local function onCharacterAdded(character)
		if not character then return end
		if _G.PlayerESP[targetPlayer] and _G.PlayerESP[targetPlayer].Billboard then
			_G.PlayerESP[targetPlayer].Billboard:Destroy()
		end

		local root = character:WaitForChild("HumanoidRootPart")
		if not root then return end

		local billboard = Instance.new("BillboardGui")
		billboard.Name = "PlayerESPBillboard"
		billboard.Adornee = root
		billboard.Size = UDim2.fromOffset(200, 40)
		billboard.StudsOffset = Vector3.new(0, 3, 0)
		billboard.AlwaysOnTop = true
		billboard.Enabled = false
		billboard.Parent = root

		local textLabel = Instance.new("TextLabel")
		textLabel.Name = "InfoText"
		textLabel.Size = UDim2.fromScale(1, 1)
		textLabel.BackgroundTransparency = 1
		textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
		textLabel.TextStrokeTransparency = 1
		textLabel.Font = Config.Font
		textLabel.TextSize = Config.TextSize
		textLabel.Text = targetPlayer.Name .. " | 0m"
		textLabel.Parent = billboard

		local uiStroke = Instance.new("UIStroke")
		uiStroke.Thickness = Config.StrokeThickness
		uiStroke.Color = Config.StrokeColor
		uiStroke.Parent = textLabel

		_G.PlayerESP[targetPlayer] = {Character = character, Billboard = billboard, TextLabel = textLabel}
	end

	if targetPlayer.Character then
		onCharacterAdded(targetPlayer.Character)
	end

	table.insert(_G.PlayerConnections, targetPlayer.CharacterAdded:Connect(onCharacterAdded))
end

local function cleanupPlayerESP(targetPlayer)
	local data = _G.PlayerESP[targetPlayer]
	if data then
		if data.Billboard then data.Billboard:Destroy() end
		_G.PlayerESP[targetPlayer] = nil
	end
end

if DeadAnimals then
	for _, model in ipairs(DeadAnimals:GetChildren()) do setupDeadAnimal(model) end
	table.insert(_G.DeadAnimalConnections, DeadAnimals.ChildAdded:Connect(setupDeadAnimal))
	table.insert(_G.DeadAnimalConnections, DeadAnimals.ChildRemoved:Connect(cleanupDeadAnimal))
end

if Animals then
	for _, model in ipairs(Animals:GetChildren()) do setupLiveAnimal(model) end
	table.insert(_G.LiveAnimalConnections, Animals.ChildAdded:Connect(setupLiveAnimal))
	table.insert(_G.LiveAnimalConnections, Animals.ChildRemoved:Connect(cleanupLiveAnimal))
end

if Vehicles then
	for _, model in ipairs(Vehicles:GetChildren()) do setupVehicle(model) end
	table.insert(_G.VehicleConnections, Vehicles.ChildAdded:Connect(setupVehicle))
	table.insert(_G.VehicleConnections, Vehicles.ChildRemoved:Connect(cleanupVehicle))
end

for _, targetPlayer in ipairs(Players:GetPlayers()) do
	setupPlayerESP(targetPlayer)
end
table.insert(_G.PlayerConnections, Players.PlayerAdded:Connect(setupPlayerESP))
table.insert(_G.PlayerConnections, Players.PlayerRemoving:Connect(cleanupPlayerESP))

local function processTower(tower)
	if tower.Name == "Hunting Tower" then
		local function applySettings()
			local stairs = tower:FindFirstChild("Stairs")
			if stairs then
				local function processStairs()
					for _, part in ipairs(stairs:GetDescendants()) do
						if part:IsA("BasePart") then
							part.CanCollide = true
							part.CanQuery = true
							part.CanTouch = true
						end
					end
				end
				processStairs()
				table.insert(_G.DeadAnimalConnections, stairs.DescendantAdded:Connect(processStairs))
			end

			for _, part in ipairs(tower:GetDescendants()) do
				if part:IsA("BasePart") then
					local s = part.Size
					if math.abs(s.X - 0.296) < 0.01 and math.abs(s.Y - 6.14) < 0.01 and math.abs(s.Z - 3.447) < 0.01 then
						part.CanCollide = false
					end
				end
			end
		end

		applySettings()
		table.insert(_G.DeadAnimalConnections, tower.ChildAdded:Connect(applySettings))
	end
end

if HuntingTowers then
	for _, tower in ipairs(HuntingTowers:GetChildren()) do processTower(tower) end
	table.insert(_G.DeadAnimalConnections, HuntingTowers.ChildAdded:Connect(processTower))
end

if _G.RenderConnection then
	_G.RenderConnection:Disconnect()
end

_G.RenderConnection = RunService.RenderStepped:Connect(function()
	local character = Player.Character
	local playerRoot = character and character:FindFirstChild("HumanoidRootPart")
	if not playerRoot then return end

	local playerPos = playerRoot.Position

	for model, data in pairs(_G.DeadAnimalESP) do
		if not model.Parent then
			cleanupDeadAnimal(model)
			continue
		end

		local root = getRootPart(model)
		if root and data.TextLabel and data.Billboard then
			local distance = (root.Position - playerPos).Magnitude
			local visible = (distance >= 20 and distance <= Config.DeadAnimalMaxDistance)

			data.Billboard.Enabled = visible
			if visible then
				data.TextLabel.Text = formatName(model.Name) .. " | " .. math.floor(distance) .. "m"
			end
		end
	end

	for model, data in pairs(_G.LiveAnimalESP) do
		if not model.Parent then
			cleanupLiveAnimal(model)
			continue
		end

		local root = getRootPart(model)
		if root and data.TextLabel and data.Billboard then
			local distance = (root.Position - playerPos).Magnitude
			local visible = (distance >= 20 and distance <= Config.AnimalMaxDistance)

			data.Billboard.Enabled = visible
			if visible then
				data.TextLabel.Text = formatName(model.Name) .. " | " .. math.floor(distance) .. "m"
			end
		end
	end

	for model, data in pairs(_G.VehicleESP) do
		if not model.Parent then
			cleanupVehicle(model)
			continue
		end

		local root = getRootPart(model)
		if root and data.TextLabel and data.Billboard then
			local distance = (root.Position - playerPos).Magnitude
			local visible = (distance >= 20 and distance <= Config.ATVMaxDistance)

			data.Billboard.Enabled = visible
			if visible then
				data.TextLabel.Text = formatName(model.Name) .. " | " .. math.floor(distance) .. "m"
			end
		end
	end

	for targetPlayer, data in pairs(_G.PlayerESP) do
		local char = data.Character
		local root = char and char:FindFirstChild("HumanoidRootPart")

		if char and char.Parent and root and data.TextLabel and data.Billboard then
			local distance = (root.Position - playerPos).Magnitude
			local visible = (distance >= 20 and distance <= Config.PlayersMaxDistance)

			data.Billboard.Enabled = visible
			if visible then
				data.TextLabel.Text = targetPlayer.Name .. " | " .. math.floor(distance) .. "m"
			end
		else
			if data.Billboard then data.Billboard.Enabled = false end
		end
	end
end)
Report abuse

Paste details

Visibility
Public
Size
13.0 KB
Protection
Standard link access
Retention
No automatic expiry

Share with confidence

Unlisted links are not searchable, but anyone with the URL can open them. Never paste live credentials or personal data.