-- [[ Rscripts Risk Notice ]] -- This script is not verified by rscripts.net. Deal with caution. -- -- Stay safe: -- • Never log in on unofficial Roblox sites or lookalike domains. -- • Real Roblox links use roblox.com (check the .com ending). -- • Treat fake Roblox login / "claim reward" pages as phishing. -- [[ End Rscripts Risk Notice ]] Color = color, Material = Enum.Material.SmoothPlastic, }) end local environmentSample = sample(Enum.PartType.Block, Vector3.new(-1.4, 0, 0), Vector3.new(1.8, 1.8, 1.8), Color3.fromRGB(85, 172, 238)) local avatarSample = sample(Enum.PartType.Ball, Vector3.new(1.35, 0, 0), Vector3.new(1.9, 1.9, 1.9), Color3.fromRGB(234, 157, 92)) local bloom = create("BloomEffect", Workspace.CurrentCamera, { Name = "GlossyDemoBloom", Enabled = false, Intensity = 0.55, Size = 24, Threshold = 0.85, }) local connections = {} local characterConnections = {} local saved = {} local alive, queued = true, false local partsOn, avatarsOn = false, false local function connect(signal, handler) local connection = signal:Connect(handler) table.insert(connections, connection) return connection end local function restore(part, original) -- Jeśli inny lokalny system zmienił właściwość podczas demonstracji, -- zachowaj jego nowszą wartość. if part.Reflectance == original.applied then part.Reflectance = original.reflectance end end local function refreshGloss() local desired = {} local avatarParts = {} -- Części postaci mają pierwszeństwo przed tagiem otoczenia. if avatarsOn or partsOn then for other in pairs(characterConnections) do local character = other.Character if character and character:IsDescendantOf(Workspace) then for _, descendant in ipairs(character:GetDescendants()) do if descendant:IsA("BasePart") then avatarParts[descendant] = true end end end end end if avatarsOn then desired[avatarSample] = 0.4 for part in pairs(avatarParts) do if part.Transparency < 1 then desired[part] = 0.4 end end end if partsOn then desired[environmentSample] = 0.55 for _, part in ipairs(Tags:GetTagged(TAG)) do if part:IsA("BasePart") and part:IsDescendantOf(Workspace) and not avatarParts[part] then desired[part] = 0.55 end end end -- Zapisujemy wartość po raz pierwszy, a po wyłączeniu odzyskujemy ją. -- Materiałów, map PBR i tekstur nie podmieniamy. for part, original in pairs(saved) do if not desired[part] then restore(part, original) saved[part] = nil end end for part, strength in pairs(desired) do local original = saved[part] if not original then original = { reflectance = part.Reflectance } saved[part] = original end if original.strength ~= strength then original.strength = strength part.Reflectance = strength original.applied = part.Reflectance end end end local function queueRefresh() if queued or not (partsOn or avatarsOn) then return end queued = true task.defer(function() queued = false if alive then refreshGloss() end end) end local function untrackPlayer(other) local state = characterConnections[other] if not state then return end for _, connection in ipairs(state.player) do connection:Disconnect() end for _, connection in ipairs(state.character) do connection:Disconnect() end characterConnections[other] = nil end local function trackPlayer(other) if characterConnections[other] then return end local state = { player = {}, character = {} } characterConnections[other] = state local function trackCharacter() for _, connection in ipairs(state.character) do connection:Disconnect() end table.clear(state.character) local character = other.Character if character then state.character = { character.DescendantAdded:Connect(queueRefresh), character.DescendantRemoving:Connect(queueRefresh), character.AncestryChanged:Connect(queueRefresh), } end queueRefresh() end state.player = { other:GetPropertyChangedSignal("Character"):Connect(trackCharacter) } trackCharacter() end connect(Players.PlayerAdded, trackPlayer) connect(Players.PlayerRemoving, function(other) untrackPlayer(other) queueRefresh() end) for _, other in ipairs(Players:GetPlayers()) do trackPlayer(other) end connect(Tags:GetInstanceAddedSignal(TAG), queueRefresh) connect(Tags:GetInstanceRemovedSignal(TAG), queueRefresh) local function refreshTagged(instance) if partsOn and instance:IsA("BasePart") and Tags:HasTag(instance, TAG) then queueRefresh() end end connect(Workspace.DescendantAdded, refreshTagged) connect(Workspace.DescendantRemoving, refreshTagged) connect(Workspace:GetPropertyChangedSignal("CurrentCamera"), function() bloom.Parent = Workspace.CurrentCamera end)