Josiahiscool73

avatar morpher

Jan 17th, 2026
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.58 KB | None | 0 0
  1. -- Theme Colors
  2. local BLACK = Color3.fromRGB(15, 15, 15)
  3. local DARK_GRAY = Color3.fromRGB(35, 35, 35)
  4. local WHITE = Color3.fromRGB(255, 255, 255)
  5. local RED = Color3.fromRGB(200, 50, 50)
  6. local LIGHT_GREEN = Color3.fromRGB(50, 180, 50)
  7. local MENU_ALPHA = 0.95
  8.  
  9. -- Services
  10. local Players = game:GetService("Players")
  11. local CoreGui = game:GetService("CoreGui")
  12. local TweenService = game:GetService("TweenService")
  13. local StarterGui = game:GetService("StarterGui")
  14. local UserInputService = game:GetService("UserInputService")
  15. local player = Players.LocalPlayer
  16.  
  17. -- Variables
  18. local creatorUserId = nil
  19. local creatorThumbnail = ""
  20. local minimized = false
  21. local draggingTitleBar = false
  22. local dragStart, startPos = nil, nil
  23.  
  24. -- Creator Info
  25. local success, result = pcall(function()
  26. return Players:GetUserIdFromNameAsync("akuramaa_xd")
  27. end)
  28. if success then
  29. creatorUserId = result
  30. success, result = pcall(function()
  31. return Players:GetUserThumbnailAsync(creatorUserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100)
  32. end)
  33. if success then
  34. creatorThumbnail = result
  35. end
  36. end
  37.  
  38. -- Cleanup Existing GUI
  39. if CoreGui:FindFirstChild("MorphAvatarByKuramaMod") then
  40. CoreGui["MorphAvatarByKuramaMod"]:Destroy()
  41. end
  42.  
  43. -- Main GUI
  44. local screenGui = Instance.new("ScreenGui")
  45. screenGui.Name = "MorphAvatarByKuramaMod"
  46. screenGui.ResetOnSpawn = false
  47. screenGui.DisplayOrder = 999999
  48. screenGui.Parent = CoreGui
  49. screenGui.Enabled = true
  50.  
  51. local frame = Instance.new("Frame")
  52. frame.Size = UDim2.new(0, 200, 0, 90)
  53. frame.Position = UDim2.new(0.5, -100, 0.5, -50)
  54. frame.BackgroundColor3 = BLACK
  55. frame.BackgroundTransparency = 1 - MENU_ALPHA
  56. frame.BorderSizePixel = 0
  57. frame.Active = false
  58. frame.Parent = screenGui
  59. frame.Visible = true
  60. frame.ClipsDescendants = true
  61.  
  62. local frameCorner = Instance.new("UICorner")
  63. frameCorner.CornerRadius = UDim.new(0, 8)
  64. frameCorner.Parent = frame
  65.  
  66. -- Title Bar
  67. local titleBar = Instance.new("Frame")
  68. titleBar.Size = UDim2.new(1, 0, 0, 30)
  69. titleBar.Position = UDim2.new(0, 0, 0, 0)
  70. titleBar.BackgroundTransparency = 1
  71. titleBar.Parent = frame
  72. titleBar.Active = true
  73.  
  74. local title = Instance.new("TextLabel")
  75. title.Size = UDim2.new(1, -60, 0, 30)
  76. title.Position = UDim2.new(0, 10, 0, 0)
  77. title.Text = "Morph Avatar"
  78. title.TextColor3 = WHITE
  79. title.BackgroundTransparency = 1
  80. title.BorderSizePixel = 0
  81. title.Font = Enum.Font.GothamBold
  82. title.TextSize = 16
  83. title.TextXAlignment = Enum.TextXAlignment.Left
  84. title.Parent = titleBar
  85.  
  86. -- Username Input
  87. local usernameInput = Instance.new("TextBox")
  88. usernameInput.Size = UDim2.new(1, -20, 0, 30)
  89. usernameInput.Position = UDim2.new(0, 10, 0, 40)
  90. usernameInput.PlaceholderText = "Enter Username"
  91. usernameInput.Font = Enum.Font.Gotham
  92. usernameInput.TextSize = 14
  93. usernameInput.Text = ""
  94. usernameInput.TextColor3 = WHITE
  95. usernameInput.BackgroundColor3 = DARK_GRAY
  96. usernameInput.ClearTextOnFocus = false
  97. usernameInput.TextWrapped = true
  98. usernameInput.Parent = frame
  99. usernameInput.Visible = true
  100.  
  101. local inputCorner = Instance.new("UICorner")
  102. inputCorner.CornerRadius = UDim.new(0, 4)
  103. inputCorner.Parent = usernameInput
  104.  
  105. -- Buttons
  106. local miniBtn = Instance.new("TextButton")
  107. miniBtn.Name = "MinimizeButton"
  108. miniBtn.Size = UDim2.new(0, 30, 0, 30)
  109. miniBtn.Position = UDim2.new(1, -60, 0, 0)
  110. miniBtn.Text = "-"
  111. miniBtn.Font = Enum.Font.GothamBold
  112. miniBtn.TextSize = 16
  113. miniBtn.TextColor3 = WHITE
  114. miniBtn.BackgroundTransparency = 1
  115. miniBtn.Parent = titleBar
  116.  
  117. local closeBtn = Instance.new("TextButton")
  118. closeBtn.Name = "Close"
  119. closeBtn.Size = UDim2.new(0, 30, 0, 30)
  120. closeBtn.Position = UDim2.new(1, -30, 0, 0)
  121. closeBtn.Text = "X"
  122. closeBtn.Font = Enum.Font.GothamBold
  123. closeBtn.TextSize = 16
  124. closeBtn.TextColor3 = RED
  125. closeBtn.BackgroundTransparency = 1
  126. closeBtn.Parent = titleBar
  127. closeBtn.ZIndex = 2
  128.  
  129. -- Functions
  130. local function applyMorphEffect(character)
  131. local rootPart = character:FindFirstChild("HumanoidRootPart")
  132. if not rootPart then return end
  133.  
  134. local particleEmitter = Instance.new("ParticleEmitter")
  135. particleEmitter.Texture = "rbxassetid://243098098"
  136. particleEmitter.Rate = 50
  137. particleEmitter.Speed = NumberRange.new(5, 10)
  138. particleEmitter.Lifetime = NumberRange.new(0.5, 1)
  139. particleEmitter.SpreadAngle = Vector2.new(360, 360)
  140. particleEmitter.Color = ColorSequence.new(RED)
  141. particleEmitter.Parent = rootPart
  142.  
  143. local explosion = Instance.new("Explosion")
  144. explosion.BlastRadius = 5
  145. explosion.BlastPressure = 0
  146. explosion.Position = rootPart.Position
  147. explosion.Visible = true
  148. explosion.Parent = workspace
  149. explosion.ExplosionType = Enum.ExplosionType.NoCraters
  150.  
  151. task.spawn(function()
  152. task.wait(2)
  153. particleEmitter.Enabled = false
  154. task.wait(1)
  155. particleEmitter:Destroy()
  156. explosion:Destroy()
  157. end)
  158. end
  159.  
  160. local function findPlayerByName(partialName)
  161. if not partialName or partialName == "" then return nil end
  162. local searchName = partialName:lower()
  163.  
  164. local localPlayer = nil
  165. for _, v in ipairs(Players:GetPlayers()) do
  166. local nameLower = v.Name:lower()
  167. local dNameLower = v.DisplayName:lower()
  168.  
  169. if nameLower == searchName or dNameLower == searchName then
  170. return v
  171. end
  172.  
  173. if nameLower:sub(1, #searchName) == searchName or dNameLower:sub(1, #searchName) == searchName then
  174. localPlayer = v
  175. end
  176. end
  177.  
  178. if not localPlayer then
  179. local success, userId = pcall(function()
  180. return Players:GetUserIdFromNameAsync(searchName)
  181. end)
  182. if success and userId then
  183. return {UserId = userId, Name = searchName}
  184. end
  185. end
  186.  
  187. return localPlayer
  188. end
  189.  
  190. local function sendNotif(titleT, textT, image)
  191. print("[sendNotif] Attempting to send notification: ", titleT, textT, image) -- Debug
  192. local success, err = pcall(function()
  193. StarterGui:SetCore("SendNotification", {
  194. Title = titleT,
  195. Text = textT,
  196. Duration = 5,
  197. Icon = image or ""
  198. })
  199. end)
  200. if not success then
  201. warn("[sendNotif] Failed to send notification: " .. tostring(err)) -- Log error
  202. else
  203. print("[sendNotif] Notification sent successfully")
  204. end
  205. end
  206.  
  207. local function morphToPlayer(target)
  208. if not target then
  209. sendNotif("Morph Avatar", "No target found!", "")
  210. return
  211. end
  212.  
  213. local userId = target.UserId or (type(target) == "number" and target or target.UserId)
  214. local targetName = target.Name or "Unknown"
  215.  
  216. if userId == player.UserId then
  217. sendNotif("Morph Avatar", "Cannot morph to yourself!", "")
  218. return
  219. end
  220.  
  221. local character = player.Character or player.CharacterAdded:Wait()
  222. local humanoid = character:WaitForChild("Humanoid", 10)
  223. if not humanoid then
  224. sendNotif("Morph Avatar", "Failed to find humanoid!", "")
  225. return
  226. end
  227.  
  228. local success, desc = pcall(function()
  229. return Players:GetHumanoidDescriptionFromUserId(userId)
  230. end)
  231. if not success or not desc then
  232. sendNotif("Morph Avatar", "Failed to load avatar data!", "")
  233. return
  234. end
  235.  
  236. -- Fetch target thumbnail
  237. local targetThumbnail = ""
  238. local thumbSuccess, thumbResult = pcall(function()
  239. return Players:GetUserThumbnailAsync(userId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100)
  240. end)
  241. if thumbSuccess then
  242. targetThumbnail = thumbResult
  243. print("[morphToPlayer] Thumbnail fetched: ", targetThumbnail) -- Debug
  244. else
  245. warn("[morphToPlayer] Failed to fetch thumbnail: ", thumbResult)
  246. end
  247.  
  248. for _, obj in ipairs(character:GetChildren()) do
  249. if obj:IsA("Shirt") or obj:IsA("Pants") or obj:IsA("ShirtGraphic") or
  250. obj:IsA("Accessory") or obj:IsA("BodyColors") then
  251. obj:Destroy()
  252. end
  253. end
  254. local head = character:FindFirstChild("Head")
  255. if head then
  256. for _, decal in ipairs(head:GetChildren()) do
  257. if decal:IsA("Decal") then decal:Destroy() end
  258. end
  259. end
  260.  
  261. local applySuccess = pcall(function()
  262. humanoid:ApplyDescriptionClientServer(desc)
  263. end)
  264.  
  265. if applySuccess then
  266. print("[morphToPlayer] Morph applied successfully for ", targetName) -- Debug
  267. applyMorphEffect(character)
  268. sendNotif("Morph Avatar", "Successfully morphed to " .. targetName .. "!", targetThumbnail)
  269. else
  270. sendNotif("Morph Avatar", "Failed to apply morph!", "")
  271. warn("[morphToPlayer] Failed to apply morph")
  272. end
  273. end
  274.  
  275. -- Events
  276. titleBar.InputBegan:Connect(function(input)
  277. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  278. draggingTitleBar = true
  279. dragStart = input.Position
  280. startPos = frame.Position
  281. end
  282. end)
  283.  
  284. UserInputService.InputEnded:Connect(function(input)
  285. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  286. draggingTitleBar = false
  287. end
  288. end)
  289.  
  290. UserInputService.InputChanged:Connect(function(input)
  291. if draggingTitleBar and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
  292. local delta = input.Position - dragStart
  293. frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  294. end
  295. end)
  296.  
  297. miniBtn.MouseButton1Click:Connect(function()
  298. minimized = not minimized
  299. if minimized then
  300. frame.Size = UDim2.new(0, 200, 0, 30)
  301. miniBtn.Text = "+"
  302. usernameInput.Visible = false
  303. else
  304. frame.Size = UDim2.new(0, 200, 0, 90)
  305. miniBtn.Text = "-"
  306. usernameInput.Visible = true
  307. end
  308. end)
  309.  
  310. closeBtn.MouseButton1Click:Connect(function()
  311. screenGui:Destroy()
  312. end)
  313.  
  314. usernameInput.FocusLost:Connect(function(enterPressed)
  315. if enterPressed then
  316. local inputText = usernameInput.Text
  317. if inputText == "" then
  318. sendNotif("Morph Avatar", "Please enter a username!", "")
  319. return
  320. end
  321.  
  322. local target = findPlayerByName(inputText)
  323. if target then
  324. usernameInput.Text = target.Name or inputText
  325. morphToPlayer(target)
  326. else
  327. sendNotif("Morph Avatar", "Player not found!", "")
  328. end
  329. end
  330. end)
  331.  
  332. -- Initial Notification
  333. sendNotif("Morph Avatar", "Created by akuramaa_xd", creatorThumbnail)
Add Comment
Please, Sign In to add comment