
1.5k Views
341 Executions
Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
X - TOGGLE OFF/ON Yeah straight up Xray, the script isnt too hard to make though, Dont forget to like!
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local workspace = game:GetService("Workspace")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local MAX_TRANSPARENCY = 0.9
local MIN_TRANSPARENCY = 0.0
local RADIUS = 50
local xrayEnabled = true
local function isPlayerPart(part)
local character = part:FindFirstAncestorOfClass("Model")
if character and character:FindFirstChildOfClass("Humanoid") then
return true
end
return false
end
local xrayParts = {}
local function addPart(part)
if part:IsA("BasePart") and not isPlayerPart(part) then
table.insert(xrayParts, part)
end
end
for _, part in ipairs(workspace:GetDescendants()) do
addPart(part)
end
workspace.DescendantAdded:Connect(addPart)
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.X then
xrayEnabled = not xrayEnabled
end
end)
RunService.RenderStepped:Connect(function()
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







