Universal Script 📌
550 Views
24 Executions

Script Verified SOURCE | RaycastDebug

Universal Script 📌
binary
binary
Verified Badge
Verified User
100 followers
8 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

a function used for debugging raycasts, useful for silent aims

View Raw
local Players = game:GetService("Players")
local WorkspaceService = game:GetService("Workspace")
local LocalPlayer = Players.LocalPlayer

local Separator = string.rep("=", 60)
local LogLimit = 50
local LogCount = 0

warn("\n" .. Separator)
warn("  RAYCAST DEBUGGER")
warn("  Logging next " .. LogLimit .. " raycasts from your character")
warn(Separator .. "\n")

local function GetCallerInfo()
    local Info = debug.info(4, "sln")
    if Info then
        return tostring(Info)
    end
    return "Unknown"
end

local function FormatVector(Vec)
    if typeof(Vec) ~= "Vector3" then
        return tostring(Vec)
    end
    return string.format("(%.1f, %.1f, %.1f)", Vec.X, Vec.Y, Vec.Z)
end

local OldNamecall
OldNamecall = hookmetamethod(game, "__namecall", newcclosure(function(Self, ...)
    local Method = getnamecallmethod()

    if Method == "Raycast" and Self == WorkspaceService then
        local Origin, Direction, Params = ...
        if typeof(Origin) == "Vector3" and typeof(Direction) == "Vector3" then
            local Character = LocalPlayer.Character
            local Head = Character and Character:FindFirstChild("Head")
            local HeadDist = Head and (Origin - Head.Position).Magnitude or -1

            if HeadDist < 10 or HeadDist == -1 then


Comments

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

More universal scripts

See all
Script hub
12.8k
82.2k
Bumped 5 hours ago
Script hub
35.1k
8.1k
Bumped 7 hours ago
Key System
Paid
Script hub
1.3M
356.4k
Bumped 9 hours ago
Key System

Script hub

#1 today

Verified script badgeAxonic Hub | 45 + Games Supported

Script hub
438.7k
859.8k
Bumped 10 hours ago
Key System

Script hub

Hall of Fame #5

Verified script badgeRonix Hub | 71 Supported Games + OP!

Universal Script 📌
6.7k
10.5k
Bumped 11 hours ago