Advertisement
ssssdsd1213

Untitled

Mar 3rd, 2023
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.29 KB | None | 0 0
  1. -- Pepsi Was Here
  2. -- Pepsi's Name Spoofer
  3. -- Settings
  4. local new_name = "AnAn_2k7" -- I'm not Pepsi. ^_^
  5. local new_id = 104867 -- I'm not 26346. ^_^
  6. local clear_avatar = true -- So no one can reverse search by your outfit
  7. local flush_body_colors = true -- So no one can reverse search by your bodycolors
  8. local rename_instances = false -- Rename any instances that holds your name. (Not recomended unless you can see your name above your character)
  9. local change_id = false -- Change your player ID (not visually)
  10. local deep_scan = true -- Can get a bit laggy if there is a mass wave of new instances
  11. local filter_httpget = { -- Didn't seem like this would be helpful, but requested.
  12. enabled = false, -- Turn on
  13. result = true, -- Filter the results of the request
  14. request = true -- Filter the url before requesting
  15. }
  16.  
  17.  
  18. local Players = assert(assert(game, "game missing?"):FindService("Players") or game:GetService("Players"), "Players missing?")
  19. local LocalPlayer = assert(Players.LocalPlayer, "LocalPlayer missing?")
  20. local CoreGui = game:FindService("CoreGui") or game:GetService("CoreGui")
  21. local PlayerGui = assert(LocalPlayer:FindFirstChild("PlayerGui"), "PlayerGui mising?")
  22. local RunService = assert(game:FindService("RunService") or game:GetService("RunService"), "RunService missing?")
  23. local replaces_str = {
  24. Players.LocalPlayer.Name
  25. }
  26. local replaces_num = {
  27. tostring(Players.LocalPlayer.UserId)
  28. }
  29. new_name, new_id = tostring(new_name), tostring(new_id)
  30. local function casepatt(pattern)
  31. return string.gsub(pattern, "(%%?)(.)", function(percent, letter)
  32. if percent ~= "" or not string.match(letter, "%a") then
  33. return percent .. letter
  34. else
  35. return string.format("[%s%s]", string.lower(letter), string.upper(letter))
  36. end
  37. end)
  38. end
  39. function replace(item, fast)
  40. for replacewith, data in pairs({
  41. [new_name] = replaces_str,
  42. [new_id] = replaces_num
  43. }) do
  44. if not fast then
  45. RunService.RenderStepped:Wait()
  46. end
  47. for _, v in pairs(data) do
  48. if not fast then
  49. RunService.RenderStepped:Wait()
  50. end
  51. for _, t in pairs({
  52. "Text",
  53. "Message",
  54. "ToolTip",
  55. "Value"
  56. }) do
  57. pcall(function()
  58. if string.find(item[t], v, nil, true) then
  59. item[t] = string.gsub(item[t], v, replacewith)
  60. elseif string.find(item[t], string.lower(v), nil, true) then
  61. item[t] = string.gsub(item[v], string.lower(v), string.lower(replacewith))
  62. elseif string.find(item[t], string.upper(v), nil, true) then
  63. item[t] = string.gsub(item[v], string.upper(v), string.upper(replacewith))
  64. elseif string.find(string.lower(item[t]), string.lower(v), nil, true) then
  65. item[t] = string.gsub(item[v], casepatt(v), replacewith)
  66. end
  67. end)
  68. if not fast then
  69. RunService.RenderStepped:Wait()
  70. end
  71. end
  72. if not fast then
  73. RunService.RenderStepped:Wait()
  74. end
  75. if rename_instances then
  76. pcall(function()
  77. if string.find(item.Name, v, nil, true) then
  78. item.Name = string.gsub(item.Name, v, replacewith)
  79. elseif string.find(item.Name, string.lower(v), nil, true) then
  80. item.Name = string.gsub(item.Name, string.lower(v), string.lower(replacewith))
  81. elseif string.find(item.Name, string.upper(v), nil, true) then
  82. item.Name = string.gsub(item.Name, string.lower(v), string.upper(replacewith))
  83. elseif string.find(string.lower(item.Name), string.lower(v), nil, true) then
  84. item.Name = string.gsub(item.Name, casepatt(v), replacewith)
  85. end
  86. end)
  87. end
  88. end
  89. end
  90. end
  91. shared.rep = replace
  92. local function scan_and_replace(fast)
  93. local scan_que = {
  94. CoreGui:GetDescendants(),
  95. PlayerGui:GetDescendants(),
  96. workspace:GetDescendants()
  97. }
  98. local last_break = 0
  99. for _, items in pairs(scan_que) do
  100. if not fast then
  101. RunService.RenderStepped:Wait()
  102. end
  103. for _, gui in pairs(assert(type(items) == "table" and items, "scan_que does not hold a table")) do
  104. last_break = 1 + last_break
  105. if last_break >= 6000 then
  106. RunService.RenderStepped:Wait()
  107. last_break = 0
  108. end
  109. if not fast then
  110. RunService.RenderStepped:Wait()
  111. end
  112. replace(gui, fast)
  113. end
  114. end
  115. for _, obj in pairs(workspace:GetDescendants()) do
  116. if not fast then
  117. RunService.RenderStepped:Wait()
  118. end
  119. replace(obj)
  120. end
  121. end
  122. function fixchar(Character)
  123. if not Character then
  124. return
  125. end
  126. wait(0.2)
  127. RunService.RenderStepped:Wait()
  128. if rename_instances then
  129. Character.Name = new_name
  130. end
  131. if clear_avatar then
  132. Players.LocalPlayer:ClearCharacterAppearance()
  133. end
  134. wait(0.1)
  135. if flush_body_colors then
  136. local bc = Character:FindFirstChildOfClass("BodyColors")
  137. if bc then
  138. for _, c in pairs({
  139. "HeadColor",
  140. "LeftArmColor",
  141. "LeftLegColor",
  142. "RightArmColor",
  143. "RightLegColor",
  144. "TorsoColor"
  145. }) do
  146. bc[c] = (typeof(bc[c]) == "BrickColor" and BrickColor.Random()) or bc[c]
  147. end
  148. else
  149. local h = Character:FindFirstChildOfClass("Humanoid")
  150. if h then
  151. for _, limb in pairs(Character:GetChildren()) do
  152. if limb:IsA("BasePart") and pcall(h.GetLimb, h, limb) then
  153. limb.BrickColor = BrickColor.Random()
  154. end
  155. end
  156. end
  157. end
  158. end
  159. end
  160. fixchar(Players.LocalPlayer.Character)
  161. Players.LocalPlayer.CharacterAppearanceLoaded:Connect(fixchar)
  162. Players.LocalPlayer.CharacterAdded:Connect(fixchar)
  163. if deep_scan then
  164. game.ItemChanged:Connect(function(obj, property)
  165. if not rename_instances and "Name" == property then
  166. return
  167. end
  168. local s, v = pcall(function()
  169. return obj[property]
  170. end)
  171. if s then
  172. if "string" == type(v) then
  173. for _, c in pairs(replaces_str) do
  174. RunService.RenderStepped:Wait()
  175. if string.find(obj[property], c, nil, true) then
  176. obj[property] = string.gsub(tostring(obj[property] or v), c, new_name)
  177. elseif string.find(obj[property], string.lower(c)) then
  178. obj[property] = string.gsub(tostring(obj[property] or v), string.lower(c), string.lower(new_name))
  179. elseif string.find(obj[property], string.upper(c), nil, true) then
  180. obj[property] = string.gsub(tostring(obj[property] or v), string.upper(c), string.upper(new_name))
  181. elseif string.find(string.upper(obj[property]), string.upper(c), nil, true) then
  182. obj[property] = string.gsub(tostring(obj[property] or v), casepatt(c), new_name)
  183. end
  184. end
  185. RunService.RenderStepped:Wait()
  186. for _, c in pairs(replaces_num) do
  187. RunService.RenderStepped:Wait()
  188. if string.find(obj[property], new_id) then
  189. obj[property] = string.gsub(tostring(obj[property] or v), c, new_id)
  190. end
  191. end
  192. elseif "number" == type(v) then
  193. v = tostring(obj[property] or v)
  194. for _, c in pairs(replaces_num) do
  195. RunService.RenderStepped:Wait()
  196. if string.find(v, c) then
  197. obj[property] = tonumber(tonumber(string.gsub(v, c, new_id) or obj[property]) or obj[property])
  198. end
  199. end
  200. end
  201. end
  202. end)
  203. CoreGui.DescendantAdded:Connect(replace)
  204. PlayerGui.DescendantAdded:Connect(replace)
  205. end
  206. local function filterstr(s)
  207. for _, data in pairs({
  208. [new_name] = replaces_str,
  209. [new_id] = replaces_num
  210. }) do
  211. for c, v in pairs(data) do
  212. if string.find(s, v, nil, true) then
  213. s = string.gsub(s, v, c)
  214. elseif string.find(s, string.lower(v), nil, true) then
  215. s = string.gsub(s, string.lower(v), string.lower(c))
  216. elseif string.find(s, string.upper(v), nil, true) then
  217. s = string.gsub(s, string.upper(v), string.upper(c))
  218. elseif string.find(string.upper(s), string.upper(v), nil, true) then
  219. s = string.gsub(s, casepatt(v), c)
  220. end
  221. end
  222. end
  223. return s
  224. end
  225. if filter_httpget.enabled and type(hookfunc or hookfunction or detour_function) == "function" then
  226. local hget
  227. hget = assert(hookfunction or hookfunc or detour_function, "Hook function required for filter_httpget")(assert(game.HttpGet, "HttpGet required for filter_httpget"), function(shelf, u, ...)
  228. if filter_httpget.request then
  229. local x, e = pcall(filterstr, u)
  230. if x and e then
  231. u = e
  232. end
  233. end
  234. if filter_httpget.result then
  235. local result = hget(shelf, u, ...)
  236. local x, e = pcall(filterstr, result)
  237. if x and e then
  238. return e
  239. end
  240. end
  241. return hget(shelf, u, ...)
  242. end)
  243. end
  244. scan_and_replace(true)
  245. while wait(1) do
  246. if rename_instances then
  247. Players.LocalPlayer.Name = new_name
  248. if Players.LocalPlayer.Character then
  249. Players.LocalPlayer.Character.Name = new_name
  250. end
  251. end
  252. if change_id then
  253. Players.LocalPlayer.UserId = tonumber(tonumber(new_id or 1) or 1)
  254. end
  255. scan_and_replace()
  256. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement