
KeylessUniversal

local player = game.Players.LocalPlayer
local screenGui = Instance.new("ScreenGui", player.PlayerGui)
local toggleButton = Instance.new("TextButton")
screenGui.ResetOnSpawn = false
toggleButton.Parent = screenGui
toggleButton.Size = UDim2.new(0, 30, 0, 30)
toggleButton.Position = UDim2.new(0.5, -30, 0.5, -30)
toggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
toggleButton.BackgroundTransparency = 0.5
toggleButton.Text = "×"
toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
toggleButton.Font = Enum.Font.SourceSansBold
toggleButton.TextSize = 10
toggleButton.AnchorPoint = Vector2.new(0.5, 0.5)
toggleButton.Draggable = true
local corner = Instance.new("UICorner", toggleButton)
corner.CornerRadius = UDim.new(1, 0)
local isEnabled = false
local function toggle()
isEnabled = not isEnabled
if isEnabled then
toggleButton.Text = "✓"
toggleButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
else
toggleButton.Text = "×"
toggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
end
end
toggleButton.MouseButton1Click:Connect(toggle)
local camera = workspace.CurrentCamera
local runService = game:GetService("RunService")
local function getNearestPlayer()
local nearestPlayer = nil
local nearestDistance = math.huge
for _, otherPlayer in pairs(game.Players:GetPlayers()) do
if otherPlayer ~= player and otherPlayer.Character and otherPlayer.Character:FindFirstChild("Head") then
local distance = (player.Character.Head.Position - otherPlayer.Character.Head.Position).magnitude
if distance < nearestDistance then
nearestDistance = distance
nearestPlayer = otherPlayer
end
end
end
return nearestPlayer
end
runService.RenderStepped:Connect(function()
if isEnabled then
local nearestPlayer = getNearestPlayer()
if nearestPlayer and nearestPlayer.Character and nearestPlayer.Character:FindFirstChild("Head") then
local headPosition = nearestPlayer.Character.Head.Position
local targetCFrame = CFrame.new(camera.CFrame.Position, headPosition)
camera.CFrame = camera.CFrame:Lerp(targetCFrame, 0.3)
end
end
end)No comments yet for this script.

![[KEYLESS] Moondiety Script | 17+ supported Games](https://scriptblox.com/images/sb/0-1753093706828.png)

