
KeylessUniversal

-- 1. DESTROY EXISTING GUI IF RE-EXECUTED
local oldGui = game:GetService("CoreGui"):FindFirstChild("DeltaCameraFreezeGui") or game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("DeltaCameraFreezeGui")
if oldGui then oldGui:Destroy() end
-- 2. SETUP SERVICES
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local targetParent = game:GetService("CoreGui") or player:WaitForChild("PlayerGui")
-- 3. CREATE INTERFACE
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "DeltaCameraFreezeGui"
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = targetParent
local button = Instance.new("TextButton")
button.Name = "FreezeButton"
button.Size = UDim2.new(0, 160, 0, 50)
button.Position = UDim2.new(0.5, -80, 0.2, 0)
button.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
button.Text = "Freeze Camera"
button.TextColor3 = Color3.fromRGB(255, 255, 255)
button.Font = Enum.Font.SourceSansBold
button.TextSize = 18
button.BorderSizePixel = 0
button.ZIndex = 10
button.Parent = ScreenGui
local UICorner = Instance.new("UICorner")
UICorner.CornerRadius = UDim.new(0, 8)
UICorner.Parent = button
local UIStroke = Instance.new("UIStroke")
UIStroke.Color = Color3.fromRGB(0, 255, 150)
UIStroke.Thickness = 2
UIStroke.Parent = button
-- 4. HARD-LOCK CAMERA LOGIC WITH PERMANENT BUTTON
local isFrozen = false
local frozenCFrame = nil
local cameraLoop = nil
local function unfreezeCamera()
isFrozen = false
if cameraLoop then
cameraLoop:Disconnect()
cameraLoop = nil
end
camera.CameraType = Enum.CameraType.Custom
button.Text = "Freeze Camera"
UIStroke.Color = Color3.fromRGB(0, 255, 150) -- Changes border back to Green
end
local function freezeCamera()
isFrozen = true
frozenCFrame = camera.CFrame -- Capture current camera angle
button.Text = "Unfreeze Camera"
UIStroke.Color = Color3.fromRGB(255, 50, 50) -- Changes border to Red so you know it's locked
-- Force-locks the camera position on every single frame loop
cameraLoop = RunService.RenderStepped:Connect(function()
if isFrozen then
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = frozenCFrame
end
end)
end
-- Primary tap interaction
button.MouseButton1Click:Connect(function()
if not isFrozen then
freezeCamera()
else
unfreezeCamera()
end
end)
-- 5. EXECUTOR-FRIENDLY DRAGGING LOGIC
local dragging = false
local dragInput, dragStart, startPos
button.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch 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)
button.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
dragInput = input
end
end)
UserInputService.InputChanged:Connect(function(input)
if input == dragInput and 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)No comments yet for this script.



