Run it
Copy the script and paste it into your executor.
.()
lights = {}
TRASH = {}
lumens = {}
sundir = .Lighting:()
().gi =
().intensity =
().suncolor = .(,,)
().glow =
().lglow =
().polight =
().splight =
().sulight =
brightlimit = {Min = , Max = }
rangelimit = {Min = , Max = }
().raymult =
oldfograte = fograte
.Lighting.LightingChanged:(()
sundir = .Lighting:()
)
fogtimer =
()
fogenabled ==
fogtimer =
(Way: enum,Cframe: cframe)
Way == .NormalId.Back -Cframe.LookVector
Way == .NormalId.Front Cframe.LookVector
Way == .NormalId.Left -Cframe.RightVector
Way == .NormalId.Right Cframe.RightVector
Way == .NormalId.Top Cframe.UpVector
Way == .NormalId.Bottom -Cframe.UpVector
(part)
part:()
part.Transparency > part.CastShadow ==
(orig,direction,dt)
params = RaycastParams.()
params.FilterType = .RaycastFilterType.Exclude
params.FilterDescendantsInstances = {.Players.LocalPlayer.Character}
ray = .Workspace:(orig,direction*,params)
ray
col =
bright =
passes =
islava =
ray.Instance:()
col = .Workspace.Terrain:(ray.Material)
ray.Material == .Material.CrackedLava lglow ==
passes =
bright = intensity
islava =
ray.Instance:()
col = ray.Instance.Color
ray.Material == .Material.Neon glow ==
passes =
bright = intensity
islight =
baselight =
mainlight =
passes == gi ==
sunray = .Workspace:(ray.Position+ray.Normal*,sundir*,params)
sunray
bright = intensity
col = .(col.R*suncolor.R,col.G*suncolor.G,col.B*suncolor.B)
check = (sunray.Instance)
check
bright = intensity
col = .(col.R*sunray.Instance.Color.R*suncolor.R,col.G*sunray.Instance.Color.G*suncolor.G,col.B*sunray.Instance.Color.B*suncolor.B)
_, light lights
light
p = light.Parent
((light:() polight == ) (light:() splight == ) (light:() sulight == )) p
light.Enabled ==
b = light.Parent
b:()
b = b.Parent.Parent
pos =
cf =
pass =
p:()
pass =
pos = p.Position
cf = p.CFrame
p:()
pass =
pos = p.WorldPosition
cf = p.WorldCFrame
mag = (pos-ray.Position).Magnitude
mag <= light.Range pass ==
checked =
light.Shadows ==
checked =
ray = .Workspace:(ray.Position+ray.Normal*,(pos-(ray.Position+ray.Normal*))*,params)
ray
ray.Instance == b
checked =
checked ==
light:()
checked =
spotlightToPoint = (ray.Position-pos).Unit
dir = cf.LookVector
light.Face ==
dir = cf.LookVector
light.Face ==
dir = -cf.LookVector
light.Face ==
dir = cf.RightVector
light.Face ==
dir = -cf.RightVector
light.Face ==
dir = cf.UpVector
light.Face ==
dir = -cf.UpVector
dotproduct = spotlightToPoint:(dir)
requireddot = ((light.Angle/)/)
dotproduct >= requireddot
checked =
light:()
checked =
cam = p:()
cam
cam = .()
cam.Parent = p
cam.CameraType = .CameraType.Scriptable
cam.FieldOfView = light.Angle
cam.CFrame = .(pos)
dir = (light.Face,cam.CFrame)
cam.CFrame = .(pos,pos+dir)
_, OnScreen = cam:(ray.Position)
OnScreen
checked =
cam:()
checked ==
islight =
light
mainlight = light
b
baselight = b
col = .(col.R*light.Color.R,col.G*light.Color.G,col.B*light.Color.B)
bright ==
bright = intensity*light.Brightness
bright *= light.Brightness
ray.Instance.Transparency >=
bright =
bright >
bright -= ray.Distance/
light = .()
attach = .()
islight == baselight ~=
attach.Parent = baselight
attach.Parent = ray.Instance
bright = .(bright,brightlimit.Min,brightlimit.Max)
attach.WorldPosition = ray.Position+ray.Normal*
light:()
light.Parent = attach
light.Shadows =
light.Color = col
light.Enabled =
light.Brightness = bright
light.Range = .(ray.Distance/,rangelimit.Min,rangelimit.Max)
islava ==
emberchance = .(,)
emberchance ==
ember = .LavaEmber:()
ember.Parent = attach
ember.Color = ColorSequence.(col)
ember:()
.(TRASH,attach)
data = {
Light = light,
Attachment = attach,
BasePosition = attach.WorldPosition,
BaseBrightness = light.Brightness,
BaseLight = mainlight,
Events = {}
}
()
data
data.BaseLight ~=
data.BaseLight.Enabled ==
data.Light.Brightness =
data.Light.Brightness = ((data.BaseLight.Range-(data.Attachment.WorldPosition-data.BasePosition).Magnitude)/data.BaseLight.Range)*data.BaseBrightness*data.BaseLight.Brightness
data.Light.Brightness = ((data.Light.Range-(data.Attachment.WorldPosition-data.BasePosition).Magnitude)/data.Light.Range)*data.BaseBrightness
data.Events[] = attach:():(changeData)
mainlight
data.Events[] = mainlight:():(changeData)
data.Events[] = mainlight:():(changeData)
.(lumens,data)
.(/dt,()
.(TRASH,.(TRASH,attach))
_, ev data.Events
ev
ev:()
.(lumens,.(lumens,data))
attach:()
)
(light)
.(lights,light)
.(lights,.(lights,light))
(light)
light:() light:() light:()
light:()
.(lights,light)
ev1 =
ev2 =
ev1 = light.Destroying:(()
(light)
ev1
ev1:()
)
ev2 = light:():(()
light:()
(light)
ev2
ev2:()
)
_, light .Workspace:()
(light)
.Workspace.DescendantAdded:((light)
(light)
)
toggle =
run =
fogenabled ==
()
run = :().RenderStepped:((dt)
cam = .Workspace.CurrentCamera
cam
gi == glow == lglow ==
toggle ==
toggle =
i = , .(raymult/dt/)
y = .(,cam.ViewportSize.Y)
x = .(,cam.ViewportSize.X)
ray = cam:(x,y,)
(cam.CFrame.Position,ray.Direction.Unit,
dt*raymult
)
toggle =
)
modified many's ray tracer v2.1 to work on exploits, credit to manymillerboy on devforum for the code i just did a simple port to work on exploits use the global variables (anything starting with getgenv) used in the script to control the effects should work on xeno fixed!!

Universal