Universal Script 📌
7.8k Views
283 Executions

Camlock for npc and bot

Universal Script 📌
itzallqv2
itzallqv210K executions
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Camlock for npc & bot universal It will not work on player only bot and npc and it's laggy I don't know how to fix it Please sub to my yt https://youtube.com/@carlll_54321?si=TxsYG84iBlqLDY9X

View Raw
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
local RunService = game:GetService("RunService")
local StarterGui = game:GetService("StarterGui")
local UIS = game:GetService("UserInputService")

-- Notification
StarterGui:SetCore("SendNotification", {
    Title = "Camlock ON",
    Text = "Locking camera to NPC's Neck",
    Duration = 3
})

-- GUI
local screenGui = Instance.new("ScreenGui", game:GetService("CoreGui"))
screenGui.Name = "Camlock_GUI"

local button = Instance.new("TextButton")
button.Name = "CamlockToggle"
button.Size = UDim2.new(0, 150, 0, 50)
button.Position = UDim2.new(1, -155, 0.1, -25)  -- Button positioned at the top-right corner
button.BackgroundColor3 = Color3.new(0, 0, 0)
button.TextColor3 = Color3.new(1, 1, 1)
button.Text = "ᴄᴀᴍʟᴏᴄᴋ: ᴏɴ"
button.Font = Enum.Font.SourceSans
button.TextScaled = true
button.TextSize = 30
button.Parent = screenGui

local corner = Instance.new("UICorner", button)
corner.CornerRadius = UDim.new(0, 12)

-- Variables for dragging
local dragging = false
local dragInput, dragStart, startPos

-- Function to update the position of the button while dragging
local function update(input)
    local delta = input.Position - dragStart


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

More universal scripts

See all
Universal Script 📌
1.9k
429
Bumped 11 minutes ago
Script hub
1.5k
15.2k
Bumped 49 minutes ago
Key System
Universal Script 📌
26.3k
234.5k
Bumped 59 minutes ago
Universal Script 📌
24
6
Approved 2 hours ago
Universal Script 📌
56
10
Approved 3 hours ago