Advertisement
rekeno

Project Tear (XRAY VISION)

Sep 16th, 2019
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1.  
  2. local Boxes = { }
  3.  
  4. _G.TearXrayKeybind = Enum.KeyCode.F
  5.  
  6. local TransparencyValues = {}
  7.  
  8. function GS(Service)
  9. return game:GetService(Service)
  10. end
  11.  
  12. local RunService = GS("RunService")
  13. local UserInputService = GS("UserInputService")
  14.  
  15.  
  16. local InputBegan = UserInputService.InputBegan
  17. local InputEnded = UserInputService.InputEnded
  18.  
  19. InputBegan:connect(function(A, B)
  20. if A.KeyCode == _G.TearXrayKeybind then
  21. for I,V in next, Workspace:GetDescendants() do
  22. if V:IsA("BasePart") and not game.Players:GetPlayerFromCharacter(V.Parent) and not V.Parent:IsA("Hat") and not V.Parent:IsA("Accessory") then
  23. --YAY--
  24. local Data = { }
  25. Data[2] = V.Transparency
  26. V.Transparency = 0.75
  27. local SB = Instance.new("SelectionBox", V)
  28. table.insert(Boxes, V)
  29. SB.Name = "Xray"
  30. SB.Color3 = Color3.fromRGB(98, 37, 209)
  31. SB.SurfaceColor3 = Color3.new(0,1,0)
  32. SB.LineThickness = 0.01
  33. table.insert(TransparencyValues, SB.Transparency)
  34. SB.Transparency = 0.45
  35. SB.Adornee = V
  36. Data[1] = SB
  37. rawset(Boxes, V, Data)
  38. --YAY--
  39. end
  40. end
  41. end
  42. end)
  43.  
  44. InputEnded:connect(function(V, I)
  45. if V.KeyCode == _G.TearXrayKeybind then
  46. for i,v in pairs(Boxes) do
  47. if type(v) == 'table' then -- v is data
  48. if v[1].Parent:IsA("BasePart") then
  49. v[1].Parent.Transparency = tonumber(v[2])
  50. v[1]:Destroy()
  51. end
  52. end
  53. --if v.Xray then
  54. -- v.Xray:Destroy()
  55. --else
  56. --return
  57. --end
  58. end
  59. end
  60. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement