Back to Scripts
Name Spoofer

Name Spoofer

ScriptBlox
Universal Free

Game: Universal Script 📌

251 Views
1 Likes
0 Dislikes
Lamiia

Lamiia

offline

Features

Spoof your name and remove your profile picture(clientside)

Script Code

local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local CoreGui = game:GetService("CoreGui")

local lp = Players.LocalPlayer

-- Store active connections for cleanup
local activeConnections = {}

if not getgenv().Config then
    getgenv().Config = {
        FakeDisplayName = "NameSpoof",
        FakeName = "NameSpoof", 
        FakeId = 00000,
        BlankProfilePicture = true
    }
end

getgenv().OriginalValues = {
    Name = lp.Name,
    DisplayName = lp.DisplayName,
    UserId = lp.UserId
}

-- Cleanup function to disconnect all active connections
local function cleanup()
    for _, connection in pairs(activeConnections) do
        if typeof(connection) == "RBXScriptConnection" then
            connection:Disconnect()
        end
    end
    activeConnections = {}
end

local blankImageIds = {
    "rbxasset://textures/ui/GuiImagePlaceholder.png",
    "rbxassetid://0",
    "http://www.roblox.com/asset/?id=0"
}

local function replaceTextInObject(obj)
    if obj:IsA("TextLabel") or obj:IsA("TextButton") or obj:IsA("TextBox") then
        -- Prevent duplicate processing
        if obj:GetAttribute("TextReplaced") then return end
        obj:SetAttribute("TextReplaced", true)
        
        local text = obj.Text
        if string.find(text, getgenv().OriginalValues.Name) then
            obj.Text = string.gsub(text, getgenv().OriginalValues.Name, Config.FakeName)
        elseif string.find(text, getgenv().OriginalValues.DisplayName) then
            obj.Text = string.gsub(text, getgenv().OriginalValues.DisplayName, Config.FakeDisplayName)
        elseif string.find(text, tostring(getgenv().OriginalValues.UserId)) then
            obj.Text = string.gsub(text, tostring(getgenv().OriginalValues.UserId), tostring(Config.FakeId))
        end
        
        local textConnection = obj:GetPropertyChangedSignal("Text"):Connect(function()
            task.wait()
            local newText = obj.Text
            if string.find(newText, getgenv().OriginalValues.Name) then
                obj.Text = string.gsub(newText, getgenv().OriginalValues.Name, Config.FakeName)
            elseif string.find(newText, getgenv().OriginalValues.DisplayName) then
                obj.Text = string.gsub(newText, getgenv().OriginalValues.DisplayName, Config.FakeDisplayName)
            elseif string.find(newText, tostring(getgenv().OriginalValues.UserId)) then
                obj.Text = string.gsub(newText, tostring(getgenv().OriginalValues.UserId), tostring(Config.FakeId))
            end
        end)
        table.insert(activeConnections, textConnection)
    end
end

local function replaceImageInObject(obj)
    if Config.BlankProfilePicture and (obj:IsA("ImageLabel") or obj:IsA("ImageButton")) then
        -- Prevent duplicate processing
        if obj:GetAttribute("ImageReplaced") then return end
        obj:SetAttribute("ImageReplaced", true)
        
        local image = obj.Image
        if string.find(image, tostring(getgenv().OriginalValues.UserId)) then
            obj.Image = blankImageIds[1]
        elseif string.find(image, getgenv().OriginalValues.Name) then
            obj.Image = blankImageIds[1]
        end
        
        local imageConnection = obj:GetPropertyChangedSignal("Image"):Connect(function()
            task.wait()
            local newImage = obj.Image
            if string.find(newImage, tostring(getgenv().OriginalValues.UserId)) then
                obj.Image = blankImageIds[1]
            elseif string.find(newImage, getgenv().OriginalValues.Name) then
                obj.Image = blankImageIds[1]
            end
        end)
        table.insert(activeConnections, imageConnection)
    end
end

local function setupGlobalHook()
    -- Clear existing text/image attributes to allow reprocessing
    for _, obj in pairs(game:GetDescendants()) do
        if obj:GetAttribute("TextReplaced") then
            obj:SetAttribute("TextReplaced", nil)
        end
        if obj:GetAttribute("ImageReplaced") then
            obj:SetAttribute("ImageReplaced", nil)
        end
        replaceTextInObject(obj)
        replaceImageInObject(obj)
    end
    
    -- Store game descendant connection
    local gameConnection = game.DescendantAdded:Connect(function(obj)
        replaceTextInObject(obj)
        replaceImageInObject(obj)
    end)
    table.insert(activeConnections, gameConnection)
end

local function hookPlayerList()
    local function processPlayerList()
        local playerList = CoreGui:FindFirstChild("PlayerList")
        if playerList then
            -- Clear existing attributes
            for _, obj in ipairs(playerList:GetDescendants()) do
                if obj:GetAttribute("TextReplaced") then
                    obj:SetAttribute("TextReplaced", nil)
                end
                if obj:GetAttribute("ImageReplaced") then
                    obj:SetAttribute("ImageReplaced", nil)
                end
                replaceTextInObject(obj)
                replaceImageInObject(obj)
            end
            
            -- Store player list connection
            local playerListConnection = playerList.DescendantAdded:Connect(function(obj)
                replaceTextInObject(obj)
                replaceImageInObject(obj)
            end)
            table.insert(activeConnections, playerListConnection)
        end
    end

    processPlayerList()
end

local function hookCoreGui()
    -- Clear existing attributes
    for _, obj in pairs(CoreGui:GetDescendants()) do
        if obj:GetAttribute("TextReplaced") then
            obj:SetAttribute("TextReplaced", nil)
        end
        if obj:GetAttribute("ImageReplaced") then
            obj:SetAttribute("ImageReplaced", nil)
        end
        replaceTextInObject(obj)
        replaceImageInObject(obj)
    end
    
    -- Store CoreGui connection
    local coreGuiConnection = CoreGui.DescendantAdded:Connect(function(obj)
        replaceTextInObject(obj)
        replaceImageInObject(obj)
    end)
    table.insert(activeConnections, coreGuiConnection)
end

-- Create modern UI
local function createModernUI()
    local ScreenGui = Instance.new("ScreenGui")
    ScreenGui.Name = "NameSpoofUI"
    ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
    ScreenGui.Parent = CoreGui

    local MainFrame = Instance.new("Frame")
    MainFrame.Name = "MainFrame"
    MainFrame.Size = UDim2.new(0, 350, 0, 400)
    MainFrame.Position = UDim2.new(0.5, -175, 0.5, -200)
    MainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
    MainFrame.BorderSizePixel = 0
    MainFrame.ClipsDescendants = true
    MainFrame.Parent = ScreenGui

    local UICorner = Instance.new("UICorner")
    UICorner.CornerRadius = UDim.new(0, 12)
    UICorner.Parent = MainFrame

    local TitleBar = Instance.new("Frame")
    TitleBar.Name = "TitleBar"
    TitleBar.Size = UDim2.new(1, 0, 0, 40)
    TitleBar.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
    TitleBar.BorderSizePixel = 0
    TitleBar.Parent = MainFrame

    local TitleCorner = Instance.new("UICorner")
    TitleCorner.CornerRadius = UDim.new(0, 12)
    TitleCorner.Parent = TitleBar

    local TitleLabel = Instance.new("TextLabel")
    TitleLabel.Name = "TitleLabel"
    TitleLabel.Size = UDim2.new(1, -40, 1, 0)
    TitleLabel.Position = UDim2.new(0, 20, 0, 0)
    TitleLabel.BackgroundTransparency = 1
    TitleLabel.Text = "Name Spoofer"
    TitleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
    TitleLabel.TextSize = 18
    TitleLabel.Font = Enum.Font.GothamBold
    TitleLabel.TextXAlignment = Enum.TextXAlignment.Left
    TitleLabel.Parent = TitleBar

    local CloseButton = Instance.new("TextButton")
    CloseButton.Name = "CloseButton"
    CloseButton.Size = UDim2.new(0, 30, 0, 30)
    CloseButton.Position = UDim2.new(1, -35, 0, 5)
    CloseButton.BackgroundColor3 = Color3.fromRGB(255, 60, 60)
    CloseButton.BorderSizePixel = 0
    CloseButton.Text = "×"
    CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
    CloseButton.TextSize = 20
    CloseButton.Font = Enum.Font.GothamBold
    CloseButton.Parent = TitleBar

    local CloseCorner = Instance.new("UICorner")
    CloseCorner.CornerRadius = UDim.new(0, 6)
    CloseCorner.Parent = CloseButton

    local ContentFrame = Instance.new("Frame")
    ContentFrame.Name = "ContentFrame"
    ContentFrame.Size = UDim2.new(1, -40, 1, -100)
    ContentFrame.Position = UDim2.new(0, 20, 0, 50)
    ContentFrame.BackgroundTransparency = 1
    ContentFrame.Parent = MainFrame

    local function createInputField(name, placeholder, defaultValue, yPosition)
        local Container = Instance.new("Frame")
        Container.Name = name .. "Container"
        Container.Size = UDim2.new(1, 0, 0, 70)
        Container.Position = UDim2.new(0, 0, 0, yPosition)
        Container.BackgroundTransparency = 1
        Container.Parent = ContentFrame

        local Label = Instance.new("TextLabel")
        Label.Name = name .. "Label"
        Label.Size = UDim2.new(1, 0, 0, 20)
        Label.BackgroundTransparency = 1
        Label.Text = placeholder
        Label.TextColor3 = Color3.fromRGB(200, 200, 200)
        Label.TextSize = 14
        Label.Font = Enum.Font.Gotham
        Label.TextXAlignment = Enum.TextXAlignment.Left
        Label.Parent = Container

        local TextBox = Instance.new("TextBox")
        TextBox.Name = name .. "TextBox"
        TextBox.Size = UDim2.new(1, 0, 0, 40)
        TextBox.Position = UDim2.new(0, 0, 0, 25)
        TextBox.BackgroundColor3 = Color3.fromRGB(50, 50, 60)
        TextBox.BorderSizePixel = 0
        TextBox.Text = tostring(defaultValue)
        TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
        TextBox.TextSize = 14
        TextBox.Font = Enum.Font.Gotham
        TextBox.PlaceholderText = placeholder
        TextBox.Parent = Container

        local BoxCorner = Instance.new("UICorner")
        BoxCorner.CornerRadius = UDim.new(0, 8)
        BoxCorner.Parent = TextBox

        local BoxPadding = Instance.new("UIPadding")
        BoxPadding.PaddingLeft = UDim.new(0, 10)
        BoxPadding.PaddingRight = UDim.new(0, 10)
        BoxPadding.Parent = TextBox

        return TextBox
    end

    local function createToggle(name, labelText, defaultValue, yPosition)
        local Container = Instance.new("Frame")
        Container.Name = name .. "Container"
        Container.Size = UDim2.new(1, 0, 0, 40)
        Container.Position = UDim2.new(0, 0, 0, yPosition)
        Container.BackgroundTransparency = 1
        Container.Parent = ContentFrame

        local ToggleLabel = Instance.new("TextLabel")
        ToggleLabel.Name = name .. "Label"
        ToggleLabel.Size = UDim2.new(0.7, 0, 1, 0)
        ToggleLabel.BackgroundTransparency = 1
        ToggleLabel.Text = labelText
        ToggleLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
        ToggleLabel.TextSize = 14
        ToggleLabel.Font = Enum.Font.Gotham
        ToggleLabel.TextXAlignment = Enum.TextXAlignment.Left
        ToggleLabel.Parent = Container

        local ToggleButton = Instance.new("TextButton")
        ToggleButton.Name = name .. "Toggle"
        ToggleButton.Size = UDim2.new(0, 50, 0, 25)
        ToggleButton.Position = UDim2.new(1, -50, 0.5, -34)
        ToggleButton.BackgroundColor3 = defaultValue and Color3.fromRGB(0, 170, 255) or Color3.fromRGB(80, 80, 90)
        ToggleButton.BorderSizePixel = 0
        ToggleButton.Text = "Remove Profile Picture                                                                "
        ToggleButton.Parent = Container

        local ToggleCorner = Instance.new("UICorner")
        ToggleCorner.CornerRadius = UDim.new(0, 12)
        ToggleCorner.Parent = ToggleButton

        local ToggleDot = Instance.new("Frame")
        ToggleDot.Name = "ToggleDot"
        ToggleDot.Size = UDim2.new(0, 19, 0, 19)
        ToggleDot.Position = defaultValue and UDim2.new(1, -21, 0.5, -9.5) or UDim2.new(0, 3, 0.5, -9.5)
        ToggleDot.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
        ToggleDot.BorderSizePixel = 0
        ToggleDot.Parent = ToggleButton

        local DotCorner = Instance.new("UICorner")
        DotCorner.CornerRadius = UDim.new(0, 9)
        DotCorner.Parent = ToggleDot

        return ToggleButton, function()
            local newValue = not defaultValue
            defaultValue = newValue
            TweenService:Create(ToggleButton, TweenInfo.new(0.2), {
                BackgroundColor3 = newValue and Color3.fromRGB(0, 170, 255) or Color3.fromRGB(80, 80, 90)
            }):Play()
            
            TweenService:Create(ToggleDot, TweenInfo.new(0.2), {
                Position = newValue and UDim2.new(1, -21, 0.5, -9.5) or UDim2.new(0, 3, 0.5, -9.5)
            }):Play()
            return newValue
        end
    end

    local DisplayNameInput = createInputField("DisplayName", "Fake Display Name", Config.FakeDisplayName, 0)
    local UserNameInput = createInputField("UserName", "Fake Username", Config.FakeName, 80)
    local UserIdInput = createInputField("UserId", "Fake User ID", Config.FakeId, 160)

    local BlankProfileToggle, updateBlankProfile = createToggle("BlankProfile", "Blank Profile Picture", Config.BlankProfilePicture, 240)

    local ApplyButton = Instance.new("TextButton")
    ApplyButton.Name = "ApplyButton"
    ApplyButton.Size = UDim2.new(1, 0, 0, 45)
    ApplyButton.Position = UDim2.new(0, 0, 1, -45)
    ApplyButton.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
    ApplyButton.BorderSizePixel = 0
    ApplyButton.Text = "Apply Spoof"
    ApplyButton.TextColor3 = Color3.fromRGB(255, 255, 255)
    ApplyButton.TextSize = 16
    ApplyButton.Font = Enum.Font.GothamBold
    ApplyButton.Parent = ContentFrame

    local ApplyCorner = Instance.new("UICorner")
    ApplyCorner.CornerRadius = UDim.new(0, 8)
    ApplyCorner.Parent = ApplyButton

    local dragging = false
    local dragInput, dragStart, startPos

    TitleBar.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            dragging = true
            dragStart = input.Position
            startPos = MainFrame.Position
            input.Changed:Connect(function()
                if input.UserInputState == Enum.UserInputState.End then
                    dragging = false
                end
            end)
        end
    end)

    TitleBar.InputChanged:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseMovement then
            dragInput = input
        end
    end)

    UserInputService.InputChanged:Connect(function(input)
        if input == dragInput and dragging then
            local delta = input.Position - dragStart
            MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
        end
    end)

    CloseButton.MouseButton1Click:Connect(function()
        ScreenGui:Destroy()
    end)

    CloseButton.MouseEnter:Connect(function()
        TweenService:Create(CloseButton, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(255, 100, 100)}):Play()
    end)

    CloseButton.MouseLeave:Connect(function()
        TweenService:Create(CloseButton, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(255, 60, 60)}):Play()
    end)

    BlankProfileToggle.MouseButton1Click:Connect(function()
        Config.BlankProfilePicture = updateBlankProfile()
    end)

    ApplyButton.MouseButton1Click:Connect(function()
        -- Cleanup before applying new settings
        cleanup()
        
        Config.FakeDisplayName = DisplayNameInput.Text
        Config.FakeName = UserNameInput.Text
        Config.FakeId = tonumber(UserIdInput.Text) or Config.FakeId

        setupGlobalHook()
        hookPlayerList()
        hookCoreGui()

        lp.DisplayName = Config.FakeDisplayName
        lp.CharacterAppearanceId = Config.FakeId

        ApplyButton.Text = "Success!"
        task.wait(1.5)
        ApplyButton.Text = "Apply Spoof"
    end)

    ApplyButton.MouseEnter:Connect(function()
        TweenService:Create(ApplyButton, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(0, 200, 255)}):Play()
    end)

    ApplyButton.MouseLeave:Connect(function()
        TweenService:Create(ApplyButton, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(0, 170, 255)}):Play()
    end)

    return ScreenGui
end

-- Initialize
createModernUI()
setupGlobalHook()
hookPlayerList()
hookCoreGui()

Ratings & Reviews

No reviews yet. Be the first to review this script!

Comments (0)

Please login to comment

Login with Discord

Loading comments...