
KeylessUniversal

--[[
RTX Upgrade V2 (Author Priority Edition)
1. 尊重原著:优先使用游戏作者的 SunRays、颜色和亮度设置。
2. 智能补全:若作者关闭了影子或光芒,脚本才强制开启。
3. 极速同步:手电筒与动态光依旧保持 RenderStepped 高频追踪。
4. 画质锁定:维持 Quality Level 17 以确保 Future 模式生效。
]]
local Lighting = game:GetService("Lighting")
local RunService = game:GetService("RunService")
local CollectionService = game:GetService("CollectionService")
local StarterGui = game:GetService("StarterGui")
-- 标记
local SHADOW_TAG = "RTX_V2_PRIORITY"
local ORIGINAL_TAG = "RTX_V2_SOURCE_SILENCED"
-- --- 1. 原生英文通知 ---
local function SendNotification()
pcall(function()
StarterGui:SetCore("SendNotification", {
Title = "RTX Upgrade V2",
Text = "This script does not support ARM7 phones. Please use a mid-to-high-end phone (64-bit processor).",
Duration = 6;
})
end)
end
-- --- 2. 智能环境维护 (尊重作者设置) ---
local function MaintainEnvironment()
-- 技术栈锁定:必须是 Future 才能实现高级阴影
if Lighting.Technology ~= Enum.Technology.Future then
Lighting.Technology = Enum.Technology.Future
end
-- 太阳影子:作者关了我们就开,开了就不动
if not Lighting.GlobalShadows then
Lighting.GlobalShadows = true
end
-- 太阳光芒 (SunRays):
local sunRays = Lighting:FindFirstChildOfClass("SunRaysEffect")
if sunRays then
if not sunRays.Enabled then sunRays.Enabled = true end
-- 护眼兜底:仅当作者设置极其离谱时微调
if sunRays.Intensity > 0.15 then sunRays.Intensity = 0.1 end
else
-- 作者没做,我们才加
local newRays = Instance.new("SunRaysEffect")
newRays.Intensity = 0.05
newRays.Spread = 0.5
newRays.Parent = Lighting
end
-- 自动画质 7 格
pcall(function()
if settings().Rendering.QualityLevel ~= Enum.QualityLevel.Level17 then
settings().Rendering.QualityLevel = Enum.QualityLevel.Level17
end
end)
end
-- --- 3. 核心:光源同步 (支持本地/作者手电筒) ---
local function ProcessLight(original)
if not original:IsA("Light") then return end
if original:GetAttribute(SHADOW_TAG) or CollectionService:HasTag(original, ORIGINAL_TAG) then
return
end
-- 创建副本:继承作者的所有属性 (Color, Range, Angle, etc.)
local futureLight = original:Clone()
futureLight:ClearAllChildren()
futureLight.Name = original.Name .. "_RTX_Enhanced"
futureLight.Shadows = true -- 强制开启影子(核心需求)
futureLight:SetAttribute(SHADOW_TAG, true)
local isSpot = original:IsA("SpotLight")
local isSurface = original:IsA("SurfaceLight")
-- 极速同步轨道
local conn
conn = RunService.RenderStepped:Connect(function()
if not original or not original.Parent then
futureLight:Destroy()
conn:Disconnect()
return
end
-- 状态优先级同步
futureLight.Enabled = original.Enabled
if not futureLight.Enabled then return end
-- 实时继承作者修改的属性
futureLight.Range = original.Range
futureLight.Color = original.Color
if isSpot then
futureLight.Angle = original.Angle
futureLight.Face = original.Face
elseif isSurface then
futureLight.Face = original.Face
end
-- 零亮度重叠逻辑 (由副本接管作者的亮度)
if original.Brightness ~= 0 then
futureLight.Brightness = original.Brightness
original.Brightness = 0
end
end)
CollectionService:AddTag(original, ORIGINAL_TAG)
futureLight.Parent = original.Parent
end
-- --- 4. 自动化运行 ---
local function Scan()
for _, obj in ipairs(game:GetDescendants()) do
if obj:IsA("Light") then
ProcessLight(obj)
end
end
end
game.DescendantAdded:Connect(function(obj)
if obj:IsA("Light") then
task.defer(ProcessLight, obj)
end
end)
-- 启动
SendNotification()
RunService.RenderStepped:Connect(MaintainEnvironment)
Scan()
-- 冗余扫描
task.spawn(function()
while true do
Scan()
task.wait(1.8)
end
end)
print("RTX Upgrade V2: Running.")



Hi, Wanna work on GM UI? U can share your scripts in there to potentially create a powerful Games Focused which create- us a better conmection :]
worst