SkyBoxinjectHUB
Key RequiredUniversal

SkyBoxinjectHUB

Universal Scriptakkiiakkii 5.1K views 3.7K executesUpdated Jan 1, 2026
5.0/ 5(2 votes)
20100% Positive
Lua Script•838 lines (26751 chars)
-- Script Name: SkyBox_injectHUB
-- Author: akkii
-- Provider: 土星コミュニティ

local Players = game:GetService("Players")
local Lighting = game:GetService("Lighting")
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")

local player = Players.LocalPlayer
local mouse = player:GetMouse()

-- GUIのメイン設定
local SkyBox_injectHUB = Instance.new("ScreenGui")
SkyBox_injectHUB.Name = "SkyBox_injectHUB"
SkyBox_injectHUB.ResetOnSpawn = false
SkyBox_injectHUB.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
SkyBox_injectHUB.Parent = player:WaitForChild("PlayerGui")

-- 開閉ボタン(動かせるように)
local OpenButton = Instance.new("TextButton")
OpenButton.Name = "OpenButton"
OpenButton.Size = UDim2.new(0, 70, 0, 30)
OpenButton.Position = UDim2.new(0, 20, 0, 20)
OpenButton.BackgroundColor3 = Color3.fromRGB(30, 136, 229)
OpenButton.TextColor3 = Color3.fromRGB(255, 255, 255)
OpenButton.Text = "OPEN"
OpenButton.Font = Enum.Font.GothamBold
OpenButton.TextSize = 11
OpenButton.BorderSizePixel = 0
OpenButton.Parent = SkyBox_injectHUB

local UICorner2 = Instance.new("UICorner")
UICorner2.CornerRadius = UDim.new(0, 6)
UICorner2.Parent = OpenButton

-- メインGUIフレーム(横に広げる)
local MainFrame = Instance.new("Frame")
MainFrame.Name = "MainFrame"
MainFrame.Size = UDim2.new(0, 380, 0, 280)  -- 横に広げて380x280に
MainFrame.Position = UDim2.new(0, 20, 0, 60)
MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 35)
MainFrame.BorderSizePixel = 0
MainFrame.ClipsDescendants = true
MainFrame.Parent = SkyBox_injectHUB
MainFrame.Visible = false

-- 角丸
local UICorner1 = Instance.new("UICorner")
UICorner1.CornerRadius = UDim.new(0, 8)
UICorner1.Parent = MainFrame

-- タイトル
local Title = Instance.new("TextLabel")
Title.Name = "Title"
Title.Size = UDim2.new(1, 0, 0, 35)
Title.Position = UDim2.new(0, 0, 0, 0)
Title.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
Title.Text = "SkyBox Injector"
Title.TextColor3 = Color3.fromRGB(255, 255, 255)
Title.Font = Enum.Font.GothamBold
Title.TextSize = 14
Title.Parent = MainFrame

-- タブコンテナ(4つのタブ用)
local TabContainer = Instance.new("Frame")
TabContainer.Name = "TabContainer"
TabContainer.Size = UDim2.new(1, -20, 0, 30)
TabContainer.Position = UDim2.new(0, 10, 0, 45)
TabContainer.BackgroundTransparency = 1
TabContainer.Parent = MainFrame

-- タブボタン(4つのタブ)
local OniichanTabButton = Instance.new("TextButton")
OniichanTabButton.Name = "OniichanTabButton"
OniichanTabButton.Size = UDim2.new(0.24, 0, 1, 0)
OniichanTabButton.Position = UDim2.new(0, 0, 0, 0)
OniichanTabButton.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
OniichanTabButton.Text = "おにーちゃん"
OniichanTabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
OniichanTabButton.Font = Enum.Font.GothamBold
OniichanTabButton.TextSize = 11
OniichanTabButton.Parent = TabContainer

local NekoTabButton = Instance.new("TextButton")
NekoTabButton.Name = "NekoTabButton"
NekoTabButton.Size = UDim2.new(0.24, 0, 1, 0)
NekoTabButton.Position = UDim2.new(0.25, 0, 0, 0)
NekoTabButton.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
NekoTabButton.Text = "Neko"
NekoTabButton.TextColor3 = Color3.fromRGB(200, 200, 200)
NekoTabButton.Font = Enum.Font.GothamBold
NekoTabButton.TextSize = 11
NekoTabButton.Parent = TabContainer

local SkyTabButton = Instance.new("TextButton")
SkyTabButton.Name = "SkyTabButton"
SkyTabButton.Size = UDim2.new(0.24, 0, 1, 0)
SkyTabButton.Position = UDim2.new(0.50, 0, 0, 0)
SkyTabButton.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
SkyTabButton.Text = "Sky"
SkyTabButton.TextColor3 = Color3.fromRGB(200, 200, 200)
SkyTabButton.Font = Enum.Font.GothamBold
SkyTabButton.TextSize = 11
SkyTabButton.Parent = TabContainer

local HackerTabButton = Instance.new("TextButton")
HackerTabButton.Name = "HackerTabButton"
HackerTabButton.Size = UDim2.new(0.24, 0, 1, 0)
HackerTabButton.Position = UDim2.new(0.75, 0, 0, 0)
HackerTabButton.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
HackerTabButton.Text = "Hacker"
HackerTabButton.TextColor3 = Color3.fromRGB(200, 200, 200)
HackerTabButton.Font = Enum.Font.GothamBold
HackerTabButton.TextSize = 11
HackerTabButton.Parent = TabContainer

local UICornerTab1 = Instance.new("UICorner")
UICornerTab1.CornerRadius = UDim.new(0, 6)
UICornerTab1.Parent = OniichanTabButton

local UICornerTab2 = Instance.new("UICorner")
UICornerTab2.CornerRadius = UDim.new(0, 6)
UICornerTab2.Parent = NekoTabButton

local UICornerTab3 = Instance.new("UICorner")
UICornerTab3.CornerRadius = UDim.new(0, 6)
UICornerTab3.Parent = SkyTabButton

local UICornerTab4 = Instance.new("UICorner")
UICornerTab4.CornerRadius = UDim.new(0, 6)
UICornerTab4.Parent = HackerTabButton

-- コンテンツフレーム
local ContentFrame = Instance.new("Frame")
ContentFrame.Name = "ContentFrame"
ContentFrame.Size = UDim2.new(1, -20, 0, 140)
ContentFrame.Position = UDim2.new(0, 10, 0, 85)
ContentFrame.BackgroundTransparency = 1
ContentFrame.Parent = MainFrame

-- おにーちゃんコンテンツ
local OniichanContent = Instance.new("Frame")
OniichanContent.Name = "OniichanContent"
OniichanContent.Size = UDim2.new(1, 0, 1, 0)
OniichanContent.BackgroundTransparency = 1
OniichanContent.Visible = true
OniichanContent.Parent = ContentFrame

-- Nekoコンテンツ
local NekoContent = Instance.new("Frame")
NekoContent.Name = "NekoContent"
NekoContent.Size = UDim2.new(1, 0, 1, 0)
NekoContent.BackgroundTransparency = 1
NekoContent.Visible = false
NekoContent.Parent = ContentFrame

-- Skyコンテンツ
local SkyContent = Instance.new("Frame")
SkyContent.Name = "SkyContent"
SkyContent.Size = UDim2.new(1, 0, 1, 0)
SkyContent.BackgroundTransparency = 1
SkyContent.Visible = false
SkyContent.Parent = ContentFrame

-- Hackerコンテンツ
local HackerContent = Instance.new("Frame")
HackerContent.Name = "HackerContent"
HackerContent.Size = UDim2.new(1, 0, 1, 0)
HackerContent.BackgroundTransparency = 1
HackerContent.Visible = false
HackerContent.Parent = ContentFrame

-- おにーちゃん画像選択ボタン
local OniichanImageIds = {
    "85668780400857",
    "127159956121416", 
    "96098055051594"
}

local OniichanImageNames = {
    "空 1",
    "空 2", 
    "空 3"
}

local buttonHeight = 25
local buttonSpacing = 6
local buttonWidth = 0.48

for i, id in ipairs(OniichanImageIds) do
    local row = math.ceil(i / 2)
    local col = (i - 1) % 2
    
    local ImageButton = Instance.new("TextButton")
    ImageButton.Name = "OniichanImageButton_" .. i
    ImageButton.Size = UDim2.new(buttonWidth, -3, 0, buttonHeight)
    ImageButton.Position = UDim2.new(col * buttonWidth, col * 6, 0, (row-1)*(buttonHeight + buttonSpacing))
    ImageButton.BackgroundColor3 = Color3.fromRGB(65, 65, 75)
    ImageButton.Text = OniichanImageNames[i]
    ImageButton.TextColor3 = Color3.fromRGB(255, 255, 255)
    ImageButton.Font = Enum.Font.Gotham
    ImageButton.TextSize = 11
    ImageButton.Parent = OniichanContent
    
    local UICorner = Instance.new("UICorner")
    UICorner.CornerRadius = UDim.new(0, 6)
    UICorner.Parent = ImageButton
    
    ImageButton.MouseButton1Click:Connect(function()
        applySkyboxTexture(id)
    end)
    
    -- ツールチップ
    local Tooltip = Instance.new("TextLabel")
    Tooltip.Name = "Tooltip"
    Tooltip.Size = UDim2.new(0, 150, 0, 30)
    Tooltip.Position = UDim2.new(0, 0, 0, -35)
    Tooltip.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
    Tooltip.Text = "ID: " .. id
    Tooltip.TextColor3 = Color3.fromRGB(200, 200, 200)
    Tooltip.Font = Enum.Font.Gotham
    Tooltip.TextSize = 10
    Tooltip.Visible = false
    Tooltip.Parent = ImageButton
    
    local UICornerTip = Instance.new("UICorner")
    UICornerTip.CornerRadius = UDim.new(0, 4)
    UICornerTip.Parent = Tooltip
    
    ImageButton.MouseEnter:Connect(function()
        Tooltip.Visible = true
    end)
    
    ImageButton.MouseLeave:Connect(function()
        Tooltip.Visible = false
    end)
end

-- Neko画像選択ボタン
local NekoImageIds = {
    "82629388569737",
    "118436084084848", 
    "132961920518784"
}

local NekoImageNames = {
    "猫 1",
    "猫 2", 
    "猫 3"
}

for i, id in ipairs(NekoImageIds) do
    local row = math.ceil(i / 2)
    local col = (i - 1) % 2
    
    local ImageButton = Instance.new("TextButton")
    ImageButton.Name = "NekoImageButton_" .. i
    ImageButton.Size = UDim2.new(buttonWidth, -3, 0, buttonHeight)
    ImageButton.Position = UDim2.new(col * buttonWidth, col * 6, 0, (row-1)*(buttonHeight + buttonSpacing))
    ImageButton.BackgroundColor3 = Color3.fromRGB(65, 65, 75)
    ImageButton.Text = NekoImageNames[i]
    ImageButton.TextColor3 = Color3.fromRGB(255, 255, 255)
    ImageButton.Font = Enum.Font.Gotham
    ImageButton.TextSize = 11
    ImageButton.Parent = NekoContent
    
    local UICorner = Instance.new("UICorner")
    UICorner.CornerRadius = UDim.new(0, 6)
    UICorner.Parent = ImageButton
    
    ImageButton.MouseButton1Click:Connect(function()
        applySkyboxTexture(id)
    end)
    
    -- ツールチップ
    local Tooltip = Instance.new("TextLabel")
    Tooltip.Name = "Tooltip"
    Tooltip.Size = UDim2.new(0, 150, 0, 30)
    Tooltip.Position = UDim2.new(0, 0, 0, -35)
    Tooltip.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
    Tooltip.Text = "ID: " .. id
    Tooltip.TextColor3 = Color3.fromRGB(200, 200, 200)
    Tooltip.Font = Enum.Font.Gotham
    Tooltip.TextSize = 10
    Tooltip.Visible = false
    Tooltip.Parent = ImageButton
    
    local UICornerTip = Instance.new("UICorner")
    UICornerTip.CornerRadius = UDim.new(0, 4)
    UICornerTip.Parent = Tooltip
    
    ImageButton.MouseEnter:Connect(function()
        Tooltip.Visible = true
    end)
    
    ImageButton.MouseLeave:Connect(function()
        Tooltip.Visible = false
    end)
end

-- Sky画像選択ボタン
local SkyImageIds = {
    "91773772628037",
    "116795456743711", 
    "115730337762745"
}

local SkyImageNames = {
    "Sky 1",
    "Sky 2", 
    "Sky 3"
}

for i, id in ipairs(SkyImageIds) do
    local row = math.ceil(i / 2)
    local col = (i - 1) % 2
    
    local ImageButton = Instance.new("TextButton")
    ImageButton.Name = "SkyImageButton_" .. i
    ImageButton.Size = UDim2.new(buttonWidth, -3, 0, buttonHeight)
    ImageButton.Position = UDim2.new(col * buttonWidth, col * 6, 0, (row-1)*(buttonHeight + buttonSpacing))
    ImageButton.BackgroundColor3 = Color3.fromRGB(65, 65, 75)
    ImageButton.Text = SkyImageNames[i]
    ImageButton.TextColor3 = Color3.fromRGB(255, 255, 255)
    ImageButton.Font = Enum.Font.Gotham
    ImageButton.TextSize = 11
    ImageButton.Parent = SkyContent
    
    local UICorner = Instance.new("UICorner")
    UICorner.CornerRadius = UDim.new(0, 6)
    UICorner.Parent = ImageButton
    
    ImageButton.MouseButton1Click:Connect(function()
        applySkyboxTexture(id)
    end)
    
    -- ツールチップ
    local Tooltip = Instance.new("TextLabel")
    Tooltip.Name = "Tooltip"
    Tooltip.Size = UDim2.new(0, 150, 0, 30)
    Tooltip.Position = UDim2.new(0, 0, 0, -35)
    Tooltip.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
    Tooltip.Text = "ID: " .. id
    Tooltip.TextColor3 = Color3.fromRGB(200, 200, 200)
    Tooltip.Font = Enum.Font.Gotham
    Tooltip.TextSize = 10
    Tooltip.Visible = false
    Tooltip.Parent = ImageButton
    
    local UICornerTip = Instance.new("UICorner")
    UICornerTip.CornerRadius = UDim.new(0, 4)
    UICornerTip.Parent = Tooltip
    
    ImageButton.MouseEnter:Connect(function()
        Tooltip.Visible = true
    end)
    
    ImageButton.MouseLeave:Connect(function()
        Tooltip.Visible = false
    end)
end

-- Hacker画像選択ボタン(新しいタブ)
local HackerImageIds = {
    "118039240379666",
    "138296618513811", 
    "132861758719467"
}

local HackerImageNames = {
    "Hacker 1",
    "Hacker 2", 
    "Hacker 3"
}

for i, id in ipairs(HackerImageIds) do
    local row = math.ceil(i / 2)
    local col = (i - 1) % 2
    
    local ImageButton = Instance.new("TextButton")
    ImageButton.Name = "HackerImageButton_" .. i
    ImageButton.Size = UDim2.new(buttonWidth, -3, 0, buttonHeight)
    ImageButton.Position = UDim2.new(col * buttonWidth, col * 6, 0, (row-1)*(buttonHeight + buttonSpacing))
    ImageButton.BackgroundColor3 = Color3.fromRGB(65, 65, 75)
    ImageButton.Text = HackerImageNames[i]
    ImageButton.TextColor3 = Color3.fromRGB(255, 255, 255)
    ImageButton.Font = Enum.Font.Gotham
    ImageButton.TextSize = 11
    ImageButton.Parent = HackerContent
    
    local UICorner = Instance.new("UICorner")
    UICorner.CornerRadius = UDim.new(0, 6)
    UICorner.Parent = ImageButton
    
    ImageButton.MouseButton1Click:Connect(function()
        applySkyboxTexture(id)
    end)
    
    -- ツールチップ
    local Tooltip = Instance.new("TextLabel")
    Tooltip.Name = "Tooltip"
    Tooltip.Size = UDim2.new(0, 150, 0, 30)
    Tooltip.Position = UDim2.new(0, 0, 0, -35)
    Tooltip.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
    Tooltip.Text = "ID: " .. id
    Tooltip.TextColor3 = Color3.fromRGB(200, 200, 200)
    Tooltip.Font = Enum.Font.Gotham
    Tooltip.TextSize = 10
    Tooltip.Visible = false
    Tooltip.Parent = ImageButton
    
    local UICornerTip = Instance.new("UICorner")
    UICornerTip.CornerRadius = UDim.new(0, 4)
    UICornerTip.Parent = Tooltip
    
    ImageButton.MouseEnter:Connect(function()
        Tooltip.Visible = true
    end)
    
    ImageButton.MouseLeave:Connect(function()
        Tooltip.Visible = false
    end)
end

-- リセットボタン
local ResetButton = Instance.new("TextButton")
ResetButton.Name = "ResetButton"
ResetButton.Size = UDim2.new(1, -20, 0, 25)
ResetButton.Position = UDim2.new(0, 10, 0, 190)
ResetButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
ResetButton.Text = "SkyBoxをリセット"
ResetButton.TextColor3 = Color3.fromRGB(255, 255, 255)
ResetButton.Font = Enum.Font.GothamBold
ResetButton.TextSize = 11
ResetButton.Parent = MainFrame

local UICorner7 = Instance.new("UICorner")
UICorner7.CornerRadius = UDim.new(0, 6)
UICorner7.Parent = ResetButton

-- 入力セクション(横に広げて適用ボタンを復活)
local InputSection = Instance.new("Frame")
InputSection.Name = "InputSection"
InputSection.Size = UDim2.new(1, -20, 0, 60)  -- 高さを調整
InputSection.Position = UDim2.new(0, 10, 0, 225)
InputSection.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
InputSection.Parent = MainFrame

local UICorner4 = Instance.new("UICorner")
UICorner4.CornerRadius = UDim.new(0, 6)
UICorner4.Parent = InputSection

local InputLabel = Instance.new("TextLabel")
InputLabel.Name = "InputLabel"
InputLabel.Size = UDim2.new(1, 0, 0, 20)
InputLabel.Position = UDim2.new(0, 0, 0, 0)
InputLabel.BackgroundTransparency = 1
InputLabel.Text = "カスタムID:"
InputLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
InputLabel.Font = Enum.Font.Gotham
InputLabel.TextSize = 11
InputLabel.Parent = InputSection

-- テキストボックスと適用ボタンを横並びに
local InputRow = Instance.new("Frame")
InputRow.Name = "InputRow"
InputRow.Size = UDim2.new(1, 0, 0, 30)
InputRow.Position = UDim2.new(0, 0, 0, 25)
InputRow.BackgroundTransparency = 1
InputRow.Parent = InputSection

local TextBox = Instance.new("TextBox")
TextBox.Name = "TextBox"
TextBox.Size = UDim2.new(0.65, -5, 1, 0)
TextBox.Position = UDim2.new(0, 0, 0, 0)
TextBox.BackgroundColor3 = Color3.fromRGB(50, 50, 60)
TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
TextBox.PlaceholderText = "画像IDを入力"
TextBox.Font = Enum.Font.Gotham
TextBox.TextSize = 11
TextBox.ClearTextOnFocus = false
TextBox.Parent = InputRow

local UICorner5 = Instance.new("UICorner")
UICorner5.CornerRadius = UDim.new(0, 4)
UICorner5.Parent = TextBox

local ApplyButton = Instance.new("TextButton")
ApplyButton.Name = "ApplyButton"
ApplyButton.Size = UDim2.new(0.35, -5, 1, 0)
ApplyButton.Position = UDim2.new(0.65, 5, 0, 0)
ApplyButton.BackgroundColor3 = Color3.fromRGB(30, 136, 229)
ApplyButton.Text = "適用"
ApplyButton.TextColor3 = Color3.fromRGB(255, 255, 255)
ApplyButton.Font = Enum.Font.GothamBold
ApplyButton.TextSize = 11
ApplyButton.Parent = InputRow

local UICorner6 = Instance.new("UICorner")
UICorner6.CornerRadius = UDim.new(0, 4)
UICorner6.Parent = ApplyButton

-- 関数定義
local guiOpen = false
local tweenInfo = TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local currentTab = "oniichan"  -- デフォルトタブ

function toggleGUI()
    guiOpen = not guiOpen
    if guiOpen then
        OpenButton.Text = "CLOSE"
        MainFrame.Visible = true
        MainFrame.Size = UDim2.new(0, 380, 0, 0)
        local tween = TweenService:Create(MainFrame, tweenInfo, {Size = UDim2.new(0, 380, 0, 280)})
        tween:Play()
    else
        OpenButton.Text = "OPEN"
        local tween = TweenService:Create(MainFrame, tweenInfo, {Size = UDim2.new(0, 380, 0, 0)})
        tween.Completed:Connect(function()
            MainFrame.Visible = false
        end)
        tween:Play()
    end
end

function switchTab(tabName)
    currentTab = tabName
    
    -- すべてのタブを非アクティブに
    OniichanTabButton.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
    OniichanTabButton.TextColor3 = Color3.fromRGB(200, 200, 200)
    OniichanContent.Visible = false
    
    NekoTabButton.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
    NekoTabButton.TextColor3 = Color3.fromRGB(200, 200, 200)
    NekoContent.Visible = false
    
    SkyTabButton.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
    SkyTabButton.TextColor3 = Color3.fromRGB(200, 200, 200)
    SkyContent.Visible = false
    
    HackerTabButton.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
    HackerTabButton.TextColor3 = Color3.fromRGB(200, 200, 200)
    HackerContent.Visible = false
    
    -- 選択したタブをアクティブに
    if tabName == "oniichan" then
        OniichanTabButton.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
        OniichanTabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
        OniichanContent.Visible = true
    elseif tabName == "neko" then
        NekoTabButton.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
        NekoTabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
        NekoContent.Visible = true
    elseif tabName == "sky" then
        SkyTabButton.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
        SkyTabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
        SkyContent.Visible = true
    elseif tabName == "hacker" then
        HackerTabButton.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
        HackerTabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
        HackerContent.Visible = true
    end
end

function applySkyboxTexture(assetId)
    -- 既存のSkyを取得または作成
    local sky = Lighting:FindFirstChildOfClass("Sky")
    local needToCreateNew = false
    
    if not sky then
        sky = Instance.new("Sky")
        needToCreateNew = true
    end
    
    -- テクスチャURLを作成
    local textureId = "rbxassetid://" .. assetId
    
    -- SkyBoxの6面すべてにテクスチャを適用
    sky.SkyboxBk = textureId  -- 背面
    sky.SkyboxDn = textureId  -- 下面
    sky.SkyboxFt = textureId  -- 前面
    sky.SkyboxLf = textureId  -- 左面
    sky.SkyboxRt = textureId  -- 右面
    sky.SkyboxUp = textureId  -- 上面
    
    -- 必要に応じて他のSkyプロパティも設定
    sky.CelestialBodiesShown = false
    sky.StarCount = 3000
    
    -- 新規作成した場合はLightingに追加
    if needToCreateNew then
        sky.Parent = Lighting
    end
    
    -- 通知
    warn("✅ SkyBoxテクスチャを適用しました: " .. assetId)
end

function resetSkybox()
    -- 現在のSkyを取得または削除
    local sky = Lighting:FindFirstChildOfClass("Sky")
    
    if sky then
        -- Skyオブジェクトを削除(これでデフォルトに戻る)
        sky:Destroy()
        warn("✅ SkyBoxを削除し、ゲームのデフォルトに戻しました")
        
        -- ゲームに元々Skyが設定されていた場合のために、少し待ってから確認
        task.wait(0.1)
        
        -- ゲームのデフォルトSkyが自動的に表示されるようになる
        -- もしゲームにデフォルトのSky設定がない場合は、新しいデフォルトSkyを作成
        local newSky = Lighting:FindFirstChildOfClass("Sky")
        if not newSky then
            newSky = Instance.new("Sky")
            newSky.Parent = Lighting
            warn("✅ 新しいデフォルトSkyBoxを作成しました")
        end
    else
        warn("ℹ️ SkyBoxは既にデフォルト状態です")
    end
end

function resetLightingProperties()
    -- Lightingのプロパティをデフォルトにリセット
    Lighting.TimeOfDay = "14:00:00"
    Lighting.ClockTime = 14
    Lighting.Brightness = 3
    Lighting.GlobalShadows = true
    Lighting.Ambient = Color3.fromRGB(100, 100, 100)
    Lighting.OutdoorAmbient = Color3.fromRGB(128, 128, 128)
    Lighting.ColorShift_Top = Color3.fromRGB(255, 255, 255)
    Lighting.ColorShift_Bottom = Color3.fromRGB(255, 255, 255)
    
    warn("✅ Lightingプロパティをリセットしました")
end

-- イベント接続
OpenButton.MouseButton1Click:Connect(toggleGUI)

-- タブ切り替えイベント
OniichanTabButton.MouseButton1Click:Connect(function()
    switchTab("oniichan")
end)

NekoTabButton.MouseButton1Click:Connect(function()
    switchTab("neko")
end)

SkyTabButton.MouseButton1Click:Connect(function()
    switchTab("sky")
end)

HackerTabButton.MouseButton1Click:Connect(function()
    switchTab("hacker")
end)

ApplyButton.MouseButton1Click:Connect(function()
    local text = TextBox.Text
    if text and text ~= "" then
        -- 数字のみ抽出
        local id = string.match(text, "%d+")
        if id then
            applySkyboxTexture(id)
            TextBox.Text = ""
        else
            warn("⚠️ 有効な画像IDを入力してください")
        end
    end
end)

-- Enterキーでも適用
TextBox.FocusLost:Connect(function(enterPressed)
    if enterPressed then
        ApplyButton.MouseButton1Click:Fire()
    end
end)

ResetButton.MouseButton1Click:Connect(function()
    -- 両方のリセット方法を実行
    resetSkybox()
    resetLightingProperties()
    warn("✅ リセット完了:SkyBoxとLightingプロパティをデフォルトに戻しました")
end)

-- OPENボタンをドラッグ可能にする
local openButtonDragging = false
local openButtonDragInput
local openButtonDragStart
local openButtonStartPos

local function updateOpenButton(input)
    local delta = input.Position - openButtonDragStart
    OpenButton.Position = UDim2.new(openButtonStartPos.X.Scale, openButtonStartPos.X.Offset + delta.X, 
                                   openButtonStartPos.Y.Scale, openButtonStartPos.Y.Offset + delta.Y)
end

OpenButton.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
        openButtonDragging = true
        openButtonDragStart = input.Position
        openButtonStartPos = OpenButton.Position
        
        input.Changed:Connect(function()
            if input.UserInputState == Enum.UserInputState.End then
                openButtonDragging = false
            end
        end)
    end
end)

OpenButton.InputChanged:Connect(function(input)
    if (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
        openButtonDragInput = input
    end
end)

UserInputService.InputChanged:Connect(function(input)
    if openButtonDragging and input == openButtonDragInput then
        updateOpenButton(input)
    end
end)

-- メインGUIをドラッグ可能にする
local mainDragging = false
local mainDragInput
local mainDragStart
local mainStartPos

local function updateMainFrame(input)
    local delta = input.Position - mainDragStart
    MainFrame.Position = UDim2.new(mainStartPos.X.Scale, mainStartPos.X.Offset + delta.X, 
                                  mainStartPos.Y.Scale, mainStartPos.Y.Offset + delta.Y)
end

Title.InputBegan:Connect(function(input)
    if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
        mainDragging = true
        mainDragStart = input.Position
        mainStartPos = MainFrame.Position
        
        input.Changed:Connect(function()
            if input.UserInputState == Enum.UserInputState.End then
                mainDragging = false
            end
        end)
    end
end)

Title.InputChanged:Connect(function(input)
    if (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
        mainDragInput = input
    end
end)

UserInputService.InputChanged:Connect(function(input)
    if mainDragging and input == mainDragInput then
        updateMainFrame(input)
    end
end)

-- 初期設定
OpenButton.Text = "OPEN"
MainFrame.Visible = false
switchTab("oniichan")  -- デフォルトタブを設定

-- GUIが画面外に出ないように制限
game:GetService("RunService").RenderStepped:Connect(function()
    local screenSize = workspace.CurrentCamera.ViewportSize
    
    -- OPENボタンの制限
    local openButtonSize = OpenButton.AbsoluteSize
    local openButtonPos = OpenButton.AbsolutePosition
    
    if openButtonPos.x < 5 then
        OpenButton.Position = UDim2.new(0, 5, OpenButton.Position.Y.Scale, OpenButton.Position.Y.Offset)
    elseif openButtonPos.x + openButtonSize.x > screenSize.x - 5 then
        OpenButton.Position = UDim2.new(0, screenSize.x - openButtonSize.x - 5, 
                                       OpenButton.Position.Y.Scale, OpenButton.Position.Y.Offset)
    end
    
    if openButtonPos.y < 5 then
        OpenButton.Position = UDim2.new(OpenButton.Position.X.Scale, OpenButton.Position.X.Offset, 0, 5)
    elseif openButtonPos.y + openButtonSize.y > screenSize.y - 5 then
        OpenButton.Position = UDim2.new(OpenButton.Position.X.Scale, OpenButton.Position.X.Offset, 
                                       0, screenSize.y - openButtonSize.y - 5)
    end
    
    -- メインフレームの制限
    if MainFrame.Visible then
        local frameSize = MainFrame.AbsoluteSize
        local position = MainFrame.AbsolutePosition
        
        -- X軸制限
        if position.x < 5 then
            MainFrame.Position = UDim2.new(0, 5, MainFrame.Position.Y.Scale, MainFrame.Position.Y.Offset)
        elseif position.x + frameSize.x > screenSize.x - 5 then
            MainFrame.Position = UDim2.new(0, screenSize.x - frameSize.x - 5, 
                                          MainFrame.Position.Y.Scale, MainFrame.Position.Y.Offset)
        end
        
        -- Y軸制限
        if position.y < 5 then
            MainFrame.Position = UDim2.new(MainFrame.Position.X.Scale, MainFrame.Position.X.Offset, 0, 5)
        elseif position.y + frameSize.y > screenSize.y - 5 then
            MainFrame.Position = UDim2.new(MainFrame.Position.X.Scale, MainFrame.Position.X.Offset, 
                                          0, screenSize.y - frameSize.y - 5)
        end
    end
end)

print("✅ SkyBox_injectHUB loaded successfully!")
print("📌 By akkii | 土星コミュニティ")
print("📖 機能:")
print("   • タブ切り替え機能(おにーちゃん / Neko / Sky / Hacker)")
print("   • プリセット画像12種からSkyBoxテクスチャを変更")
print("   • カスタム画像ID入力でSkyBoxテクスチャを変更")
print("   • SkyBoxをデフォルトにリセット可能")
print("   • OPENボタンとメインGUIをドラッグ移動可能(マウス/タッチ対応)")
print("📝 プリセットID:")
print("   【おにーちゃん】")
print("   • 空 1: 85668780400857")
print("   • 空 2: 127159956121416")
print("   • 空 3: 96098055051594")
print("   【Neko】")
print("   • 猫 1: 82629388569737")
print("   • 猫 2: 118436084084848")
print("   • 猫 3: 132961920518784")
print("   【Sky】")
print("   • Sky 1: 91773772628037")
print("   • Sky 2: 116795456743711")
print("   • Sky 3: 115730337762745")
print("   【Hacker】")
print("   • Hacker 1: 118039240379666")
print("   • Hacker 2: 138296618513811")
print("   • Hacker 3: 132861758719467")

Features & Information

SkyBox
#SkyBox#coolkid#Neko#Shader

Community Comments (2)

shameless67shameless67Jan 1, 2026

BUYING SCRIPTBLOX ACCOUNT THAT CAN POST MESSAGE MY DISCORD cidx99.

De*666De*666Jul 22, 2026

なんか狂気を感じました

More Scripts for Universal Scripts