Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local TS = game:GetService("TweenService")
- local MainUI = {
- windows = 0,
- }
- local Colors = {
- BarColorTo = {BackgroundColor3 = Color3.fromRGB(170, 0, 255)},
- BarColorFrom = {BackgroundColor3 = Color3.fromRGB(85, 0, 255)},
- BarDefault = Color3.fromRGB(85, 0, 255),
- }
- function MainUI:CreateScreenGui(name,enabled)
- local k = Instance.new("ScreenGui",game.CoreGui)
- k.Enabled = enabled
- if name == true then
- k.Name = game:GetService("HttpService"):GenerateGUID(false)
- end
- return k
- end
- function MainUI:CreateWindow(textt,tweentrue,barcolor,colorto,colorfrom,buttons,parent)
- local topframe = Instance.new("Frame",parent)
- local clipframe = Instance.new("Frame",topframe)
- local buttonframe = Instance.new("Frame",clipframe)
- local UIListLayout = Instance.new("UIListLayout",buttonframe)
- local bar = Instance.new("Frame",topframe)
- local text = Instance.new("TextLabel",topframe)
- local Minimize = Instance.new("TextButton",topframe)
- topframe.BackgroundColor3 = Color3.new(0.231373, 0.231373, 0.231373)
- topframe.BorderSizePixel = 0
- topframe.Position = UDim2.new((0.0193106737 + (self.windows * 0.130)), 0, 0.0737100765, 0)
- topframe.Size = UDim2.new(0, 229, 0, 34)
- clipframe.BackgroundColor3 = Color3.new(0.231373, 0.231373, 0.231373)
- clipframe.BackgroundTransparency = 1
- clipframe.BorderSizePixel = 0
- clipframe.ClipsDescendants = true
- clipframe.Position = UDim2.new(-0.000678863376, 0, 0.989352942, 0)
- clipframe.Size = UDim2.new(0, 229, 0, 700)
- buttonframe.BackgroundColor3 = Color3.new(0.231373, 0.231373, 0.231373)
- buttonframe.BorderSizePixel = 0
- buttonframe.Size = UDim2.new(0, 229, 0, (20*buttons))
- bar.BackgroundColor3 = barcolor
- bar.BorderSizePixel = 0
- bar.Position = UDim2.new(0, 0, 0.916666687, 0)
- bar.Size = UDim2.new(0, 229, 0, 3)
- text.BackgroundColor3 = Color3.new(1, 1, 1)
- text.BackgroundTransparency = 1
- text.BorderSizePixel = 0
- text.Position = UDim2.new(0, 0, 0.0755656064, 0)
- text.Size = UDim2.new(0, 228, 0, 28)
- text.Font = Enum.Font.SourceSansBold
- text.Text = textt
- text.TextColor3 = Color3.new(1, 1, 1)
- text.TextSize = 18
- Minimize.BackgroundColor3 = Color3.new(1, 1, 1)
- Minimize.BackgroundTransparency = 1
- Minimize.Position = UDim2.new(0.903930187, 0, 0.0588235296, 0)
- Minimize.Size = UDim2.new(0, 20, 0, 20)
- Minimize.Font = Enum.Font.SourceSansBold
- Minimize.Text = "-"
- Minimize.TextColor3 = Color3.new(1, 1, 1)
- Minimize.TextSize = 24
- toggle = false
- Minimize.MouseButton1Click:connect(function()
- if toggle == false then
- toggle = true
- Minimize.Text = "+"
- buttonframe:TweenPosition(UDim2.new(0, 0,-1, 0),"Out","Elastic",1)
- else
- toggle = false
- Minimize.Text = "-"
- buttonframe:TweenPosition(UDim2.new(0, 0,0, 0),"Out","Quad",1)
- end
- end)
- spawn(function()
- while wait(3) do
- if tweentrue == true then
- local info = TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
- local to = TS:Create(bar,info,{BackgroundColor3 = colorto})
- local from = TS:Create(bar,info,{BackgroundColor3 = colorfrom})
- to:Play()
- wait(3)
- from:Play()
- end
- end
- end)
- self.windows = self.windows+1
- return buttonframe
- end
- function MainUI:AddToggle(text,frame)
- local togglebutton = Instance.new("TextButton",frame)
- local toggle = Instance.new("TextLabel",togglebutton)
- togglebutton.BackgroundColor3 = Color3.new(1, 1, 1)
- togglebutton.BackgroundTransparency = 1
- togglebutton.BorderSizePixel = 0
- togglebutton.Size = UDim2.new(0, 229, 0, 20)
- togglebutton.Font = Enum.Font.SourceSans
- togglebutton.Text = text
- togglebutton.TextColor3 = Color3.new(1, 1, 1)
- togglebutton.TextSize = 16
- togglebutton.TextXAlignment = Enum.TextXAlignment.Left
- toggle.BackgroundColor3 = Color3.new(1, 1, 1)
- toggle.BackgroundTransparency = 1
- toggle.Position = UDim2.new(0.890829742, 0, 0, 0)
- toggle.Size = UDim2.new(0, 23, 0, 20)
- toggle.Font = Enum.Font.SourceSans
- toggle.Text = "OFF"
- toggle.TextColor3 = Color3.new(1, 0, 0)
- toggle.TextSize = 14
- return togglebutton,toggle
- end
- function MainUI:AddBox(text,backtext,frame)
- local box = Instance.new("TextBox",frame)
- box.BackgroundColor3 = Color3.new(0.333333, 0.333333, 0.333333)
- box.BorderSizePixel = 0
- box.Size = UDim2.new(0, 229, 0, 20)
- box.Font = Enum.Font.SourceSans
- box.PlaceholderText = backtext
- box.Text = text
- box.TextColor3 = Color3.new(1, 1, 1)
- box.TextSize = 16
- box.TextXAlignment = Enum.TextXAlignment.Left
- return box
- end
- function MainUI:AddButton(text,frame)
- local button = Instance.new("TextButton",frame)
- button.BackgroundColor3 = Color3.new(1, 1, 1)
- button.BackgroundTransparency = 1
- button.BorderSizePixel = 0
- button.Size = UDim2.new(0, 229, 0, 20)
- button.Font = Enum.Font.SourceSans
- button.Text = text
- button.TextColor3 = Color3.new(1, 1, 1)
- button.TextSize = 16
- button.TextXAlignment = Enum.TextXAlignment.Left
- return button
- end
- function MainUI:AddLabel(text,size,textsize,frame)
- local x = Instance.new("TextLabel",frame)
- x.BackgroundColor3 = Color3.new(1, 1, 1)
- x.BackgroundTransparency = 1
- x.BorderSizePixel = 0
- x.Size = UDim2.new(0, 227, 0, size)
- x.Font = Enum.Font.SourceSans
- x.Text = text
- x.TextColor3 = Color3.new(1, 1, 1)
- if textsize == nil then
- x.TextSize = 16
- else
- x.TextSize = textsize
- end
- x.TextXAlignment = Enum.TextXAlignment.Left
- return x
- end
- return MainUI
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement