Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Theme Colors
- local BLACK = Color3.fromRGB(15, 15, 15)
- local DARK_GRAY = Color3.fromRGB(35, 35, 35)
- local WHITE = Color3.fromRGB(255, 255, 255)
- local RED = Color3.fromRGB(200, 50, 50)
- local LIGHT_GREEN = Color3.fromRGB(50, 180, 50)
- local MENU_ALPHA = 0.95
- -- Services
- local Players = game:GetService("Players")
- local CoreGui = game:GetService("CoreGui")
- local TweenService = game:GetService("TweenService")
- local StarterGui = game:GetService("StarterGui")
- local UserInputService = game:GetService("UserInputService")
- local player = Players.LocalPlayer
- -- Variables
- local creatorUserId = nil
- local creatorThumbnail = ""
- local minimized = false
- local draggingTitleBar = false
- local dragStart, startPos = nil, nil
- -- Creator Info
- local success, result = pcall(function()
- return Players:GetUserIdFromNameAsync("akuramaa_xd")
- end)
- if success then
- creatorUserId = result
- success, result = pcall(function()
- return Players:GetUserThumbnailAsync(creatorUserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100)
- end)
- if success then
- creatorThumbnail = result
- end
- end
- -- Cleanup Existing GUI
- if CoreGui:FindFirstChild("MorphAvatarByKuramaMod") then
- CoreGui["MorphAvatarByKuramaMod"]:Destroy()
- end
- -- Main GUI
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "MorphAvatarByKuramaMod"
- screenGui.ResetOnSpawn = false
- screenGui.DisplayOrder = 999999
- screenGui.Parent = CoreGui
- screenGui.Enabled = true
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, 200, 0, 90)
- frame.Position = UDim2.new(0.5, -100, 0.5, -50)
- frame.BackgroundColor3 = BLACK
- frame.BackgroundTransparency = 1 - MENU_ALPHA
- frame.BorderSizePixel = 0
- frame.Active = false
- frame.Parent = screenGui
- frame.Visible = true
- frame.ClipsDescendants = true
- local frameCorner = Instance.new("UICorner")
- frameCorner.CornerRadius = UDim.new(0, 8)
- frameCorner.Parent = frame
- -- Title Bar
- local titleBar = Instance.new("Frame")
- titleBar.Size = UDim2.new(1, 0, 0, 30)
- titleBar.Position = UDim2.new(0, 0, 0, 0)
- titleBar.BackgroundTransparency = 1
- titleBar.Parent = frame
- titleBar.Active = true
- local title = Instance.new("TextLabel")
- title.Size = UDim2.new(1, -60, 0, 30)
- title.Position = UDim2.new(0, 10, 0, 0)
- title.Text = "Morph Avatar"
- title.TextColor3 = WHITE
- title.BackgroundTransparency = 1
- title.BorderSizePixel = 0
- title.Font = Enum.Font.GothamBold
- title.TextSize = 16
- title.TextXAlignment = Enum.TextXAlignment.Left
- title.Parent = titleBar
- -- Username Input
- local usernameInput = Instance.new("TextBox")
- usernameInput.Size = UDim2.new(1, -20, 0, 30)
- usernameInput.Position = UDim2.new(0, 10, 0, 40)
- usernameInput.PlaceholderText = "Enter Username"
- usernameInput.Font = Enum.Font.Gotham
- usernameInput.TextSize = 14
- usernameInput.Text = ""
- usernameInput.TextColor3 = WHITE
- usernameInput.BackgroundColor3 = DARK_GRAY
- usernameInput.ClearTextOnFocus = false
- usernameInput.TextWrapped = true
- usernameInput.Parent = frame
- usernameInput.Visible = true
- local inputCorner = Instance.new("UICorner")
- inputCorner.CornerRadius = UDim.new(0, 4)
- inputCorner.Parent = usernameInput
- -- Buttons
- local miniBtn = Instance.new("TextButton")
- miniBtn.Name = "MinimizeButton"
- miniBtn.Size = UDim2.new(0, 30, 0, 30)
- miniBtn.Position = UDim2.new(1, -60, 0, 0)
- miniBtn.Text = "-"
- miniBtn.Font = Enum.Font.GothamBold
- miniBtn.TextSize = 16
- miniBtn.TextColor3 = WHITE
- miniBtn.BackgroundTransparency = 1
- miniBtn.Parent = titleBar
- local closeBtn = Instance.new("TextButton")
- closeBtn.Name = "Close"
- closeBtn.Size = UDim2.new(0, 30, 0, 30)
- closeBtn.Position = UDim2.new(1, -30, 0, 0)
- closeBtn.Text = "X"
- closeBtn.Font = Enum.Font.GothamBold
- closeBtn.TextSize = 16
- closeBtn.TextColor3 = RED
- closeBtn.BackgroundTransparency = 1
- closeBtn.Parent = titleBar
- closeBtn.ZIndex = 2
- -- Functions
- local function applyMorphEffect(character)
- local rootPart = character:FindFirstChild("HumanoidRootPart")
- if not rootPart then return end
- local particleEmitter = Instance.new("ParticleEmitter")
- particleEmitter.Texture = "rbxassetid://243098098"
- particleEmitter.Rate = 50
- particleEmitter.Speed = NumberRange.new(5, 10)
- particleEmitter.Lifetime = NumberRange.new(0.5, 1)
- particleEmitter.SpreadAngle = Vector2.new(360, 360)
- particleEmitter.Color = ColorSequence.new(RED)
- particleEmitter.Parent = rootPart
- local explosion = Instance.new("Explosion")
- explosion.BlastRadius = 5
- explosion.BlastPressure = 0
- explosion.Position = rootPart.Position
- explosion.Visible = true
- explosion.Parent = workspace
- explosion.ExplosionType = Enum.ExplosionType.NoCraters
- task.spawn(function()
- task.wait(2)
- particleEmitter.Enabled = false
- task.wait(1)
- particleEmitter:Destroy()
- explosion:Destroy()
- end)
- end
- local function findPlayerByName(partialName)
- if not partialName or partialName == "" then return nil end
- local searchName = partialName:lower()
- local localPlayer = nil
- for _, v in ipairs(Players:GetPlayers()) do
- local nameLower = v.Name:lower()
- local dNameLower = v.DisplayName:lower()
- if nameLower == searchName or dNameLower == searchName then
- return v
- end
- if nameLower:sub(1, #searchName) == searchName or dNameLower:sub(1, #searchName) == searchName then
- localPlayer = v
- end
- end
- if not localPlayer then
- local success, userId = pcall(function()
- return Players:GetUserIdFromNameAsync(searchName)
- end)
- if success and userId then
- return {UserId = userId, Name = searchName}
- end
- end
- return localPlayer
- end
- local function sendNotif(titleT, textT, image)
- print("[sendNotif] Attempting to send notification: ", titleT, textT, image) -- Debug
- local success, err = pcall(function()
- StarterGui:SetCore("SendNotification", {
- Title = titleT,
- Text = textT,
- Duration = 5,
- Icon = image or ""
- })
- end)
- if not success then
- warn("[sendNotif] Failed to send notification: " .. tostring(err)) -- Log error
- else
- print("[sendNotif] Notification sent successfully")
- end
- end
- local function morphToPlayer(target)
- if not target then
- sendNotif("Morph Avatar", "No target found!", "")
- return
- end
- local userId = target.UserId or (type(target) == "number" and target or target.UserId)
- local targetName = target.Name or "Unknown"
- if userId == player.UserId then
- sendNotif("Morph Avatar", "Cannot morph to yourself!", "")
- return
- end
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid", 10)
- if not humanoid then
- sendNotif("Morph Avatar", "Failed to find humanoid!", "")
- return
- end
- local success, desc = pcall(function()
- return Players:GetHumanoidDescriptionFromUserId(userId)
- end)
- if not success or not desc then
- sendNotif("Morph Avatar", "Failed to load avatar data!", "")
- return
- end
- -- Fetch target thumbnail
- local targetThumbnail = ""
- local thumbSuccess, thumbResult = pcall(function()
- return Players:GetUserThumbnailAsync(userId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100)
- end)
- if thumbSuccess then
- targetThumbnail = thumbResult
- print("[morphToPlayer] Thumbnail fetched: ", targetThumbnail) -- Debug
- else
- warn("[morphToPlayer] Failed to fetch thumbnail: ", thumbResult)
- end
- for _, obj in ipairs(character:GetChildren()) do
- if obj:IsA("Shirt") or obj:IsA("Pants") or obj:IsA("ShirtGraphic") or
- obj:IsA("Accessory") or obj:IsA("BodyColors") then
- obj:Destroy()
- end
- end
- local head = character:FindFirstChild("Head")
- if head then
- for _, decal in ipairs(head:GetChildren()) do
- if decal:IsA("Decal") then decal:Destroy() end
- end
- end
- local applySuccess = pcall(function()
- humanoid:ApplyDescriptionClientServer(desc)
- end)
- if applySuccess then
- print("[morphToPlayer] Morph applied successfully for ", targetName) -- Debug
- applyMorphEffect(character)
- sendNotif("Morph Avatar", "Successfully morphed to " .. targetName .. "!", targetThumbnail)
- else
- sendNotif("Morph Avatar", "Failed to apply morph!", "")
- warn("[morphToPlayer] Failed to apply morph")
- end
- end
- -- Events
- titleBar.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- draggingTitleBar = true
- dragStart = input.Position
- startPos = frame.Position
- end
- end)
- UserInputService.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- draggingTitleBar = false
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if draggingTitleBar and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
- local delta = input.Position - dragStart
- frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- end)
- miniBtn.MouseButton1Click:Connect(function()
- minimized = not minimized
- if minimized then
- frame.Size = UDim2.new(0, 200, 0, 30)
- miniBtn.Text = "+"
- usernameInput.Visible = false
- else
- frame.Size = UDim2.new(0, 200, 0, 90)
- miniBtn.Text = "-"
- usernameInput.Visible = true
- end
- end)
- closeBtn.MouseButton1Click:Connect(function()
- screenGui:Destroy()
- end)
- usernameInput.FocusLost:Connect(function(enterPressed)
- if enterPressed then
- local inputText = usernameInput.Text
- if inputText == "" then
- sendNotif("Morph Avatar", "Please enter a username!", "")
- return
- end
- local target = findPlayerByName(inputText)
- if target then
- usernameInput.Text = target.Name or inputText
- morphToPlayer(target)
- else
- sendNotif("Morph Avatar", "Player not found!", "")
- end
- end
- end)
- -- Initial Notification
- sendNotif("Morph Avatar", "Created by akuramaa_xd", creatorThumbnail)
Add Comment
Please, Sign In to add comment