Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- JG's GUI Script
- ### Notes for Developers (AI or Human):
- - **Purpose of Notes:** These notes serve as a record for modifications made to the GUI. Always update the notes to reflect the current state of the code.
- - **Update Rule:** If any feature or component is added, removed, or modified, ensure the notes are updated to describe the change. Do not remove a feature from the code unless explicitly requested.
- - **Current Features:**
- 1. **GUI Title**:
- - Displays "JG's GUI" at the top.
- - Uses a sleek title bar design with a label and controls.
- - **Rainbow Animation**: Title text cycles through rainbow colors.
- 2. **Minimize Button (-)**:
- - Shrinks the GUI into a compact size at the bottom of the screen.
- - Animated transition to minimize and restore positions and sizes.
- 3. **Close Button (X)**:
- - Slides the GUI off the screen and destroys it.
- - Smooth animation during the closing transition.
- 4. **Search Bar**:
- - Dynamically filters the script list based on user input.
- - Works in real-time without requiring the Enter key.
- - Resets the filtered view when the search bar is cleared.
- 5. **Script Buttons**:
- - Each button executes a predefined script via `HttpGet` or `loadstring`.
- - Visual Indicator:
- - A green dot appears to the right of the button for successful execution.
- - A red dot blinks three times, then stays red, for failed execution.
- - Automatically logs execution results (success or error) in the logs.
- - Supports dynamic updates and layout adjustments.
- 6. **Diagnostics Button**:
- - Tests the executor's capabilities, including:
- - **HTTP Requests** (`game:HttpGet`).
- - **Loadstring Support** (`loadstring`).
- - **File Writing Support** (`writefile`).
- - Other advanced functionalities (e.g., `getgenv`, `hookfunction`, `getconnections`, etc.).
- - Results are displayed in the Diagnostics panel with clear green (supported) or red (not supported) labels.
- - Prevents stacking by dynamically clearing and repopulating the frame.
- 7. **View Logs Button**:
- - Displays logs from executed scripts or errors.
- - Logs successful execution in white text and errors in red text.
- - Dynamically updates when new logs are added.
- - Uses `UIListLayout` to ensure proper spacing and avoid stacking issues.
- - Includes a larger font size for better readability.
- 8. **Animations**:
- - Smooth slide transitions for minimizing and closing the GUI.
- - Fade-in and fade-out effects for Diagnostics and Logs frames.
- 9. **Fade Transitions**:
- - Diagnostics and Logs frames toggle visibility with fade effects.
- 10. **Dynamic Content Updates**:
- - Diagnostics and Logs panels clear and repopulate their frames dynamically when toggled.
- 11. **Layout Management**:
- - Uses `UIListLayout` in the Diagnostics and Logs panels to ensure consistent spacing between elements and prevent stacking.
- - Buttons and logs are dynamically spaced for readability.
- 12. **Robust Script Execution**:
- - Handles script execution via HTTP (`game:HttpGet`) or `loadstring`.
- - Handles errors gracefully, logging them and updating the corresponding button's indicator.
- 13. **Interactive Indicators**:
- - Each script button shows a dynamic indicator to the right:
- - **Green Dot**: For successful script execution.
- - **Red Blinking Dot**: For failed script execution (blinks three times, then stays red).
- - Indicators are visually distinct and update immediately after execution.
- 14. **Scrollable Script List**:
- - The script list is scrollable to accommodate a large number of scripts.
- - Buttons dynamically adjust visibility based on search results.
- 15. **Script List Auto-Management**:
- - The script list dynamically updates and filters based on user input.
- - Ensures buttons remain responsive and visually consistent.
- 16. **Loading Screen**:
- - A fullscreen loading screen with a progress bar.
- - Loading screen slides in at the start and animates a progress bar.
- - GUI becomes fully visible as the loading screen slides out.
- 17. **GUI Closing Animation**:
- - The GUI slides off to the left when the close button is pressed, instead of disappearing abruptly.
- 18. **Rainbow Effect**:
- - The title text cycles through a rainbow effect seamlessly.
- - **Guidelines for Future Edits:**
- - Any new feature added must be described in these notes.
- - Always verify functionality matches the description in the notes.
- - Ensure transitions, animations, and layout behavior remain consistent with the overall design.
- - Before removing any feature, confirm it was requested or justified in context.
- -- End of Notes --
- ]]
- -- Variables
- local TweenService = game:GetService("TweenService")
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- -- Utility function to create a new UI element with properties
- local function createUIElement(class, properties, parent)
- local element = Instance.new(class)
- for property, value in pairs(properties) do
- element[property] = value
- end
- element.Parent = parent
- return element
- end
- -- Function to add rounded corners
- local function addRoundedCorners(element, radius)
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, radius)
- corner.Parent = element
- end
- -- Function to create a tween for position changes
- local function slideTo(element, targetPosition, duration, callback)
- local tween = TweenService:Create(element, TweenInfo.new(duration, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = targetPosition})
- tween:Play()
- if callback then
- tween.Completed:Connect(callback)
- end
- end
- -- Function for the rainbow effect
- local function rainbowEffect(element, duration)
- spawn(function()
- while element do
- for hue = 0, 1, 0.01 do
- element.TextColor3 = Color3.fromHSV(hue, 1, 1)
- wait(duration / 100) -- Adjust speed
- end
- end
- end)
- end
- -- GUI Setup
- local gui = createUIElement("ScreenGui", {Name = "JG's GUI", ResetOnSpawn = false}, player:WaitForChild("PlayerGui"))
- -- Add Loading Screen
- local loadingScreen = createUIElement("Frame", {
- Size = UDim2.new(1, 0, 1, 0),
- Position = UDim2.new(1, 0, 0, 0), -- Start off-screen
- BackgroundColor3 = Color3.fromRGB(30, 30, 30),
- BorderSizePixel = 0,
- ZIndex = 10 -- Ensures it appears above all other elements
- }, gui)
- local loadingText = createUIElement("TextLabel", {
- Size = UDim2.new(0.4, 0, 0.1, 0),
- Position = UDim2.new(0.3, 0, 0.4, 0),
- BackgroundTransparency = 1,
- Text = "Initializing...",
- TextColor3 = Color3.fromRGB(255, 255, 255),
- TextScaled = true,
- Font = Enum.Font.GothamBold,
- ZIndex = 11 -- Appears above the loading screen background
- }, loadingScreen)
- local loadingBarBackground = createUIElement("Frame", {
- Size = UDim2.new(0.6, 0, 0.05, 0),
- Position = UDim2.new(0.2, 0, 0.55, 0),
- BackgroundColor3 = Color3.fromRGB(50, 50, 50),
- BorderSizePixel = 0,
- ZIndex = 11
- }, loadingScreen)
- addRoundedCorners(loadingBarBackground, 8)
- local loadingBar = createUIElement("Frame", {
- Size = UDim2.new(0, 0, 1, 0),
- Position = UDim2.new(0, 0, 0, 0),
- BackgroundColor3 = Color3.fromRGB(0, 150, 255),
- BorderSizePixel = 0,
- ZIndex = 12
- }, loadingBarBackground)
- addRoundedCorners(loadingBar, 8)
- -- Main GUI (Initially Hidden)
- local mainFrame = createUIElement("Frame", {
- Size = UDim2.new(0.6, 0, 0.7, 0),
- Position = UDim2.new(0.2, 0, 0.15, 0),
- BackgroundColor3 = Color3.fromRGB(40, 40, 40),
- BorderSizePixel = 0,
- Visible = false -- Hidden until the loading screen starts sliding out
- }, gui)
- addRoundedCorners(mainFrame, 12)
- -- Title Bar for Main GUI
- local titleBar = createUIElement("Frame", {
- Size = UDim2.new(1, 0, 0, 50),
- BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- }, mainFrame)
- addRoundedCorners(titleBar, 12)
- local titleText = createUIElement("TextLabel", {
- Size = UDim2.new(1, -50, 1, 0),
- Position = UDim2.new(0, 5, 0, 0),
- BackgroundTransparency = 1,
- Text = "JG's GUI",
- TextColor3 = Color3.fromRGB(255, 255, 255),
- TextScaled = true,
- Font = Enum.Font.GothamBold,
- TextXAlignment = Enum.TextXAlignment.Left
- }, titleBar)
- -- Apply the Rainbow Effect to the Title
- rainbowEffect(titleText, 5)
- -- Function to animate the Loading Screen
- local function startLoadingScreen(duration, callback)
- -- Slide in the loading screen
- slideTo(loadingScreen, UDim2.new(0, 0, 0, 0), 1, function()
- -- Animate the loading bar
- local tween = TweenService:Create(loadingBar, TweenInfo.new(duration, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {Size = UDim2.new(1, 0, 1, 0)})
- tween:Play()
- tween.Completed:Connect(function()
- -- Show the main GUI
- mainFrame.Visible = true
- -- Slide out the loading screen
- slideTo(loadingScreen, UDim2.new(-1, 0, 0, 0), 1, function()
- loadingScreen:Destroy()
- if callback then
- callback()
- end
- end)
- end)
- end)
- end
- -- Start the Loading Screen
- startLoadingScreen(5, function()
- print("Loading complete! GUI is now visible.")
- end)
- -- Close Button for Main GUI
- local closeButton = createUIElement("TextButton", {
- Size = UDim2.new(0, 40, 0, 40),
- Position = UDim2.new(1, -50, 0.5, -20),
- BackgroundColor3 = Color3.fromRGB(200, 0, 0),
- Text = "X",
- TextColor3 = Color3.fromRGB(255, 255, 255),
- Font = Enum.Font.GothamBold,
- TextScaled = true
- }, titleBar)
- addRoundedCorners(closeButton, 8)
- -- Slide the GUI out when closing
- closeButton.MouseButton1Click:Connect(function()
- slideTo(mainFrame, UDim2.new(-1, 0, mainFrame.Position.Y.Scale, mainFrame.Position.Y.Offset), 1, function()
- gui:Destroy()
- end)
- end)
- -- Minimize Button (-)
- local minimizeButton = createUIElement("TextButton", {
- Size = UDim2.new(0, 40, 0, 40),
- Position = UDim2.new(1, -100, 0.5, -20),
- BackgroundColor3 = Color3.fromRGB(200, 200, 0),
- Text = "-",
- TextColor3 = Color3.fromRGB(255, 255, 255),
- Font = Enum.Font.GothamBold,
- TextScaled = true
- }, titleBar)
- addRoundedCorners(minimizeButton, 8)
- local isMinimized = false
- local minimizedSize = UDim2.new(0.3, 0, 0, 50) -- Smaller size for minimized GUI
- local minimizedPosition = UDim2.new(0.35, 0, 0.85, 0) -- Bottom center of the screen
- local originalSize = mainFrame.Size
- local originalPosition = mainFrame.Position
- minimizeButton.MouseButton1Click:Connect(function()
- if isMinimized then
- slideTo(mainFrame, originalPosition, 1) -- Slower slide back to original position
- mainFrame:TweenSize(originalSize, "Out", "Quad", 1)
- isMinimized = false
- else
- slideTo(mainFrame, minimizedPosition, 1) -- Slower slide to minimized position
- mainFrame:TweenSize(minimizedSize, "Out", "Quad", 1)
- isMinimized = true
- end
- end)
- -- Track the currently open frame
- local currentOpenFrame = nil
- -- Function to toggle frames with mutual exclusivity
- local function toggleFrame(frame, refreshFunction)
- if currentOpenFrame == frame then
- -- If the current frame is already open, close it
- fade(frame, 1, 0.5, function()
- frame.Visible = false
- currentOpenFrame = nil
- end)
- else
- -- Close the currently open frame, if any
- if currentOpenFrame then
- fade(currentOpenFrame, 1, 0.5, function()
- currentOpenFrame.Visible = false
- end)
- end
- -- Open the new frame
- if refreshFunction then
- refreshFunction() -- Refresh the content of the new frame
- end
- frame.Visible = true
- fade(frame, 0, 0.5)
- currentOpenFrame = frame
- end
- end
- -- Diagnostics Panel
- local diagnosticsFrame = createUIElement("ScrollingFrame", {
- Size = UDim2.new(0.5, 0, 0.6, 0),
- Position = UDim2.new(0.5, 0, 0.25, 0),
- BackgroundColor3 = Color3.fromRGB(20, 20, 20),
- ScrollBarThickness = 8,
- Visible = false
- }, mainFrame)
- addRoundedCorners(diagnosticsFrame, 8)
- local function refreshDiagnostics()
- diagnosticsFrame:ClearAllChildren()
- local layout = createUIElement("UIListLayout", {Padding = UDim.new(0, 5)}, diagnosticsFrame)
- local capabilities = {
- {name = "HTTP Requests", supported = pcall(function() return game:HttpGet("https://www.roblox.com") end)},
- {name = "Loadstring", supported = pcall(function() return loadstring("return true") end)},
- {name = "File Writing", supported = pcall(function() return writefile("test.txt", "Test") end)},
- {name = "getgenv", supported = pcall(function() return getgenv() end)},
- {name = "hookfunction", supported = pcall(function() return hookfunction end)},
- {name = "getconnections", supported = pcall(function() return getconnections end)},
- }
- for _, capability in ipairs(capabilities) do
- createUIElement("TextLabel", {
- Size = UDim2.new(1, -10, 0, 30),
- Text = capability.name .. ": " .. (capability.supported and "Supported" or "Not Supported"),
- TextColor3 = capability.supported and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 0, 0),
- BackgroundTransparency = 1,
- Font = Enum.Font.Gotham,
- TextScaled = true
- }, diagnosticsFrame)
- end
- end
- local diagnosticsButton = createUIElement("TextButton", {
- Size = UDim2.new(0.15, 0, 0, 30),
- Position = UDim2.new(0.7, 0, 0.9, 0),
- Text = "Diagnostics",
- TextColor3 = Color3.fromRGB(255, 255, 255),
- BackgroundColor3 = Color3.fromRGB(45, 45, 45),
- Font = Enum.Font.Gotham,
- TextScaled = true
- }, mainFrame)
- addRoundedCorners(diagnosticsButton, 8)
- diagnosticsButton.MouseButton1Click:Connect(function()
- toggleFrame(diagnosticsFrame, refreshDiagnostics)
- end)
- -- Logs Panel
- local logsFrame = createUIElement("ScrollingFrame", {
- Size = UDim2.new(0.5, 0, 0.6, 0),
- Position = UDim2.new(0.5, 0, 0.25, 0),
- BackgroundColor3 = Color3.fromRGB(20, 20, 20),
- ScrollBarThickness = 8,
- Visible = false,
- ClipsDescendants = true -- Prevents overflow outside the frame
- }, mainFrame)
- addRoundedCorners(logsFrame, 8)
- -- Add a UIListLayout to ensure proper spacing
- local logsLayout = createUIElement("UIListLayout", {
- Padding = UDim.new(0, 5), -- Space between log entries
- FillDirection = Enum.FillDirection.Vertical, -- Vertical stacking
- SortOrder = Enum.SortOrder.LayoutOrder -- Ordered by LayoutOrder
- }, logsFrame)
- local logs = {}
- local function addLogEntry(entry, isError)
- local color = isError and Color3.fromRGB(255, 0, 0) or Color3.fromRGB(255, 255, 255)
- table.insert(logs, {text = os.date("[%X] ") .. entry, color = color})
- -- Create a new log entry in the frame
- createUIElement("TextLabel", {
- Size = UDim2.new(1, -10, 0, 40), -- Increased height for larger text
- Text = os.date("[%X] ") .. entry,
- TextColor3 = color,
- BackgroundTransparency = 1,
- Font = Enum.Font.Gotham,
- TextSize = 20, -- Set a larger text size
- TextWrapped = true, -- Wrap text if it exceeds the width
- LayoutOrder = #logs -- Ensure logs are ordered
- }, logsFrame)
- end
- local function refreshLogsFrame()
- logsFrame:ClearAllChildren() -- Clear current logs
- createUIElement("UIListLayout", {Padding = UDim.new(0, 5)}, logsFrame) -- Re-add layout
- for _, log in ipairs(logs) do
- createUIElement("TextLabel", {
- Size = UDim2.new(1, -10, 0, 40), -- Consistent height for larger text
- Text = log.text,
- TextColor3 = log.color,
- BackgroundTransparency = 1,
- Font = Enum.Font.Gotham,
- TextSize = 20, -- Set a larger text size
- TextWrapped = true,
- LayoutOrder = _
- }, logsFrame)
- end
- end
- -- Logs Button
- local logsButton = createUIElement("TextButton", {
- Size = UDim2.new(0.15, 0, 0, 30),
- Position = UDim2.new(0.85, 0, 0.9, 0),
- Text = "View Logs",
- TextColor3 = Color3.fromRGB(255, 255, 255),
- BackgroundColor3 = Color3.fromRGB(45, 45, 45),
- Font = Enum.Font.Gotham,
- TextScaled = true
- }, mainFrame)
- addRoundedCorners(logsButton, 8)
- logsButton.MouseButton1Click:Connect(function()
- toggleFrame(logsFrame, refreshLogsFrame)
- end)
- -- Script List
- local scriptsFrame = createUIElement("ScrollingFrame", {
- Size = UDim2.new(0.4, 0, 0.6, 0),
- Position = UDim2.new(0.05, 0, 0.25, 0),
- BackgroundColor3 = Color3.fromRGB(50, 50, 50),
- ScrollBarThickness = 8
- }, mainFrame)
- addRoundedCorners(scriptsFrame, 8)
- local scriptsLayout = createUIElement("UIListLayout", {Padding = UDim.new(0, 5)}, scriptsFrame)
- local buttons = {
- {name = "InventoryChecker", text = "Inventory Checker", color = Color3.fromRGB(255, 165, 0), scriptUrl = "https://pastebin.com/raw/hAArcq8L", directLoadstring = true},
- {name = "MiniMap", text = "Mini Map", color = Color3.fromRGB(100, 100, 200), scriptUrl = "https://pastebin.com/raw/RC68w0yJ", directLoadstring = true},
- {name = "MissileLocker3.0", text = "Missile Locker 3.0", color = Color3.fromRGB(200, 0, 0), scriptUrl = "https://pastebin.com/raw/Sw30RsRj", directLoadstring = false},
- {name = "MissileLockerPVP3.0", text = "Missile Locker PVP 3.0", color = Color3.fromRGB(0, 200, 0), scriptUrl = "https://pastebin.com/raw/eyQkGPpX", directLoadstring = true},
- {name = "NamelessAdmin", text = "Nameless Admin", color = Color3.fromRGB(150, 0, 150), scriptUrl = "https://raw.githubusercontent.com/FD2Team/Nameless-Admin-No-Byfron-Kick/main/Source", directLoadstring = false},
- {name = "SkyFEGUI", text = "Sky FE GUI", color = Color3.fromRGB(0, 150, 200), scriptUrl = "https://raw.githubusercontent.com/yofriendfromschool1/Sky-Hub/main/FE%20Trolling%20GUI.luau", directLoadstring = false},
- {name = "Telekinesis", text = "Telekinesis", color = Color3.fromRGB(0, 0, 200), scriptUrl = "https://pastebin.com/raw/dfkijtzG", directLoadstring = false},
- {name = "SupermanFly", text = "Superman Fly", color = Color3.fromRGB(0, 0, 255), scriptUrl = "https://pastebin.com/raw/bbgJDXSK", directLoadstring = true},
- {name = "ObjectESP", text = "Object ESP", color = Color3.fromRGB(255, 69, 0), scriptUrl = "https://pastebin.com/raw/QZ9yzEgz", directLoadstring = true},
- {name = "SpectateTP", text = "Spectate TP", color = Color3.fromRGB(0, 128, 255), scriptUrl = "https://pastebin.com/raw/gHErb073", directLoadstring = true}
- }
- local function createScriptButtons()
- for _, buttonInfo in ipairs(buttons) do
- local scriptButton = createUIElement("TextButton", {
- Size = UDim2.new(1, 0, 0, 30),
- BackgroundColor3 = buttonInfo.color,
- Text = buttonInfo.text,
- TextColor3 = Color3.fromRGB(255, 255, 255),
- Font = Enum.Font.Gotham,
- TextScaled = true,
- AutoButtonColor = true
- }, scriptsFrame)
- addRoundedCorners(scriptButton, 8)
- -- Add indicator dot
- local indicatorDot = createUIElement("Frame", {
- Size = UDim2.new(0, 20, 0, 20),
- Position = UDim2.new(0.9, 0, 0.5, -10),
- BackgroundColor3 = Color3.fromRGB(150, 150, 150),
- BorderSizePixel = 0,
- Visible = false
- }, scriptButton)
- addRoundedCorners(indicatorDot, 10)
- scriptButton.MouseButton1Click:Connect(function()
- indicatorDot.Visible = true
- local success, err = pcall(function()
- local scriptContent = game:HttpGet(buttonInfo.scriptUrl)
- loadstring(scriptContent)()
- end)
- if success then
- indicatorDot.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
- addLogEntry("Executed: " .. buttonInfo.text, false)
- else
- indicatorDot.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- addLogEntry("Error executing: " .. buttonInfo.text .. " - " .. err, true)
- end
- refreshLogsFrame()
- end)
- end
- end
- createScriptButtons()
- -- Search Bar
- local searchBar = createUIElement("TextBox", {
- Size = UDim2.new(0.4, 0, 0, 30),
- Position = UDim2.new(0.05, 0, 0.2, 0),
- PlaceholderText = "Search scripts...",
- TextColor3 = Color3.fromRGB(255, 255, 255),
- BackgroundColor3 = Color3.fromRGB(50, 50, 50),
- Font = Enum.Font.Gotham,
- TextScaled = true,
- ClearTextOnFocus = false
- }, mainFrame)
- addRoundedCorners(searchBar, 8)
- searchBar:GetPropertyChangedSignal("Text"):Connect(function()
- for _, button in ipairs(scriptsFrame:GetChildren()) do
- if button:IsA("TextButton") then
- button.Visible = button.Text:lower():find(searchBar.Text:lower()) ~= nil
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement