---
title: "LockOn | Universal Roblox Script - ScriptBlox"
description: "LockOn for any Roblox game: Lock and M1 reset"
canonical_url: "https://scriptblox.com/script/Universal-Script-LockOn-193722"
meta:
  "og:description": "LockOn for any Roblox game: Lock and M1 reset"
  "og:image": "https://scriptblox.com/images/script/0-1775583664915.jpg"
  "og:title": "LockOn | Universal Roblox Script - ScriptBlox"
  "twitter:description": "LockOn for any Roblox game: Lock and M1 reset"
  "twitter:image": "https://scriptblox.com/images/script/0-1775583664915.jpg"
  "twitter:title": "LockOn | Universal Roblox Script - ScriptBlox"
---

> Index of every page on this site: [llms.txt](https://scriptblox.com/llms.txt)

![Universal Script 📌](https://scriptblox.com/images/script/0-1775583664915.jpg)

# **LockOn**

[**Universal Script 📌**](https://scriptblox.com/game/universal)**![Mmiyu](https://scriptblox.com/images/user-default.webp) [Mmiyu](https://scriptblox.com/u/Mmiyu)First script**

8 months ago

[**Get an executor**](https://scriptblox.com/executors?kind=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

Lock and M1 reset

[View Raw](https://scriptblox.com/raw/Universal-Script-LockOn-193722)

```
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Stats = game:GetService("Stats")

local player = Players.LocalPlayer

local LOCK_ON_RANGE = math.huge
local PREDICTION_TIME = 0.7
local UPDATE_INTERVAL = 0
local TURN_SPEED = 0


local lockedTarget = nil
local isLockedOn = false
local lockOnIndicator = nil
local lockOnToggle = nil
local lastUpdate = 0
local screenGui = nil
local connection = nil

local function createLockOnIndicator()
    local indicator = Instance.new("Part")
    indicator.Name = "LockOnIndicator"
    indicator.Size = Vector3.new(1.5, 1.5, 1.5)
    indicator.Shape = Enum.PartType.Ball
    indicator.Material = Enum.Material.Neon
    indicator.Color = Color3.new(0, 0, 0)
    indicator.Anchored = true
    indicator.CanCollide = false
    indicator.Transparency = 1
    indicator.Parent = workspace
    return indicator
end

local function createToggleButton()
    screenGui = Instance.new("ScreenGui")
    screenGui.Name = "LockOnUI"
    screenGui.Parent = player:WaitForChild("PlayerGui", 5)
    


```

## **Comments **

**0**

Log in to join the conversation. [**Login **](https://scriptblox.com/login?redirect=/script/Universal-Script-LockOn-193722)

No comments yet. Be the first!

```json
{"@context":"https://schema.org","@type":"SoftwareSourceCode","@id":"https://scriptblox.com/script/Universal-Script-LockOn-193722#script","url":"https://scriptblox.com/script/Universal-Script-LockOn-193722","name":"LockOn","programmingLanguage":"Lua","runtimePlatform":"Roblox","author":{"@type":"Person","name":"Mmiyu","url":"https://scriptblox.com/u/Mmiyu"},"datePublished":"2026-04-07T17:41:04.926Z","image":"https://scriptblox.com/images/script/0-1775583664915.jpg","isAccessibleForFree":true}
```

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://scriptblox.com/#website","@type":"WebSite","description":"Search free Roblox scripts uploaded by the community, with live status for every major executor. Browse by game, copy the loadstring and run it in your executor.","inLanguage":"en","name":"ScriptBlox","url":"https://scriptblox.com/"},{"@id":"https://scriptblox.com/script/Universal-Script-LockOn-193722#webpage","@type":"WebPage","description":"LockOn for any Roblox game: Lock and M1 reset","name":"LockOn | Universal Roblox Script - ScriptBlox","url":"https://scriptblox.com/script/Universal-Script-LockOn-193722","breadcrumb":{"@id":"https://scriptblox.com/script/Universal-Script-LockOn-193722#breadcrumb"},"isPartOf":{"@id":"https://scriptblox.com/#website"},"mainEntity":{"@id":"https://scriptblox.com/script/Universal-Script-LockOn-193722#script"},"potentialAction":[{"@type":"ReadAction","target":["https://scriptblox.com/script/Universal-Script-LockOn-193722"]}]},{"@id":"https://scriptblox.com/script/Universal-Script-LockOn-193722#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://scriptblox.com","position":1},{"@type":"ListItem","name":"Universal","item":"https://scriptblox.com/game/universal","position":2},{"@type":"ListItem","name":"LockOn","position":3}]}]}
```

## Sitemap

See the full [sitemap](https://scriptblox.com/sitemap.md) for all pages.
