[SEASON 6] Highschool Hoops
19.8k Views
155 Executions

Auto Guard

Highschool Hoops
Irdk
Irdk10 followers
1 year ago
Please login to perform these actions:

Auto Guard is a Highschool Hoops script for Roblox, uploaded to ScriptBlox on May 27, 2025.

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Uhh auto gaurd bassicly, click b to turn it on

View Raw
-- The Keybind is B
-- Please checkout edit the "Settings" to your liking

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

local localPlayer = Players.LocalPlayer
local character = localPlayer.Character or localPlayer.CharacterAdded:Wait()
local hrp = character:WaitForChild("HumanoidRootPart")

--[[SETTINGS]]--
local followEnabled = false -- automatically on or off when executed
local currentDistance = 2.5 --studs infront of the player
local adjustedDistance = 4 --W.I.P
local backwardTimer = 0 --W.I.P
local lastPosition = nil
local speed = 8 -- Higher = faster follow

local function getClosestPlayer()
	local closest = nil
	local shortestDist = math.huge
	for _, player in pairs(Players:GetPlayers()) do
		if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
			local targetHRP = player.Character.HumanoidRootPart
			local dist = (hrp.Position - targetHRP.Position).Magnitude
			if dist < shortestDist then
				shortestDist = dist
				closest = targetHRP
			end
		end
	end
	return closest
end

RunService.RenderStepped:Connect(function(dt)
	if not followEnabled then return end
	local targetHRP = getClosestPlayer()
	if not targetHRP then return end



Comments

3
Log in to join the conversation. Login
alexanderluu41's profile picture
alexanderluu411 year ago

make it so u jump then the shoot/pass the ball not tp to them

1
Irdk's profile picture
IrdkUploader1 year ago

@Cursedpryaa can you tell me the problem? so i can make a better version? I always advocate that if you think that you can make it better yourself then go for it.

1
Cursedpyraa's profile picture
Cursedpyraa1 year ago

Script is bad

1