Universal Script 📌
37.2k Views
322 Executions

Hub GUI Script

Universal Script 📌
mscript32
mscript32Published 25
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Idk

Updates

  1. Script edited: Create script

View Raw
-- Create the GUI Hub
local player = game.Players.LocalPlayer
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "RandomHub"
screenGui.Parent = player.PlayerGui

-- Main Frame
local mainFrame = Instance.new("Frame")
mainFrame.Size = UDim2.new(0, 300, 0, 400)
mainFrame.Position = UDim2.new(0.5, -150, 0.5, -200)
mainFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
mainFrame.BorderSizePixel = 2
mainFrame.BorderColor3 = Color3.fromRGB(0, 255, 0)
mainFrame.Visible = false
mainFrame.Parent = screenGui

-- Draggable Frame
local dragging, dragStart, startPos

mainFrame.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)

mainFrame.InputChanged:Connect(function(input)
    if dragging and input.UserInputType == Enum.UserInputType.MouseMovement 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)



Comments

6
Log in to join the conversation. Login
OpenConfiguration's profile picture
OpenConfiguration10 months ago

bro my gui is better than that trash

1
OpenConfiguration's profile picture
OpenConfiguration10 months ago

is ai code because it have --

1
jakebornald's profile picture
jakebornald7 months ago

@OpenConfiguration The -- thing is called "comments" in roblox scripting. More common when ai makes the code so it's probably made by ai. My *umption only tho

1
JustAGuest's profile picture
JustAGuest1 year ago

Is this ai code?

1
JustAGuest's profile picture
JustAGuest1 year ago

First, is this a script hub that uses scriptblox as search and second

1
JustAGuest's profile picture
JustAGuest1 year ago

@mscript32 Hey so I switched to codex today and I wanna ask u 2 questions

1

More universal scripts

See all
Universal Script 📌
4.9k
91.6k
Bumped 5 hours ago
Universal Script 📌
5.0k
3.4k
Bumped 6 hours ago
Script hub
2.7M
830.0k
Bumped 7 hours ago
Key System

Script hub

#1 today

Verified script badgeLumin Hub | #1 | Insta Steal

Universal Script 📌
660
1.0k
Bumped 8 hours ago
Universal Script 📌
8.4k
15.6k
Bumped 8 hours ago
Universal Script 📌
1.4k
5.3k
Bumped 9 hours ago