Player Reflection test
Key RequiredUniversal

Player Reflection test

Universal ScriptGazeGaze 1.2K views 211 executesUpdated Jan 14, 2026
5.0/ 5(6 votes)
60100% Positive
Lua Script•90 lines (2655 chars)
pls=game:GetService("Players")
rsrv=game:GetService("RunService")
ws=game:GetService("Workspace")
lp=pls.LocalPlayer
cam=ws.CurrentCamera
rs,gui,vpf=nil,nil,nil
rt=0
mrd=15
function stop()
if rs then rs:Disconnect()rs=nil end
if gui then gui:Destroy()gui,vpf=nil,nil end
end
function start()
if not lp.Character then return end
c=lp.Character
hrp=c:FindFirstChild("HumanoidRootPart")or c:WaitForChild("HumanoidRootPart",5)
if not hrp then return end
c.Archivable=true
cln=c:Clone()
for _,v in ipairs(cln:GetDescendants())do
if v:IsA("Script")or v:IsA("LocalScript")or v:IsA("Sound")or v:IsA("UI")then
v:Destroy()
end end
gui=Instance.new("ScreenGui")
gui.IgnoreGuiInset=true
gui.ResetOnSpawn=false
gui.Name="ReflectionGui"
gui.Parent=game:GetService("CoreGui")
vpf=Instance.new("ViewportFrame")
vpf.Size=UDim2.new(1,0,1,0)
vpf.BackgroundTransparency=1
vpf.CurrentCamera=cam
vpf.Ambient=Color3.new(0.7,0.7,0.7)
vpf.LightColor=Color3.new(1,1,1)
vpf.LightDirection=Vector3.new(0,1,0)
vpf.Parent=gui
cln.Parent=vpf
grd=Instance.new("UIGradient")
grd.Transparency=NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(0.6,0),NumberSequenceKeypoint.new(1,0.4)})
grd.Rotation=90
grd.Parent=vpf
clhrp=cln:FindFirstChild("HumanoidRootPart")
if clhrp then
clhrp.Transparency=1
end
c.AncestryChanged:Connect(function(_,p)if not p then stop()end end)
rp=RaycastParams.new()
rp.FilterType=Enum.RaycastFilterType.Exclude
rp.FilterDescendantsInstances={c,cln}
rs=rsrv.RenderStepped:Connect(function()
if not c.Parent or not hrp or not cln.PrimaryPart then return end
ro=hrp.Position
rd=Vector3.new(0,-mrd,0)
rr=ws:Raycast(ro,rd,rp)
if rr then
fy=rr.Position.Y
function mcf(oc)
x,y,z,r00,r01,r02,r10,r11,r12,r20,r21,r22=oc:GetComponents()
return CFrame.new(x,(2*fy)-y,z,r00,r01,r02,-r10,-r11,-r12,r20,r21,r22)
end
for _,v in ipairs(c:GetDescendants())do
if v:IsA("BasePart")then
cp=cln:FindFirstChild(v.Name,true)
if cp then
cp.CFrame=mcf(v.CFrame)
if v.Name=="HumanoidRootPart"then
cp.Transparency=1
else
cp.Transparency=0
end
cp.Material=Enum.Material.SmoothPlastic
cp.CastShadow=false
cp.CanCollide=false
end end end
for _,acc in ipairs(c:GetChildren())do
if acc:IsA("Accessory")and acc:FindFirstChild("Handle")then
ca=cln:FindFirstChild(acc.Name)
if ca and ca:FindFirstChild("Handle")then
ca.Handle.CFrame=mcf(acc.Handle.CFrame)
ca.Handle.Transparency=rt
end end end
else
for _,v in ipairs(cln:GetDescendants())do
if v:IsA("BasePart")or v:IsA("Decal")then
v.Transparency=1
end end end end)
end
lp.CharacterAdded:Connect(function()stop()task.wait(0.5)start()end)
lp.CharacterRemoving:Connect(stop)
if lp.Character then task.wait(0.5)start()end

Features & Information

Trying to make my own shaders but yeh im lwk dumb

Community Comments (1)

kidNULL_2kidNULL_2Feb 3, 2026

Gostei muito, mais poderia melhorá-lo?

More Scripts for Universal Scripts