ChipGUY V1
Key RequiredUniversal

ChipGUY V1

Universal ScriptChip_datguyChip_datguy 2.2K views 7 executesUpdated Aug 20, 2025
Unrated
00
Lua Script•430 lines (16695 chars)
--[[
    Roblox Executor Side Menu Script
    Features:
    - Toggleable side menu
    - Executor: Input and execute Lua code
    - X-ray: See player names, distance, and health through walls
    - Credits: Display script creators
]]

-- SERVICES
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local CoreGui = game:GetService("CoreGui") -- Using CoreGui for executor compatibility

-- LOCAL PLAYER
local LocalPlayer = Players.LocalPlayer

-- GUI SETUP
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "ExecutorSideMenu"
ScreenGui.Parent = CoreGui -- Parent to CoreGui for better executor reliability

-- MAIN MENU FRAME
local MenuFrame = Instance.new("Frame")
MenuFrame.Name = "MenuFrame"
MenuFrame.Size = UDim2.new(0, 350, 1, 0) -- Width: 350px, Full Height
MenuFrame.Position = UDim2.new(0, -MenuFrame.Size.X.Offset, 0, 0) -- Initially off-screen to the left
MenuFrame.AnchorPoint = Vector2.new(0, 0) -- Anchor at top-left
MenuFrame.BackgroundColor3 = Color3.fromRGB(0,0,0)
MenuFrame.BackgroundTransparency = 0.1
MenuFrame.BorderSizePixel = 0
MenuFrame.Parent = ScreenGui

-- UI Corner for aesthetics
local UICorner = Instance.new("UICorner")
UICorner.CornerRadius = UDim.new(0, 8)
UICorner.Parent = MenuFrame

-- UI STROKE for aesthetics
local UIStroke = Instance.new("UIStroke")
UIStroke.Color = Color3.fromRGB(255,100,4)
UIStroke.Thickness = 1
UIStroke.Parent = MenuFrame

-- MENU HEADER
local HeaderLabel = Instance.new("TextLabel")
HeaderLabel.Name = "Header"
HeaderLabel.Size = UDim2.new(1, 0, 0, 40)
HeaderLabel.Text = "ChipGUI"
HeaderLabel.Font = Enum.Font.SourceSansBold
HeaderLabel.TextSize = 24
HeaderLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
HeaderLabel.BackgroundTransparency = 1
HeaderLabel.Parent = MenuFrame

-- CONTENT FRAME (where sub-menus will be displayed)
local ContentFrame = Instance.new("Frame")
ContentFrame.Name = "ContentFrame"
ContentFrame.Size = UDim2.new(1, -120, 1, -40) -- Adjusted for buttons and header
ContentFrame.Position = UDim2.new(0, 120, 0, 40)
ContentFrame.BackgroundColor3 = Color3.fromRGB(0,0,0)
ContentFrame.BackgroundTransparency = 0.2
ContentFrame.BorderSizePixel = 0
ContentFrame.Parent = MenuFrame

local ContentUICorner = Instance.new("UICorner")
ContentUICorner.CornerRadius = UDim.new(0, 8)
ContentUICorner.Parent = ContentFrame

-- BUTTONS CONTAINER
local ButtonContainer = Instance.new("Frame")
ButtonContainer.Name = "ButtonContainer"
ButtonContainer.Size = UDim2.new(0, 120, 1, -40) -- Fixed width for buttons
ButtonContainer.Position = UDim2.new(0, 0, 0, 40)
ButtonContainer.BackgroundColor3 = Color3.fromRGB(255,100,4)
ButtonContainer.BackgroundTransparency = 0.1
ButtonContainer.BorderSizePixel = 0
ButtonContainer.Parent = MenuFrame

local ButtonListLayout = Instance.new("UIListLayout")
ButtonListLayout.FillDirection = Enum.FillDirection.Vertical
ButtonListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
ButtonListLayout.Padding = UDim.new(0, 5)
ButtonListLayout.Parent = ButtonContainer

-- TOGGLE BUTTON (to open/close the menu)
local ToggleButton = Instance.new("TextButton")
ToggleButton.Name = "ToggleButton"
ToggleButton.Size = UDim2.new(0, 100, 0, 40)
ToggleButton.Position = UDim2.new(0, 5, 0.5, -20) -- Positioned fixed on the left side
ToggleButton.Text = "Toggle Menu"
ToggleButton.Font = Enum.Font.SourceSansBold
ToggleButton.TextSize = 18
ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
ToggleButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
ToggleButton.Parent = ScreenGui

local ToggleUICorner = Instance.new("UICorner")
ToggleUICorner.CornerRadius = UDim.new(0, 8)
ToggleUICorner.Parent = ToggleButton

local ToggleUIStroke = Instance.new("UIStroke")
ToggleUIStroke.Color = Color3.fromRGB(90,90,90)
ToggleUIStroke.Thickness = 1
ToggleUIStroke.Parent = ToggleButton

-- GLOBAL VARIABLES
local menuOpen = false
local currentContent = nil
local xrayEnabled = false
local activeXRayBillboards = {} -- Table to hold active billboard GUIs for X-ray

-- TWEEN INFO for menu animation
local tweenInfoIn = TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local tweenInfoOut = TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.In)

-- HELPER FUNCTION TO CREATE MENU BUTTONS
local function createMenuButton(name, text)
    local button = Instance.new("TextButton")
    button.Name = name .. "Button"
    button.Size = UDim2.new(0.9, 0, 0, 35) -- Relative width, fixed height
    button.Text = text
    button.Font = Enum.Font.SourceSans
    button.TextSize = 16
    button.TextColor3 = Color3.fromRGB(200, 200, 200)
    button.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
    button.Parent = ButtonContainer

    local buttonUICorner = Instance.new("UICorner")
    buttonUICorner.CornerRadius = UDim.new(0, 5)
    buttonUICorner.Parent = button

    return button
end

-- HELPER FUNCTION TO SHOW SPECIFIC CONTENT
local function showContent(contentFrame)
    if currentContent then
        currentContent.Visible = false
    end
    contentFrame.Visible = true
    currentContent = contentFrame
end

-- ====================================================================================================
-- 1. EXECUTOR TAB
-- ====================================================================================================
local ExecutorContent = Instance.new("Frame")
ExecutorContent.Name = "ExecutorContent"
ExecutorContent.Size = UDim2.new(1, 0, 1, 0)
ExecutorContent.BackgroundTransparency = 1
ExecutorContent.Visible = false
ExecutorContent.Parent = ContentFrame

local ExecutorLayout = Instance.new("UIListLayout")
ExecutorLayout.FillDirection = Enum.FillDirection.Vertical
ExecutorLayout.Padding = UDim.new(0, 10)
ExecutorLayout.Parent = ExecutorContent

local ExecutorTextBox = Instance.new("TextBox")
ExecutorTextBox.Name = "ScriptInput"
ExecutorTextBox.Size = UDim2.new(1, 0, 0.8, 0)
ExecutorTextBox.MultiLine = true
ExecutorTextBox.TextWrapped = true
ExecutorTextBox.PlaceholderText = "Enter Lua code here..."
ExecutorTextBox.Text = ""
ExecutorTextBox.Font = Enum.Font.Code
ExecutorTextBox.TextSize = 14
ExecutorTextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
ExecutorTextBox.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
ExecutorTextBox.TextXAlignment = Enum.TextXAlignment.Left
ExecutorTextBox.TextYAlignment = Enum.TextYAlignment.Top
ExecutorTextBox.ClearTextOnFocus = false
ExecutorTextBox.Parent = ExecutorContent

local ExecuteButton = Instance.new("TextButton")
ExecuteButton.Name = "ExecuteButton"
ExecuteButton.Size = UDim2.new(1, 0, 0.2, -10) -- Adjust height to fit with padding
ExecuteButton.Text = "Execute Script"
ExecuteButton.Font = Enum.Font.SourceSansBold
ExecuteButton.TextSize = 20
ExecuteButton.TextColor3 = Color3.fromRGB(255, 255, 255)
ExecuteButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
ExecuteButton.Parent = ExecutorContent

local ExecutorButton = createMenuButton("Executor", "Executor")

ExecuteButton.MouseButton1Click:Connect(function()
    local code = ExecutorTextBox.Text
    if code ~= "" then
        local success, err = pcall(function()
            -- For security, actual production environments should avoid loadstring with user input.
            -- However, for executor scripts, loadstring is the primary method.
            local func = loadstring(code)
            if func then
                func()
            else
                warn("Failed to load string: " .. tostring(err))
            end
        end)
        if not success then
            warn("Script Execution Error: " .. tostring(err))
            -- Optionally, display error in a debug label or print to console
        end
    end
end)

-- ====================================================================================================
-- 2. X-RAY TAB
-- ====================================================================================================
local XRayContent = Instance.new("Frame")
XRayContent.Name = "XRayContent"
XRayContent.Size = UDim2.new(1, 0, 1, 0)
XRayContent.BackgroundTransparency = 1
XRayContent.Visible = false
XRayContent.Parent = ContentFrame

local XRayLayout = Instance.new("UIListLayout")
XRayLayout.FillDirection = Enum.FillDirection.Vertical
XRayLayout.Padding = UDim.new(0, 10)
XRayLayout.Parent = XRayContent

local XRayToggleBtn = Instance.new("TextButton")
XRayToggleBtn.Name = "XRayToggleButton"
XRayToggleBtn.Size = UDim2.new(1, 0, 0, 40)
XRayToggleBtn.Text = "Toggle X-ray (OFF)"
XRayToggleBtn.Font = Enum.Font.SourceSansBold
XRayToggleBtn.TextSize = 20
XRayToggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
XRayToggleBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50) -- Red for OFF
XRayToggleBtn.Parent = XRayContent

local XRayButton = createMenuButton("XRay", "X-ray")

local function createBillboardTag(player, head)
    local billboard = Instance.new("BillboardGui")
    billboard.Name = "XRayTag-" .. player.Name
    billboard.AlwaysOnTop = true
    billboard.Size = UDim2.new(0, 150, 0, 60) -- Width 150, Height 60
    billboard.StudsOffset = Vector3.new(0, 2, 0) -- Offset above head
    billboard.Adornee = head
    billboard.ZIndexBehavior = Enum.ZIndexBehavior.Sibling -- Render consistently

    local UIAspectRatio = Instance.new("UIAspectRatioConstraint")
    UIAspectRatio.AspectRatio = billboard.Size.X.Offset / billboard.Size.Y.Offset
    UIAspectRatio.AspectType = Enum.AspectType.FitWithinMaxSize
    UIAspectRatio.Parent = billboard

    local containerFrame = Instance.new("Frame")
    containerFrame.Name = "Container"
    containerFrame.Size = UDim2.new(1, 0, 1, 0)
    containerFrame.BackgroundTransparency = 0.8
    containerFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
    containerFrame.Parent = billboard

    local nameLabel = Instance.new("TextLabel")
    nameLabel.Name = "NameLabel"
    nameLabel.Size = UDim2.new(1, 0, 0.33, 0)
    nameLabel.Text = player.DisplayName or player.Name
    nameLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
    nameLabel.BackgroundTransparency = 1
    nameLabel.TextScaled = true
    nameLabel.Font = Enum.Font.SourceSansBold
    nameLabel.Parent = containerFrame

    local distanceLabel = Instance.new("TextLabel")
    distanceLabel.Name = "DistanceLabel"
    distanceLabel.Size = UDim2.new(1, 0, 0.33, 0)
    distanceLabel.Position = UDim2.new(0, 0, 0.33, 0)
    distanceLabel.Text = "Dist: Calculating..."
    distanceLabel.TextColor3 = Color3.fromRGB(150, 200, 255)
    distanceLabel.BackgroundTransparency = 1
    distanceLabel.TextScaled = true
    distanceLabel.Font = Enum.Font.SourceSans
    distanceLabel.Parent = containerFrame

    local healthLabel = Instance.new("TextLabel")
    healthLabel.Name = "HealthLabel"
    healthLabel.Size = UDim2.new(1, 0, 0.34, 0)
    healthLabel.Position = UDim2.new(0, 0, 0.66, 0)
    healthLabel.Text = "HP: ???/100"
    healthLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
    healthLabel.BackgroundTransparency = 1
    healthLabel.TextScaled = true
    healthLabel.Font = Enum.Font.SourceSans
    healthLabel.Parent = containerFrame

    billboard.Parent = head
    activeXRayBillboards[player.UserId] = billboard
end

local function updateXRay()
    if not xrayEnabled then return end

    local localCharacter = LocalPlayer.Character
    if not localCharacter then return end
    local localHead = localCharacter:FindFirstChild("Head")
    if not localHead then return end

    local playersToProcess = {}
    for _, player in pairs(Players:GetPlayers()) do
        if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("Humanoid") and player.Character:FindFirstChild("Head") then
            playersToProcess[player.UserId] = player
        end
    end

    -- Update existing or create new billboards
    for userId, player in pairs(playersToProcess) do
        local character = player.Character
        local head = character:FindFirstChild("Head")
        local humanoid = character:FindFirstChild("Humanoid")

        if head and humanoid and humanoid.Health > 0 then
            local billboard = activeXRayBillboards[userId]
            if not billboard then
                createBillboardTag(player, head)
                billboard = activeXRayBillboards[userId]
            end

            if billboard then
                local distance = (localHead.Position - head.Position).Magnitude
                billboard.DistanceLabel.Text = string.format("Dist: %.1f studs", distance)
                billboard.HealthLabel.Text = string.format("HP: %d/%d", math.floor(humanoid.Health), humanoid.MaxHealth)
                -- Color health based on value
                local healthRatio = humanoid.Health / humanoid.MaxHealth
                billboard.HealthLabel.TextColor3 = Color3.fromRGB(
                    math.floor(255 * (1 - healthRatio)),
                    math.floor(255 * healthRatio),
                    0
                )
            end
        else -- Player character died or removed, remove billboard
            if activeXRayBillboards[userId] then
                activeXRayBillboards[userId]:Destroy()
                activeXRayBillboards[userId] = nil
            end
        end
    end

    -- Remove billboards for players who have left the game
    for userId, billboard in pairs(activeXRayBillboards) do
        if not playersToProcess[userId] then
            billboard:Destroy()
            activeXRayBillboards[userId] = nil
        end
    end
end

XRayToggleBtn.MouseButton1Click:Connect(function()
    xrayEnabled = not xrayEnabled
    if xrayEnabled then
        XRayToggleBtn.Text = "Toggle X-ray (ON)"
        XRayToggleBtn.BackgroundColor3 = Color3.fromRGB(50, 200, 50) -- Green for ON
        -- Start continuous updates
        RunService.RenderStepped:Connect(updateXRay)
    else
        XRayToggleBtn.Text = "Toggle X-ray (OFF)"
        XRayToggleBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50) -- Red for OFF
        -- Clean up all existing billboards
        for userId, billboard in pairs(activeXRayBillboards) do
            billboard:Destroy()
            activeXRayBillboards[userId] = nil
        end
    end
end)

-- Initial run to attach RenderStepped if X-ray is enabled (though it starts off)
RunService.RenderStepped:Connect(updateXRay)


-- ====================================================================================================
-- 3. CREDITS TAB
-- ====================================================================================================
local CreditsContent = Instance.new("Frame")
CreditsContent.Name = "CreditsContent"
CreditsContent.Size = UDim2.new(1, 0, 1, 0)
CreditsContent.BackgroundTransparency = 1
CreditsContent.Visible = false
CreditsContent.Parent = ContentFrame

local CreditsLabel = Instance.new("TextLabel")
CreditsLabel.Name = "CreditsLabel"
CreditsLabel.Size = UDim2.new(1, 0, 1, 0)
CreditsLabel.Text = "--- Script Credits ---\n\nScript by:\n\nCreator Name 1\n(Chip)\n\nCreator Name 2\n(XRay broken rn  sorry)\n\n"
CreditsLabel.TextWrapped = true
CreditsLabel.Font = Enum.Font.SourceSans
CreditsLabel.TextSize = 18
CreditsLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
CreditsLabel.BackgroundTransparency = 1
CreditsLabel.Parent = CreditsContent

local CreditsButton = createMenuButton("Credits", "Credits")


-- ====================================================================================================
-- MAIN TOGGLE LOGIC
-- ====================================================================================================
ToggleButton.MouseButton1Click:Connect(function()
    menuOpen = not menuOpen
    if menuOpen then
        -- Tween in from off-screen (left) to 0,0 position
        local goal = {Position = UDim2.new(0, 0, 0, 0)}
        local tween = TweenService:Create(MenuFrame, tweenInfoIn, goal)
        tween:Play()
    else
        -- Tween out to off-screen (left) based on its width
        local goal = {Position = UDim2.new(0, -MenuFrame.Size.X.Offset, 0, 0)}
        local tween = TweenService:Create(MenuFrame, tweenInfoOut, goal)
        tween:Play()
    end
end)

-- ====================================================================================================
-- BUTTON CONNECTIONS
-- ====================================================================================================
ExecutorButton.MouseButton1Click:Connect(function()
    showContent(ExecutorContent)
end)

XRayButton.MouseButton1Click:Connect(function()
    showContent(XRayContent)
end)

CreditsButton.MouseButton1Click:Connect(function()
    showContent(CreditsContent)
end)

-- Initial display: show the Executor tab by default when opened
showContent(ExecutorContent)

Features & Information

A simple gui, having a broken as of right now Xray, and built in executor.

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts