
1.7k Views
75.6k Executions
dark texture
10K executions
Universal Script 📌
styear100K executions
7 months ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Dark texture
local Players = game:GetService("Players")
local darkfactor = 0.3
local function darkenColor(color: Color3, factor: number)
local h, s, v = Color3.toHSV(color)
v = math.clamp(v * factor, 0, 1)
return Color3.fromHSV(h, s, v)
end
local function isPlayerCharacter(part: Instance)
local model = part:FindFirstAncestorOfClass("Model")
if model then
return Players:GetPlayerFromCharacter(model) ~= nil
end
return false
end
local function isTool(part: Instance)
return part:FindFirstAncestorOfClass("Tool") ~= nil
end
local function processPart(part: BasePart)
if not part or not part:IsDescendantOf(workspace) then return end
if isPlayerCharacter(part) then return end
if isTool(part) then return end
if part.Name == "HumanoidRootPart" then return end
part.Color = darkenColor(part.Color, darkfactor)
end
for _, obj in ipairs(workspace:GetDescendants()) do
if obj:IsA("BasePart") then
processPart(obj)
end
end
workspace.DescendantAdded:Connect(function(obj)
if obj:IsA("BasePart") then
task.wait()
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!
