Universal Script – X ray - Verified script for Universal Roblox
Key RequiredUniversal

Universal Script – X ray

Universal ScriptFrostYtFrostYt 90.4K views 5.3K executesUpdated Jul 31, 2024
Unrated
00
Lua Script•93 lines (2809 chars)
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")

-- Create ScreenGui
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = PlayerGui

-- Create Frame
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 150)
frame.Position = UDim2.new(0.5, -100, 0.5, -75)
frame.BackgroundTransparency = 0.5
frame.BackgroundColor3 = Color3.new(0, 0, 0)
frame.Draggable = true
frame.Active = true
frame.Visible = false -- Initially hidden
frame.Parent = screenGui

-- Create X-Ray Button
local xrayButton = Instance.new("TextButton")
xrayButton.Size = UDim2.new(0, 180, 0, 50)
xrayButton.Position = UDim2.new(0, 10, 0, 25)
xrayButton.BackgroundColor3 = Color3.new(1, 0, 0)
xrayButton.Text = "Enable X-Ray"
xrayButton.Parent = frame

-- Create Disable X-Ray Button
local disableXrayButton = Instance.new("TextButton")
disableXrayButton.Size = UDim2.new(0, 180, 0, 50)
disableXrayButton.Position = UDim2.new(0, 10, 0, 85)
disableXrayButton.BackgroundColor3 = Color3.new(0, 1, 0)
disableXrayButton.Text = "Disable X-Ray"
disableXrayButton.Parent = frame

-- Create Open/Close Button
local toggleGuiButton = Instance.new("TextButton")
toggleGuiButton.Size = UDim2.new(0, 100, 0, 50)
toggleGuiButton.Position = UDim2.new(0, 10, 0, 10)
toggleGuiButton.BackgroundColor3 = Color3.new(0, 1, 0)
toggleGuiButton.Text = "Open GUI"
toggleGuiButton.Parent = screenGui

local highlights = {}

local function highlightPlayers()
    for _, player in pairs(Players:GetPlayers()) do
        if player ~= LocalPlayer then
            local character = player.Character
            if character then
                local highlight = Instance.new("Highlight")
                highlight.Adornee = character
                highlight.FillTransparency = 1
                highlight.OutlineTransparency = 0
                highlight.OutlineColor = Color3.new(1, 0, 0)
                highlight.Parent = character
                table.insert(highlights, highlight)
            end
        end
    end
end

local function removeHighlights()
    for _, highlight in pairs(highlights) do
        if highlight then
            highlight:Destroy()
        end
    end
    highlights = {}
end

local function toggleGui()
    frame.Visible = not frame.Visible
    if frame.Visible then
        toggleGuiButton.Text = "Close GUI"
    else
        toggleGuiButton.Text = "Open GUI"
    end
end

xrayButton.MouseButton1Click:Connect(function()
    highlightPlayers()
    xrayButton.Visible = false
    disableXrayButton.Visible = true
end)

disableXrayButton.MouseButton1Click:Connect(function()
    removeHighlights()
    xrayButton.Visible = true
    disableXrayButton.Visible = false
end)

toggleGuiButton.MouseButton1Click:Connect(toggleGui)

How to Execute Universal Script – X ray

Step 1: Copy Code: Click the Copy Code button in the viewer above to grab the clean Lua loadstring.

Step 2: Launch Executor: Open a compatible, unpatched executor. If you need one, check our Roblox Executors Directory.

Step 3: Join Experience: Launch Roblox and join Universal Script.

Step 4: Attach & Run: Attach/inject your executor into the Roblox process, paste the code into the script tab, and press Execute.

Created By

FrostYt
FrostYt
Script Creator
View Author Profile

Features & Information

Execute Universal Script – X ray. Key system required, created by FrostYt, updated Jul 31, 2024. Tested and working on supported executors.

Script Changelog (1)

@FrostYtMar 28, 2025

Create script

Community Comments (5)

exzyexzyJul 31, 2024(edited)

just use esp..

loraxloraxJul 31, 2024(edited)

hey thats me in the thumbnail, W thumbnail fr

FrostYtFrostYtJul 31, 2024(edited)

YES IT WAS ME

KaGa999KaGa999Jul 31, 2024(edited)

Yo

pomirkomukuta342pomirkomukuta342Jul 31, 2024(edited)

BRO I SAW YOU 5 MIN AGO IF I CAN TAKE THIS GUY ON THUMBNAIL CUZ HE GOT COOL OUTFIT BRO I SAW U ASKING HIM

Frequently Asked Questions

How do I execute Universal Script – X ray in Roblox?

To run Universal Script – X ray, copy the Lua loadstring from the code viewer above, launch Roblox and join Universal Script, attach a working executor (such as Potassium, Solara, or Delta from our Executors directory), paste the code into your executor console, and click Execute.

Is Universal Script – X ray keyless or does it require an access key?

Universal Script – X ray requires an access key. You can retrieve the official key directly using the Get Script Key link provided above.

Is Universal Script – X ray currently safe and working?

This script is active and operational. Always test scripts using a secondary (alt) Roblox account to safeguard your main profile against anti-cheat bans.