Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --locals
- local SectionTemplate = nil
- local SideBarButtonTemplate = nil
- local TotalSections = 0
- local Sections = {}
- local topbar
- --functions
- function CreateGui(name)
- local t = nil
- local success, err = pcall(function() return game:HttpGet('http://blank.com') end)
- if success then
- t = loadstring(game:HttpGet('https://pastebin.com/raw/C9v6ijxt'))()
- else
- t = loadstring(game:GetService'HttpService':GetAsync('https://pastebin.com/raw/C9v6ijxt'))()
- end
- local gui = t[1]
- gui.Name = name
- SectionTemplate = t[2]
- SideBarButtonTemplate = t[3]
- topbar = t[4]
- topbar.Text = name
- return gui
- end
- --main
- local fake_gui = {}
- function fake_gui:CreateGui(guiname)
- local FirstSection = nil
- local Gui = CreateGui(tostring(guiname))
- local fake_section = {}
- local sections = {}
- local close_event = Instance.new'BindableEvent'
- function fake_section:GetGui()
- return Gui
- end
- function fake_section:On_Close()
- return close_event
- end
- topbar.closeButton.MouseButton1Click:connect(function() close_event:Fire() end)
- function fake_section:CreateSection(sectionname)
- local section = SectionTemplate:Clone()
- section.Parent = SectionTemplate.Parent
- section.Name = tostring(sectionname)
- section.Visible = true
- table.insert(sections, section)
- if not FirstSection then FirstSection = section section.Position = UDim2.new(0,0,0,0) end
- local sidebarbutton = SideBarButtonTemplate:Clone()
- sidebarbutton.Parent = SideBarButtonTemplate.Parent
- sidebarbutton.Visible = true
- sidebarbutton.Name = tostring(sectionname)
- sidebarbutton.Text = tostring(sectionname)
- local fake_object = {}
- function fake_object:CreateButton(buttonname, clickcallback)
- local button = section.buttontemplate:Clone()
- button.Parent = section
- button.Visible = true
- button.Name = tostring(buttonname)
- button.Text = tostring(buttonname)
- if clickcallback then
- button.MouseButton1Click:connect(clickcallback)
- end
- return button
- end
- function fake_object:CreateLabel(labelname)
- local label = section.labeltemplate:Clone()
- label.Parent = section
- label.Visible = true
- label.Name = tostring(labelname)
- label.Text = tostring(labelname)
- return label
- end
- function fake_object:CreateTextBox(boxname)
- local box = section.boxtemplate:Clone()
- box.Parent = section
- box.Visible = true
- box.Name = tostring(boxname)
- box.PlaceholderText = tostring(boxname)
- return box
- end
- table.insert(Sections, section)
- TotalSections += 1
- return fake_object
- end
- return fake_section
- end
- return fake_gui
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement