Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
587
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. local ChamsFolder = Instance.new("Folder", game.CoreGui)
  2. local rs = game:GetService("RunService")
  3.  
  4. function transformToColor3(col) --Function to convert, just cuz c;
  5. local r = col.r --Red value
  6. local g = col.g --Green value
  7. local b = col.b --Blue value
  8. return Color3.new(r,g,b); --Color3 datatype, made of the RGB inputs
  9. end
  10.  
  11. rs.Heartbeat:Connect(function()
  12. local plrs = game.Players:GetChildren()
  13.  
  14. for i=1,#plrs do
  15. if workspace[plrs[i].Name]:FindFirstChild("Head") then
  16. if not ChamsFolder:FindFirstChild("Cham"..plrs[i].Name) then
  17. local Box = Instance.new("BoxHandleAdornment")
  18. Box.Size = Vector3.new(workspace[plrs[i].Name]:FindFirstChild("HumanoidRootPart").Size.X * 1.5, workspace[plrs[i].Name]:FindFirstChild("HumanoidRootPart").Size.Y * 2.5, workspace[plrs[i].Name]:FindFirstChild("HumanoidRootPart").Size.Z)
  19. Box.Name = "Cham"..plrs[i].Name
  20. Box.Adornee = workspace[plrs[i].Name]:FindFirstChild("Torso") or workspace[plrs[i].Name]:FindFirstChild("UpperTorso")
  21. Box.AlwaysOnTop = true
  22. Box.ZIndex = 5
  23. Box.Transparency = 0.5
  24. Box.Parent = ChamsFolder
  25. local assassin = workspace.assassin.pname.Value
  26. local target = workspace.target.pname.Value
  27. local color = "Bright blue"
  28. if plrs[i].Name == assassin then
  29. color = "Bright red"
  30. else
  31. if plrs[i].Name == target then
  32. color = "Bright green"
  33. else
  34. color = "Bright blue"
  35. end
  36. end
  37. Box.Color3 = transformToColor3(BrickColor.new(color))
  38. else
  39. ChamsFolder:FindFirstChild("Cham"..plrs[i].Name):Destroy()
  40. end
  41. end
  42. end
  43.  
  44.  
  45. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement