Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ChamsFolder = Instance.new("Folder", game.CoreGui)
- local rs = game:GetService("RunService")
- function transformToColor3(col) --Function to convert, just cuz c;
- local r = col.r --Red value
- local g = col.g --Green value
- local b = col.b --Blue value
- return Color3.new(r,g,b); --Color3 datatype, made of the RGB inputs
- end
- rs.Heartbeat:Connect(function()
- local plrs = game.Players:GetChildren()
- for i=1,#plrs do
- if workspace[plrs[i].Name]:FindFirstChild("Head") then
- if not ChamsFolder:FindFirstChild("Cham"..plrs[i].Name) then
- local Box = Instance.new("BoxHandleAdornment")
- 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)
- Box.Name = "Cham"..plrs[i].Name
- Box.Adornee = workspace[plrs[i].Name]:FindFirstChild("Torso") or workspace[plrs[i].Name]:FindFirstChild("UpperTorso")
- Box.AlwaysOnTop = true
- Box.ZIndex = 5
- Box.Transparency = 0.5
- Box.Parent = ChamsFolder
- local assassin = workspace.assassin.pname.Value
- local target = workspace.target.pname.Value
- local color = "Bright blue"
- if plrs[i].Name == assassin then
- color = "Bright red"
- else
- if plrs[i].Name == target then
- color = "Bright green"
- else
- color = "Bright blue"
- end
- end
- Box.Color3 = transformToColor3(BrickColor.new(color))
- else
- ChamsFolder:FindFirstChild("Cham"..plrs[i].Name):Destroy()
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement