Pochang UI Customizable Script Hub
- 7
- views
- 69
- runs
About
1. PochangUI:SetTitle(text:string) - sets the title of the window 2. PochangUI:Remove() - deletes the hub 3. PochangUI:CreateTab(name:string) - creates a tab 3.1 tab:CreateLabel(text:string) - creates a label inside of a tab 3.2 tab:CreateButton(text:string,callback:function) - creates a button inside of a tab 3.3 tab:CreateInput(placeholder:string,callback:function) - creates an input inside of a tab
Script
Version history
Loading…
loadstring(game:HttpGet("https://script.roscripts.io/FrDtiEF"))() local PochangUI = {} print("enjoy!") -- Services local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local Player = Players.LocalPlayer -- Load GUI local gui if RunService:IsStudio() then gui = ReplicatedStorage:WaitForChild("RobloxPanelApp"):Clone() gui.Parent = Player:WaitForChild("PlayerGui") else gui = game:GetObjects("rbxassetid://83748361362401")[1] gui.Parent = game:GetService("CoreGui") end local disabled = false local tabs = 0 -- Tab template local tabTemplate = { Index = 0,Name = "template", Elements = {}, ElementsCount = 0, FrameInstance = nil, } -- CreateLabel method function tabTemplate:CreateLabel(text: string) if text ~= nil then self.ElementsCount += 1 local templatesFolder = gui:FindFirstChild("templates") local labelTemplate = templatesFolder and templatesFolder:FindFirstChild("Label") if not labelTemplate then warn("Missing 'Label' TextLabel inside templates folder") return nil end local labelgui = labelTemplate:Clone() labelgui.Text = text labelgui.Name = "Label_" .. tostring(self.ElementsCount) labelgui.Visible = true if not self.FrameInstance then warn("FrameInstance is nil for tab '" .. self.Name .. "' — call CreateLabel on a tab returned by CreateTab") return nil end labelgui.Parent = self.FrameInstance table.insert(self.Elements, labelgui) print("Label created:", labelgui.Name, "Parent:", labelgui.Parent.Name) return labelgui end end function tabTemplate:CreateButton(text: string, callback: ()->()) if text ~= nil then self.ElementsCount += 1 local templatesFolder = gui:FindFirstChild("templates") local buttonTemplate = templatesFolder and templatesFolder:FindFirstChild("Button") if not buttonTemplate then warn("Missing 'Button' TextButton inside templates folder") return nil end local buttongui = buttonTemplate:Clone() buttongui.Text = text buttongui.Name = "Button_" .. tostring(self.ElementsCount) buttongui.Visible = true if not self.FrameInstance then warn("FrameInstance is nil for tab '" .. self.Name .. "' — call CreateButton on a tab returned by CreateTab") return nil end -- Use MouseButton1Click for PC clicks buttongui.MouseButton1Click:Connect(function() if callback then callback() end end) buttongui.Parent = self.FrameInstance table.insert(self.Elements, buttongui) print("Button created:", buttongui.Name, "Parent:", buttongui.Parent.Name) return buttongui end end function tabTemplate:CreateInput(placeholder: string, callback: (string)->()) self.ElementsCount += 1 local templatesFolder = gui:FindFirstChild("templates") local inputTemplate = templatesFolder and templatesFolder:FindFirstChild("Input") if not inputTemplate then warn("Missing 'Input' TextBox inside templates folder") return nil end local inputgui = inputTemplate:Clone() inputgui.PlaceholderText = placeholder or "Enter text..." inputgui.Name = "Input_" .. tostring(self.ElementsCount) inputgui.Visible = true if not self.FrameInstance then warn("FrameInstance is nil for tab '" .. self.Name .. "' — call CreateInput on a tab returned by CreateTab") return nil end -- Fire callback whenever text changes inputgui:GetPropertyChangedSignal("Text"):Connect(function() if callback then callback(inputgui.Text) end end) -- Optional: fire callback when user presses Enter inputgui.FocusLost:Connect(function(enterPressed) if enterPressed and callback then callback(inputgui.Text) end end) inputgui.Parent = self.FrameInstance table.insert(self.Elements, inputgui) print("Input created:", inputgui.Name, "Parent:", inputgui.Parent.Name) return inputgui end -- Window controls (original style but safe) function PochangUI:SetTitle(title: string) if not disabled then
The rest is in View source.
Comments · 0
Sign in to comment.
No comments yet.