Repository navigation
Expand file tree
/
Copy pathalias.lua
More file actions
107 lines (100 loc) · 3.46 KB
/
Copy pathalias.lua
File metadata and controls
107 lines (100 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
if not fakeplr or tonumber(fakeplr) == 0 then
fakeplr = 1 -- User ID of who you want to become
end
if not plricon then
plricon = "" -- image for icon
end
if not plremoji then
plremoji = "" -- emoji e.g. for verified
end
local lp = game.Players.LocalPlayer
local alias = game:GetService("Players"):GetNameFromUserIdAsync(fakeplr)
local oldvalues = {}
local function setimage(v)
local image = v[1]
local imagestring = v[2]
image.Image = imagestring
image:GetPropertyChangedSignal("Image"):Connect(function()
if string.find(image.Image, lp.UserId) then
local textv = imagestring
image.Image = textv
end
end)
end
local function setname(v)
local name = v[1]
local nametext = v[2]
name.Text = nametext
name:GetPropertyChangedSignal("Text"):Connect(function()
if string.find(name.Text, lp.DisplayName) or string.find(name.Text, lp.Name) then
local textv = nametext
name.Text = textv
end
end)
end
local function tabbar()
for _, v in pairs(game.CoreGui.RoactAppExperimentProvider:GetDescendants()) do
if v.Name == "p_"..tostring(lp.UserId) then
for _, b in pairs(v:GetDescendants()) do
if b.Name == "PlayerName" and b.ClassName == "Frame" and b.Parent.Name == "OverlayFrame" then
for _, c in pairs(b:GetChildren()) do
c:Destroy()
end
local objs = game:GetObjects("rbxassetid://71118221200082")
local inst = objs[1]
inst.Emoji.Text = plremoji
setname({inst.ChildrenWrapper.PlayerName, alias})
inst.Parent = b
end
if b.Name == "PlayerIcon" and b.ClassName == "ImageLabel" then
if plricon ~= "" then
setimage({b, "rbxthumb://type=Asset&id="..tostring(plricon).."&w=150&h=150"})
end
end
end
end
if v.Name == "ScrollingFrameContainer" then
task.spawn(function()
while not v:FindFirstChild("PlayerDropDown") do task.wait() end
for _, c in pairs(v.PlayerDropDown:GetDescendants()) do
if c.Name == "AvatarImage" and c.ClassName == "ImageLabel" then
setimage({c, "rbxthumb://type=AvatarHeadShot&id="..tostring(fakeplr).."&w=150&h=150"})
for _, b in pairs(c.Parent:GetDescendants()) do
if (b.Name == "PlayerName" or b.Name == "DisplayName") and b.ClassName == "TextLabel" then
setname({b, alias})
end
end
end
end
end)
end
end
end
tabbar()
for i, b in pairs(game.CoreGui.RobloxGui.SettingsClippingShield:GetDescendants()) do
if b.Name == "PageViewInnerFrame" then
task.spawn(function()
while not b:FindFirstChild("Players") do task.wait() end
while not b.Players:FindFirstChild("PlayerLabel"..lp.Name) do task.wait() end
local v = b.Players["PlayerLabel"..lp.Name]
if v then
setimage({v.Icon, "rbxthumb://type=Avatar&id="..tostring(fakeplr).."&w=100&h=100"})
local displayname = v:FindFirstChild("DisplayNameLabel")
local normname = v:FindFirstChild("NameLabel")
if normname then
setname({normname, "@"..alias})
end
if displayname then
setname({displayname, alias})
end
end
end)
end
end
game.CoreGui.ChildRemoved:Connect(function(child)
if child.Name == "RoactAppExperimentProvider" then
while not game.CoreGui:FindFirstChild("RoactAppExperimentProvider") do task.wait() end
while not game.CoreGui.RoactAppExperimentProvider:FindFirstChild("Children") do task.wait() end
tabbar()
end
end)