Universal Script πŸ“Œ
620 Views
308 Executions

aimlock

Universal Script πŸ“Œ
SodaAlexander
SodaAlexanderPublished 10
11 months 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

aimlock

View Raw
if not game:GetService("RunService"):IsClient() then return end

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Camera = workspace.CurrentCamera

local LocalPlayer = Players.LocalPlayer
local AimLockEnabled = false
local PredictEnabled = false
local AimPlayers = false -- false = NPC/Bot, true = Player
local LockedPart = nil

local Settings = {
	BulletSpeed = 350,
	MaxDistance = 450
}

-- =================== UTILS ===================
local function isPlayerCharacter(model)
	return Players:GetPlayerFromCharacter(model) ~= nil
end

local rayParams = RaycastParams.new()
rayParams.FilterType = Enum.RaycastFilterType.Blacklist

local function isVisible(part)
	rayParams.FilterDescendantsInstances = {LocalPlayer.Character}
	local origin = Camera.CFrame.Position
	local direction = part.Position - origin
	local result = workspace:Raycast(origin, direction, rayParams)
	return result and result.Instance:IsDescendantOf(part.Parent)
end

local function getAimParts(model)
	local parts = {}
	local head = model:FindFirstChild("Head")
	if head then table.insert(parts, head) end
	local torso = model:FindFirstChild("UpperTorso")
		or model:FindFirstChild("Torso")


Comments

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

More universal scripts

See all
Script hub
33.2k
298.5k
Bumped 3 hours ago
Script hub
23.7k
5.2k
Bumped 3 hours ago
Key System
Paid
High QualityΒ Offering
Universal Script πŸ“Œ
251
772
Bumped 3 hours ago
Universal Script πŸ“Œ
1.7k
31.0k
Bumped 3 hours ago
Script hub
4.1M
559.5k
Bumped 4 hours ago
Key System

Script hub

Hall of Fame #3

Verified script badgeOverflow 35 Supported Games

Script hub
5.5k
29.2k
Bumped 5 hours ago
Key System