universal panel script not gui
Key RequiredUniversal

universal panel script not gui

Universal Scriptsannik12844sannik12844 2.8K views 69 executesUpdated Jun 27, 2025
5.0/ 5(2 votes)
20100% Positive
Lua Script•296 lines (8602 chars)
-- [ Services ]
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local StarterGui = game:GetService("StarterGui")
local Lighting = game:GetService("Lighting")

-- [ Character Setup ]
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local root = character:WaitForChild("HumanoidRootPart")

-- [ State ]
local orbitMode = false
local panels = {}
local actionStates = {}

-- [ Panel Data ]
local panelGroups = {
	{main = "Fly", sub = "Noclip"},
	{main = "TP Tool", sub = "Speed"},
	{main = "Dance", sub = "Spin"},
	{main = "Jump Boost", sub = "Sit"},
	{main = "Reset", sub = "Teleport"},
	{main = "God Mode", sub = "Invisibility"},
	{main = "Heal", sub = "Shield"},
	{main = "Light", sub = "Darkness"},
	{main = "Music", sub = "Teleport Home"},
}

-- [ Notification ]
local function showMessage(text)
	pcall(function()
		StarterGui:SetCore("SendNotification", {
			Title = "Hub",
			Text = text,
			Duration = 2,
		})
	end)
end

-- [ Music ]
local musicSound = Instance.new("Sound")
musicSound.Name = "HubMusic"
musicSound.Looped = true
musicSound.SoundId = "rbxassetid://9118823100"
musicSound.Volume = 0.5
musicSound.Parent = root

-- [ Light ]
local light = Instance.new("PointLight")
light.Brightness = 2
light.Range = 15
light.Enabled = false
light.Parent = root

-- [ Action Handlers ]
local actionMap = {}

-- [ Actions Implementation ]
actionMap["Fly"] = function()
	local active = not root:FindFirstChild("FlyForce")
	if active then
		local bv = Instance.new("BodyVelocity")
		bv.Name = "FlyForce"
		bv.MaxForce = Vector3.new(1e5, 1e5, 1e5)
		bv.Velocity = Vector3.new(0, 50, 0)
		bv.Parent = root
		showMessage("Fly Enabled")
	else
		local f = root:FindFirstChild("FlyForce")
		if f then f:Destroy() end
		showMessage("Fly Disabled")
	end
end

local noclip = false
actionMap["Noclip"] = function()
	noclip = not noclip
	showMessage(noclip and "Noclip ON" or "Noclip OFF")
end

RunService.Stepped:Connect(function()
	if noclip and character then
		for _, part in ipairs(character:GetDescendants()) do
			if part:IsA("BasePart") then
				part.CanCollide = false
			end
		end
	end
end)

actionMap["TP Tool"] = function() showMessage("TP Tool: Not implemented") end

actionMap["Speed"] = function()
	local hum = character:FindFirstChildOfClass("Humanoid")
	if hum then
		actionStates.Speed = not actionStates.Speed
		hum.WalkSpeed = actionStates.Speed and 50 or 16
		showMessage(actionStates.Speed and "Speed ON" or "Speed OFF")
	end
end

actionMap["Dance"] = function() showMessage("Dance: Not implemented") end

local spinning = false
actionMap["Spin"] = function()
	spinning = not spinning
	showMessage(spinning and "Spinning ON" or "Spinning OFF")
end

RunService.RenderStepped:Connect(function()
	if spinning then
		root.CFrame = root.CFrame * CFrame.Angles(0, math.rad(4), 0)
	end
end)

actionMap["Jump Boost"] = function()
	local hum = character:FindFirstChildOfClass("Humanoid")
	if hum then
		actionStates.Jump = not actionStates.Jump
		hum.JumpPower = actionStates.Jump and 150 or 50
		showMessage(actionStates.Jump and "Jump Boost ON" or "Jump Boost OFF")
	end
end

actionMap["Sit"] = function()
	local hum = character:FindFirstChildOfClass("Humanoid")
	if hum then hum.Sit = true showMessage("Sitting") end
end

actionMap["Reset"] = function() character:BreakJoints() end

actionMap["Teleport"] = function()
	root.CFrame = CFrame.new(0, 10, 0)
	showMessage("Teleported to origin")
end

actionMap["God Mode"] = function() showMessage("God Mode (fake toggle)") end

actionMap["Invisibility"] = function()
	actionStates.Invis = not actionStates.Invis
	for _, p in ipairs(character:GetDescendants()) do
		if p:IsA("BasePart") or p:IsA("Decal") then
			p.Transparency = actionStates.Invis and 1 or 0
		end
	end
	showMessage(actionStates.Invis and "Invisible" or "Visible")
end

actionMap["Heal"] = function()
	local hum = character:FindFirstChildOfClass("Humanoid")
	if hum then hum.Health = hum.MaxHealth showMessage("Healed") end
end

actionMap["Shield"] = function() showMessage("Shield: Not implemented") end

actionMap["Light"] = function()
	light.Enabled = not light.Enabled
	showMessage(light.Enabled and "Light ON" or "Light OFF")
end

actionMap["Darkness"] = function()
	actionStates.Dark = not actionStates.Dark
	Lighting.Ambient = actionStates.Dark and Color3.new(0,0,0) or Color3.new(0.5,0.5,0.5)
	Lighting.OutdoorAmbient = Lighting.Ambient
	showMessage(actionStates.Dark and "Darkness ON" or "Darkness OFF")
end

actionMap["Music"] = function()
	if musicSound.IsPlaying then musicSound:Stop() showMessage("New Music OFF")
	else musicSound:Play() showMessage("New Music ON") end
end

actionMap["Teleport Home"] = function()
	local spawn = workspace:FindFirstChildWhichIsA("SpawnLocation")
	if spawn then
		root.CFrame = spawn.CFrame + Vector3.new(0, 5, 0)
		showMessage("Teleported Home")
	else
		showMessage("No SpawnLocation found")
	end
end

-- [ GUI Panels ]
local function createPanel(size, color)
	local part = Instance.new("Part")
	part.Anchored = true
	part.CanCollide = false
	part.Size = size
	part.Color = color
	part.Name = "HubPanel"
	part.Parent = workspace
	return part
end

local function createGui(part, text)
	local gui = Instance.new("SurfaceGui")
	gui.Face = Enum.NormalId.Front
	gui.AlwaysOnTop = true
	gui.Adornee = part
	gui.CanvasSize = Vector2.new(300, 150)
	gui.Parent = part

	local label = Instance.new("TextLabel")
	label.Size = UDim2.new(1, 0, 0.6, 0)
	label.BackgroundTransparency = 1
	label.Text = text
	label.TextScaled = true
	label.Font = Enum.Font.GothamBold
	label.TextColor3 = Color3.new(1,1,1)
	label.Parent = gui

	local button = Instance.new("TextButton")
	button.Size = UDim2.new(0.6, 0, 0.3, 0)
	button.Position = UDim2.new(0.2, 0, 0.65, 0)
	button.Text = "Toggle"
	button.TextScaled = true
	button.Font = Enum.Font.Gotham
	button.BackgroundColor3 = Color3.fromRGB(100, 180, 255)
	button.Parent = gui

	return button
end

-- [ Build All Panels ]
for i, group in ipairs(panelGroups) do
	local main = createPanel(Vector3.new(5, 3, 0.2), Color3.fromRGB(50, 100, 200))
	local sub = createPanel(Vector3.new(3, 2, 0.2), Color3.fromRGB(180, 150, 70))

	local mainBtn = createGui(main, group.main)
	local subBtn = createGui(sub, group.sub)

	mainBtn.MouseButton1Click:Connect(function()
		if actionMap[group.main] then actionMap[group.main]() end
	end)
	subBtn.MouseButton1Click:Connect(function()
		if actionMap[group.sub] then actionMap[group.sub]() end
	end)

	panels[i] = {main = main, sub = sub}
end

-- [ Position Panels ]
local function updatePanelPositions()
	local center = root.Position + Vector3.new(0, 4, 0)
	local radius = 12
	local forward = root.CFrame.LookVector
	local right = Vector3.new(forward.Z, 0, -forward.X)
	local angleStep = math.pi / (#panels - 1)

	for i, p in ipairs(panels) do
		local angle = -math.pi / 2 + (i - 1) * angleStep
		local dir = (forward * math.cos(angle) + right * math.sin(angle)).Unit
		p.main.Position = center + dir * radius
		p.sub.Position = p.main.Position + Vector3.new(0, 3.5, 0)
		for _, part in ipairs({p.main, p.sub}) do
			local look = (root.Position - part.Position)
			look = Vector3.new(look.X, 0, look.Z).Unit
			part.CFrame = CFrame.lookAt(part.Position, part.Position + look)
		end
	end
end

-- [ Orbit & Jiggle ]
local function orbitPanels()
	for _, p in ipairs(panels) do
		TweenService:Create(p.main, TweenInfo.new(0.5), {Position = root.Position + Vector3.new(math.random(-12,12),3,math.random(-12,12))}):Play()
		TweenService:Create(p.sub, TweenInfo.new(0.5), {Position = root.Position + Vector3.new(math.random(-10,10),6,math.random(-10,10))}):Play()
	end
end

local function jigglePanels()
	for _, p in ipairs(panels) do
		TweenService:Create(p.main, TweenInfo.new(0.2), {Position = p.main.Position + Vector3.new(math.random(-2,2),0,math.random(-2,2))}):Play()
		TweenService:Create(p.sub, TweenInfo.new(0.2), {Position = p.sub.Position + Vector3.new(math.random(-1,1),0,math.random(-1,1))}):Play()
	end
end

-- [ Controls ]
UserInputService.InputBegan:Connect(function(input, processed)
	if processed then return end
	if input.KeyCode == Enum.KeyCode.Q then
		orbitMode = not orbitMode
		if orbitMode then orbitPanels() showMessage("Orbit Mode ON") else showMessage("Orbit Mode OFF") end
	elseif input.KeyCode == Enum.KeyCode.One then
		jigglePanels()
	end
end)

RunService.RenderStepped:Connect(function()
	if not orbitMode then
		updatePanelPositions()
	end
end)

Features & Information

press q to move the panels (orbit or smt like that) (press 1 to move them) (press q again to make them go back to semicircle position)

Community Comments (2)

100OTD100OTDJun 27, 2025

i fw this

BasicScripterBasicScripterJun 27, 2025

like the idea but the scripts are so bad

More Scripts for Universal Scripts