Hub 10 scripts fixed
Key RequiredUniversal

Hub 10 scripts fixed

Universal Scriptmscript32mscript32 2.3K views 15 executesUpdated Jan 22, 2025
Unrated
00
Lua Script•147 lines (4590 chars)
-- Draggable Random Hub with 10 Scripts

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, 400, 0, 600)
mainFrame.Position = UDim2.new(0.5, -200, 0.5, -300)
mainFrame.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
mainFrame.BorderSizePixel = 2
mainFrame.BorderColor3 = Color3.fromRGB(255, 255, 255)
mainFrame.Parent = screenGui

-- Draggable Functionality
local dragging, dragInput, dragStart, startPos
local function update(input)
    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

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 dragging then
                update(input)
            end
        end)
    end
end)

mainFrame.InputEnded:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        dragging = false
    end
end)

-- Open/Close Button
local openButton = Instance.new("TextButton")
openButton.Size = UDim2.new(0, 150, 0, 50)
openButton.Position = UDim2.new(0.5, -75, 0, -25)
openButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
openButton.Text = "Open Hub"
openButton.TextSize = 20
openButton.Parent = screenGui

openButton.MouseButton1Click:Connect(function()
    mainFrame.Visible = not mainFrame.Visible
end)

-- Function to Create Buttons Dynamically for Scripts
local function createButton(name, func)
    local button = Instance.new("TextButton")
    button.Size = UDim2.new(0, 380, 0, 40)
    button.Position = UDim2.new(0, 10, 0, #mainFrame:GetChildren() * 50)
    button.BackgroundColor3 = Color3.fromRGB(0, 255, 255)
    button.Text = name
    button.TextSize = 18
    button.Parent = mainFrame

    button.MouseButton1Click:Connect(function()
        func()
    end)
end

-- Example Scripts

-- Script 1: Create Fire Effect
createButton("Activate Fire Effect", function()
    local fire = Instance.new("Fire")
    fire.Parent = player.Character.HumanoidRootPart
end)

-- Script 2: Teleport to Random Position
createButton("Teleport to Random Position", function()
    local randomX = math.random(-100, 100)
    local randomY = math.random(10, 100)
    local randomZ = math.random(-100, 100)
    player.Character:SetPrimaryPartCFrame(CFrame.new(randomX, randomY, randomZ))
end)

-- Script 3: Increase WalkSpeed
createButton("Increase WalkSpeed", function()
    player.Character.Humanoid.WalkSpeed = 100
end)

-- Script 4: Increase JumpPower
createButton("Increase JumpPower", function()
    player.Character.Humanoid.JumpPower = 200
end)

-- Script 5: Freeze Player
createButton("Freeze Player", function()
    player.Character.HumanoidRootPart.Anchored = true
end)

-- Script 6: Unfreeze Player
createButton("Unfreeze Player", function()
    player.Character.HumanoidRootPart.Anchored = false
end)

-- Script 7: Spawn Explosion
createButton("Create Explosion", function()
    local explosion = Instance.new("Explosion")
    explosion.Position = player.Character.HumanoidRootPart.Position
    explosion.BlastRadius = 10
    explosion.BlastPressure = 5000
    explosion.Parent = workspace
end)

-- Script 8: Change Character Color
createButton("Change Character Color", function()
    for _, part in pairs(player.Character:GetChildren()) do
        if part:IsA("BasePart") then
            part.Color = Color3.fromRGB(math.random(0,255), math.random(0,255), math.random(0,255))
        end
    end
end)

-- Script 9: Spawn Giant
createButton("Spawn Giant", function()
    local giant = Instance.new("Model")
    giant.Name = "Giant"
    local giantPart = Instance.new("Part")
    giantPart.Size = Vector3.new(10, 100, 10)
    giantPart.Position = player.Character.HumanoidRootPart.Position + Vector3.new(0, 50, 0)
    giantPart.Anchored = true
    giantPart.Parent = giant
    giant.Parent = workspace
end)

-- Script 10: Spawn Random NPC
createButton("Spawn Random NPC", function()
    local npc = Instance.new("Model")
    npc.Name = "NPC"
    local npcHead = Instance.new("Part")
    npcHead.Size = Vector3.new(2, 2, 2)
    npcHead.Position = player.Character.HumanoidRootPart.Position + Vector3.new(10, 0, 0)
    npcHead.Anchored = true
    npcHead.Parent = npc
    npc.Parent = workspace
end)

Features & Information

10 scripts

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts