WallLock
Key Required

WallLock

SIREN HEAD: LEGACYsasadsdssasadsds 581 views 2.2K executesUpdated Aug 17, 2026
2.5/ 5(2 votes)
1150% Positive
Lua Script•56 lines (1686 chars)
-- Toggle U key

local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local Camera = workspace.CurrentCamera
local LocalPlayer = Players.LocalPlayer
local BuildEvent = game.ReplicatedStorage.remotes.build

local Enabled = false

UserInputService.InputBegan:Connect(function(Input, GameProcessed)
	if GameProcessed then return end

	if Input.KeyCode == Enum.KeyCode.U then
		Enabled = not Enabled
	end
end)

while task.wait() do
	if Enabled then
		local MousePosition = UserInputService:GetMouseLocation()
		local ClosestPlayer = nil
		local ClosestDistance = math.huge

		for _, Player in ipairs(Players:GetPlayers()) do
			if Player ~= LocalPlayer then
				local Character = Player.Character
				local RootPart = Character and Character:FindFirstChild("HumanoidRootPart")

				if RootPart then
					local ScreenPosition, OnScreen = Camera:WorldToViewportPoint(RootPart.Position)

					if OnScreen then
						local Distance = (Vector2.new(ScreenPosition.X, ScreenPosition.Y) - MousePosition).Magnitude

						if Distance < ClosestDistance then
							ClosestDistance = Distance
							ClosestPlayer = Player
						end
					end
				end
			end
		end

		if ClosestPlayer then
			local Character = ClosestPlayer.Character
			local RootPart = Character and Character:FindFirstChild("HumanoidRootPart")

			if RootPart then
				local HeightOffset = Character:FindFirstChildOfClass("Humanoid") and 0.5 or -0.5

				BuildEvent:FireServer("Wall",RootPart.CFrame*CFrame.new(0,HeightOffset,0)*CFrame.new(0,0,0,-4.3711388286738e-08,1,0,4.3711388286738e-08,1.9106854651647e-15,-1,-1,-4.3711388286738e-08,-4.3711388286738e-08))
			end
		end
	end
end

Features & Information

Automatically detects the player closest to your cursor and surrounds them with walls to restrict their movement.

Community Comments (0)

No comments yet for this script.

More Scripts for SIREN HEAD: LEGACY