Corner Clip
Key RequiredUniversal

Corner Clip

Universal Scriptts_pmots_pmo 87 views 458 executesUpdated Aug 24, 2026
Unrated
00
Lua Script•155 lines (6268 chars)
local gamePlayers = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
local Workspace = game:GetService("Workspace")
local player = gamePlayers.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local camera = Workspace.CurrentCamera
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "ProCornerClipUI"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui
local button = Instance.new("TextButton")
button.Size = UDim2.new(0, 200, 0, 55)
button.Position = UDim2.new(0.5, -100, 0, 25)
button.BackgroundColor3 = Color3.fromRGB(25, 25, 30)
button.TextColor3 = Color3.fromRGB(240, 240, 240)
button.Font = Enum.Font.GothamBold
button.TextScaled = true
button.Text = "CORNER CLIP: OFF"
button.Active = true
button.AutoButtonColor = false
button.ClipsDescendants = true
button.Parent = screenGui
local padding = Instance.new("UIPadding")
padding.PaddingTop = UDim.new(0, 10)
padding.PaddingBottom = UDim.new(0, 10)
padding.PaddingLeft = UDim.new(0, 15)
padding.PaddingRight = UDim.new(0, 15)
padding.Parent = button
local buttonCorner = Instance.new("UICorner")
buttonCorner.CornerRadius = UDim.new(0, 12)
buttonCorner.Parent = button
local stroke = Instance.new("UIStroke")
stroke.Color = Color3.fromRGB(60, 60, 70)
stroke.Thickness = 2
stroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
stroke.Parent = button
local resizer = Instance.new("TextButton")
resizer.Size = UDim2.new(0, 20, 0, 20)
resizer.Position = UDim2.new(1, 15, 1, 10)
resizer.AnchorPoint = Vector2.new(1, 1)
resizer.BackgroundTransparency = 1
resizer.Text = "◢"
resizer.TextColor3 = Color3.fromRGB(100, 100, 115)
resizer.TextSize = 18
resizer.Font = Enum.Font.Gotham
resizer.Active = true
resizer.Parent = button
local enabled = false
local onCooldown = false
local tweenStyle = TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out)
local colors = {
	offBg = Color3.fromRGB(25, 25, 30),
	offStroke = Color3.fromRGB(60, 60, 70),
	onBg = Color3.fromRGB(35, 180, 95),
	onStroke = Color3.fromRGB(80, 220, 130),
	hoverStroke = Color3.fromRGB(100, 100, 115)
}
button.MouseEnter:Connect(function()
	if not enabled then TweenService:Create(stroke, tweenStyle, {Color = colors.hoverStroke}):Play() end
end)
button.MouseLeave:Connect(function()
	if not enabled then TweenService:Create(stroke, tweenStyle, {Color = colors.offStroke}):Play() end
end)
resizer.MouseEnter:Connect(function()
	TweenService:Create(resizer, tweenStyle, {TextColor3 = Color3.fromRGB(255, 255, 255)}):Play()
end)
resizer.MouseLeave:Connect(function()
	TweenService:Create(resizer, tweenStyle, {TextColor3 = Color3.fromRGB(100, 100, 115)}):Play()
end)
local dragging, resizing = false, false
local dragStart, startPos, startSize
resizer.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
		resizing = true
		dragStart = input.Position
		startSize = button.Size
		input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then resizing = false end end)
	end
end)
button.InputBegan:Connect(function(input)
	if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and not resizing then
		dragging = true
		dragStart = input.Position
		startPos = button.Position
		input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end)
	end
end)
UserInputService.InputChanged:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
		if resizing then
			local delta = input.Position - dragStart
			button.Size = UDim2.new(0, math.max(120, startSize.X.Offset + delta.X), 0, math.max(45, startSize.Y.Offset + delta.Y))
		elseif dragging then
			local delta = input.Position - dragStart
			button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
		end
	end
end)
button.MouseButton1Click:Connect(function()
	if resizing then return end
	enabled = not enabled
	if enabled then
		button.Text = "CORNER CLIP: ON"
		TweenService:Create(button, tweenStyle, {BackgroundColor3 = colors.onBg}):Play()
		TweenService:Create(stroke, tweenStyle, {Color = colors.onStroke}):Play()
	else
		button.Text = "CORNER CLIP: OFF"
		TweenService:Create(button, tweenStyle, {BackgroundColor3 = colors.offBg}):Play()
		TweenService:Create(stroke, tweenStyle, {Color = colors.offStroke}):Play()
	end
end)
RunService.RenderStepped:Connect(function()
	if not enabled or onCooldown then return end
	local char = player.Character
	if not char then return end
	local hrp = char:FindFirstChild("HumanoidRootPart")
	local humanoid = char:FindFirstChild("Humanoid")
	if not hrp or not humanoid or humanoid.Health <= 0 then return end
	local zoomDistance = (camera.CFrame.Position - camera.Focus.Position).Magnitude
	local inFirstPerson = zoomDistance < 1
	local inShiftLock = UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter
	if inFirstPerson or inShiftLock then
		local backDirection = -hrp.CFrame.LookVector
		local rayOrigin = hrp.Position
		local rayDirection = backDirection * 1.3
		local raycastParams = RaycastParams.new()
		raycastParams.FilterDescendantsInstances = {char}
		raycastParams.FilterType = Enum.RaycastFilterType.Exclude
		local hitWall = Workspace:Raycast(rayOrigin, rayDirection, raycastParams)
		if hitWall then
			onCooldown = true
			local overlapParams = OverlapParams.new()
			overlapParams.FilterDescendantsInstances = {char}
			overlapParams.FilterType = Enum.RaycastFilterType.Exclude
			local foundSafeSpot = false
			local safePosition = hrp.Position
			for i = 2, 22 do
				local checkPos = hrp.Position + (backDirection * i)
				local partsInSpace = Workspace:GetPartBoundsInRadius(checkPos, 1.5, overlapParams)
				if #partsInSpace == 0 then
					foundSafeSpot = true
					safePosition = checkPos
					break
				end
			end
			if foundSafeSpot then
				hrp.CFrame = CFrame.new(safePosition) * hrp.CFrame.Rotation
			end
			task.wait(1)
			onCooldown = false
		end
	end
end)

Features & Information

Lets you go through ANY wall not just corners

Community Comments (1)

SAIFXDELTASAIFXDELTASep 12, 2026

W script

More Scripts for Universal Scripts