Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local screen = Instance.new("ScreenGui",game:GetService("CoreGui"))
- local mainui = {
- frames = 0;
- buttonsize = 20;
- t = true,
- }
- local colors = {
- barcolor = Color3.fromRGB(170, 0, 127)
- }
- function mainui:AddWindow(n,c)
- local top = Instance.new("Frame",screen)
- local bframe = Instance.new("Frame")
- local main = Instance.new("ImageLabel")
- local UIListLayout = Instance.new("UIListLayout",main)
- local bar = Instance.new("Frame")
- local text = Instance.new("TextLabel")
- local x = c or 0
- top.Name = "top"
- top.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
- top.BorderSizePixel = 0
- top.Position = UDim2.new(0, 20+(210*self.frames), 0, 15)
- top.Size = UDim2.new(0, 201, 0, 39)
- bframe.Name = "bframe"
- bframe.Parent = top
- bframe.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
- bframe.BorderColor3 = Color3.new(0.666667, 0, 0.498039)
- bframe.BorderSizePixel = 0
- bframe.ClipsDescendants = true
- bframe.Position = UDim2.new(-0.00045085547, 0, 0.999999583, 0)
- bframe.Size = UDim2.new(0, 201, 0, (self.buttonsize*x))
- main.Name = "main"
- main.Parent = bframe
- main.BackgroundColor3 = Color3.new(1, 1, 1)
- main.BackgroundTransparency = 1
- main.Position = UDim2.new(-7.59143717e-08, 0, -1.12196979e-07, 0)
- main.Size = UDim2.new(0, 907, 0, 833)
- main.Image = "rbxassetid://3343671401"
- main.ImageTransparency = 0.89999997615814
- bar.Name = "bar"
- bar.Parent = top
- bar.BackgroundColor3 = Color3.new(0.666667, 0, 0.498039)
- bar.BorderSizePixel = 0
- bar.Position = UDim2.new(0, 0, 0.923076928, 0)
- bar.Size = UDim2.new(0, 201, 0, 3)
- text.Name = "text"
- text.Parent = top
- text.BackgroundColor3 = Color3.new(1, 1, 1)
- text.BackgroundTransparency = 1
- text.Size = UDim2.new(0, 199, 0, 36)
- text.Font = Enum.Font.Code
- text.Text = n
- text.TextColor3 = Color3.new(1, 1, 1)
- text.TextSize = 18
- self.frames = self.frames +1
- return main
- end
- function mainui:AddToggle(txt,p)
- local b = Instance.new("TextButton")
- local label = Instance.new("TextLabel")
- b.Name = "b"
- b.Parent = p
- b.BackgroundTransparency = 1
- b.Size = UDim2.new(0, 200, 0, self.buttonsize)
- b.Font = Enum.Font.SourceSans
- b.Text = txt
- b.TextColor3 = Color3.new(1, 1, 1)
- b.TextSize = 16
- b.TextXAlignment = Enum.TextXAlignment.Left
- label.Name = "label"
- label.Parent = b
- label.BackgroundTransparency = 1
- label.Position = UDim2.new(0.890547276, 0, 0, 0)
- label.Size = UDim2.new(0, 21, 0, 20)
- label.Font = Enum.Font.Code
- label.Text = "OFF"
- label.TextColor3 = Color3.new(1,0,0)
- label.TextSize = 14
- return b,label
- end
- function mainui:AddBox(t,b,p)
- local a = Instance.new("TextBox")
- a.Name = "a"
- a.Parent = p
- a.BackgroundColor3 = Color3.new(0.231373, 0.231373, 0.231373)
- a.BorderSizePixel = 0
- a.BackgroundTransparency = 0.2
- a.Size = UDim2.new(0, 201, 0, 20)
- a.Font = Enum.Font.SourceSans
- a.PlaceholderColor3 = Color3.new(1, 1, 1)
- a.Text = t
- a.PlaceholderText = b
- a.TextColor3 = Color3.new(1, 1, 1)
- a.TextSize = 16
- a.TextStrokeColor3 = Color3.new(1, 1, 1)
- a.TextXAlignment = Enum.TextXAlignment.Left
- a.TextTransparency = 0.4
- return a
- end
- function mainui:AddButton(txt,p)
- local x = Instance.new("TextButton")
- x.Name = "x"
- x.Parent = p
- x.BackgroundTransparency = 1
- x.BorderSizePixel = 0
- x.Size = UDim2.new(0, 200, 0, 20)
- x.Font = Enum.Font.SourceSans
- x.Text = txt
- x.TextColor3 = Color3.new(1, 1, 1)
- x.TextSize = 16
- x.TextXAlignment = Enum.TextXAlignment.Left
- return x
- end
- function onKeyPress(actionName, userInputState, inputObject)
- if userInputState == Enum.UserInputState.Begin then
- if mainui.t == false then
- mainui.t = true
- screen.Enabled = true
- else
- mainui.t = false
- screen.Enabled = false
- end
- end
- end
- game.ContextActionService:BindAction("keyPress", onKeyPress, false, Enum.KeyCode.RightShift)
- return mainui
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement