Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Boxes = { }
- _G.TearXrayKeybind = Enum.KeyCode.F
- local TransparencyValues = {}
- function GS(Service)
- return game:GetService(Service)
- end
- local RunService = GS("RunService")
- local UserInputService = GS("UserInputService")
- local InputBegan = UserInputService.InputBegan
- local InputEnded = UserInputService.InputEnded
- InputBegan:connect(function(A, B)
- if A.KeyCode == _G.TearXrayKeybind then
- for I,V in next, Workspace:GetDescendants() do
- if V:IsA("BasePart") and not game.Players:GetPlayerFromCharacter(V.Parent) and not V.Parent:IsA("Hat") and not V.Parent:IsA("Accessory") then
- --YAY--
- local Data = { }
- Data[2] = V.Transparency
- V.Transparency = 0.75
- local SB = Instance.new("SelectionBox", V)
- table.insert(Boxes, V)
- SB.Name = "Xray"
- SB.Color3 = Color3.fromRGB(98, 37, 209)
- SB.SurfaceColor3 = Color3.new(0,1,0)
- SB.LineThickness = 0.01
- table.insert(TransparencyValues, SB.Transparency)
- SB.Transparency = 0.45
- SB.Adornee = V
- Data[1] = SB
- rawset(Boxes, V, Data)
- --YAY--
- end
- end
- end
- end)
- InputEnded:connect(function(V, I)
- if V.KeyCode == _G.TearXrayKeybind then
- for i,v in pairs(Boxes) do
- if type(v) == 'table' then -- v is data
- if v[1].Parent:IsA("BasePart") then
- v[1].Parent.Transparency = tonumber(v[2])
- v[1]:Destroy()
- end
- end
- --if v.Xray then
- -- v.Xray:Destroy()
- --else
- --return
- --end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement