Advertisement
NitidezOficial

Roblox ESP Script By Nitidez

Feb 2nd, 2019
47,878
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. -- Made by Nitidez Games
  2. -- Have fun ._. !!!
  3.  
  4. local localPlayer=game.Players.LocalPlayer
  5.  
  6. function highlightModel(objObject)
  7. for i,v in pairs(objObject:children())do
  8. if v:IsA'BasePart'and v.Name~='HumanoidRootPart'then
  9. local bHA=Instance.new('BoxHandleAdornment',v)
  10. bHA.Adornee=v
  11. bHA.Size= v.Name=='Head' and Vector3.new(1.25,1.25,1.25) or v.Size
  12. bHA.Color3=v.Name=='Head'and Color3.new(1,0,0)or v.Name=='Torso'and Color3.new(0,1,0)or Color3.new(0,0,1)
  13. bHA.Transparency=.5
  14. bHA.ZIndex=1
  15. bHA.AlwaysOnTop=true
  16. end
  17. if #v:children()>0 then
  18. highlightModel(v)
  19. end
  20. end
  21. end
  22.  
  23. function unHighlightModel(objObject)
  24. for i,v in pairs(objObject:children())do
  25. if v:IsA'BasePart' and v:findFirstChild'BoxHandleAdornment' then
  26. v.BoxHandleAdornment:Destroy()
  27. end
  28. if #v:children()>0 then
  29. unHighlightModel(v)
  30. end
  31. end
  32. end
  33.  
  34. function sortTeamHighlights(objPlayer)
  35. repeat wait() until objPlayer.Character
  36. if objPlayer.TeamColor~=localPlayer.TeamColor then
  37. highlightModel(objPlayer.Character)
  38. else
  39. unHighlightModel(objPlayer.Character)
  40. end
  41. if objPlayer~=localPlayer then
  42. objPlayer.Changed:connect(function(strProp)
  43. if strProp=='TeamColor'then
  44. if objPlayer.TeamColor~=localPlayer.TeamColor then
  45. unHighlightModel(objPlayer.Character)
  46. highlightModel(objPlayer.Character)
  47. else
  48. unHighlightModel(objPlayer.Character)
  49. end
  50. end
  51. end)
  52. else
  53. objPlayer.Changed:connect(function(strProp)
  54. if strProp=='TeamColor'then
  55. wait(.5)
  56. for i,v in pairs(game.Players:GetPlayers())do
  57. unHighlightModel(v)
  58. if v.TeamColor~=localPlayer.TeamColor then
  59. highlightModel(v.Character)
  60. end
  61. end
  62. end
  63. end)
  64. end
  65. end
  66.  
  67. for i,v in pairs(game.Players:GetPlayers())do
  68. v.CharacterAdded:connect(function()
  69. sortTeamHighlights(v)
  70. end)
  71. sortTeamHighlights(v)
  72. end
  73. game.Players.PlayerAdded:connect(function(objPlayer)
  74. objPlayer.CharacterAdded:connect(function(objChar)
  75. sortTeamHighlights(objPlayer)
  76. end)
  77. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement