
KeylessUniversal

local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Player = Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
if PlayerGui:FindFirstChild("CrushDepthPanel") then
PlayerGui.CrushDepthPanel:Destroy()
end
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "CrushDepthPanel"
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = PlayerGui
local isUnlocked = false
local isMinimized = false
local renderConnection = nil
local maxZoomDistance = 45
local minZoomDistance = 5
local MainFrame = Instance.new("Frame")
MainFrame.Size = UDim2.new(0, 300, 0, 150)
MainFrame.Position = UDim2.new(0.5, -150, 0.4, -75)
MainFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
MainFrame.BorderSizePixel = 0
MainFrame.Active = true
MainFrame.Draggable = true
MainFrame.Parent = ScreenGui
local MainRound = Instance.new("UICorner")
MainRound.CornerRadius = UDim.new(0, 12)
MainRound.Parent = MainFrame
local TopBar = Instance.new("Frame")
TopBar.Size = UDim2.new(1, 0, 0, 25)
TopBar.Position = UDim2.new(0, 0, 0, 0)
TopBar.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
TopBar.BorderSizePixel = 0
TopBar.Parent = MainFrame
local TopRound = Instance.new("UICorner")
TopRound.CornerRadius = UDim.new(0, 12)
TopRound.Parent = TopBar
local TitleText = Instance.new("TextLabel")
TitleText.Size = UDim2.new(0.5, 0, 1, 0)
TitleText.Position = UDim2.new(0, 12, 0, 0)
TitleText.BackgroundTransparency = 1
TitleText.Text = "Mouse Unlock Panel"
TitleText.TextColor3 = Color3.fromRGB(220, 220, 220)
TitleText.TextXAlignment = Enum.TextXAlignment.Left
TitleText.Font = Enum.Font.SourceSansBold
TitleText.TextSize = 14
TitleText.Parent = TopBar
local CloseButton = Instance.new("TextButton")
CloseButton.Size = UDim2.new(0, 25, 1, 0)
CloseButton.Position = UDim2.new(1, -30, 0, 0)
CloseButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
CloseButton.Text = "X"
CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
CloseButton.Font = Enum.Font.SourceSansBold
CloseButton.TextSize = 14
CloseButton.BorderSizePixel = 0
CloseButton.Parent = TopBar
local CloseRound = Instance.new("UICorner")
CloseRound.CornerRadius = UDim.new(0, 6)
CloseRound.Parent = CloseButton
local MiniButton = Instance.new("TextButton")
MiniButton.Size = UDim2.new(0, 25, 1, 0)
MiniButton.Position = UDim2.new(1, -60, 0, 0)
MiniButton.BackgroundColor3 = Color3.fromRGB(110, 110, 110)
MiniButton.Text = "-"
MiniButton.TextColor3 = Color3.fromRGB(255, 255, 255)
MiniButton.Font = Enum.Font.SourceSansBold
MiniButton.TextSize = 16
MiniButton.BorderSizePixel = 0
MiniButton.Parent = TopBar
local MiniRound = Instance.new("UICorner")
MiniRound.CornerRadius = UDim.new(0, 6)
MiniRound.Parent = MiniButton
local ToggleButton = Instance.new("TextButton")
ToggleButton.Size = UDim2.new(0, 240, 0, 50)
ToggleButton.Position = UDim2.new(0.5, -120, 0.55, -25)
ToggleButton.BackgroundColor3 = Color3.fromRGB(0, 150, 0)
ToggleButton.Text = "MOUSE UNLOCK(K)"
ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
ToggleButton.Font = Enum.Font.SourceSansBold
ToggleButton.TextSize = 18
ToggleButton.BorderSizePixel = 0
ToggleButton.Parent = MainFrame
local ButtonRound = Instance.new("UICorner")
ButtonRound.CornerRadius = UDim.new(0, 10)
ButtonRound.Parent = ToggleButton
local FloatCircle = Instance.new("TextButton")
FloatCircle.Size = UDim2.new(0, 35, 0, 35)
FloatCircle.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
FloatCircle.Text = "+"
FloatCircle.TextColor3 = Color3.fromRGB(255, 255, 255)
FloatCircle.Font = Enum.Font.SourceSansBold
FloatCircle.TextSize = 22
FloatCircle.BorderSizePixel = 0
FloatCircle.Visible = false
FloatCircle.Active = true
FloatCircle.Draggable = true
FloatCircle.Parent = ScreenGui
local CircleRound = Instance.new("UICorner")
CircleRound.CornerRadius = UDim.new(1, 0)
CircleRound.Parent = FloatCircle
local function setMouseAndCameraState(state)
isUnlocked = state
local currentCam = workspace.CurrentCamera
if isUnlocked then
ToggleButton.Text = "MOUSE LOCK(K)"
ToggleButton.BackgroundColor3 = Color3.fromRGB(150, 0, 0)
ToggleButton.Modal = true
if not renderConnection then
renderConnection = RunService.RenderStepped:Connect(function()
UserInputService.MouseBehavior = Enum.MouseBehavior.Default
UserInputService.MouseIconEnabled = true
if Player.CameraMaxZoomDistance ~= maxZoomDistance or Player.CameraMinZoomDistance ~= minZoomDistance then
Player.CameraMaxZoomDistance = maxZoomDistance
Player.CameraMinZoomDistance = minZoomDistance
end
if currentCam and currentCam.CameraType ~= Enum.CameraType.Custom then
currentCam.CameraType = Enum.CameraType.Custom
end
end)
end
else
ToggleButton.Text = "MOUSE UNLOCK(K)"
ToggleButton.BackgroundColor3 = Color3.fromRGB(0, 150, 0)
ToggleButton.Modal = false
if renderConnection then
renderConnection:Disconnect()
renderConnection = nil
end
if currentCam then
currentCam.CameraType = Enum.CameraType.Custom
end
end
end
local function setMinimizeState(minimize)
isMinimized = minimize
if isMinimized then
FloatCircle.Position = UDim2.new(0, MainFrame.AbsolutePosition.X, 0, MainFrame.AbsolutePosition.Y)
MainFrame.Visible = false
FloatCircle.Visible = true
else
MainFrame.Position = UDim2.new(0, FloatCircle.AbsolutePosition.X, 0, FloatCircle.AbsolutePosition.Y)
FloatCircle.Visible = false
MainFrame.Visible = true
end
end
ToggleButton.MouseButton1Click:Connect(function()
setMouseAndCameraState(not isUnlocked)
end)
MiniButton.MouseButton1Click:Connect(function()
setMinimizeState(true)
end)
FloatCircle.MouseButton1Click:Connect(function()
setMinimizeState(false)
end)
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if input.KeyCode == Enum.KeyCode.K then
setMouseAndCameraState(not isUnlocked)
end
end)
CloseButton.MouseButton1Click:Connect(function()
setMouseAndCameraState(false)
task.wait(0.05)
ScreenGui:Destroy()
end)No comments yet for this script.



