-- // By Ttm
print("v0.1")
local Lib = {}
local UserInputService = game:GetService("UserInputService")
local function MakeDraggable(topbarobject, object)
local dragging, dragStart, startPosition
local function update(input)
object.Position = UDim2.new(
startPosition.X.Scale, startPosition.X.Offset + (input.Position - dragStart).X,
startPosition.Y.Scale, startPosition.Y.Offset + (input.Position - dragStart).Y
)
end
topbarobject.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging, dragStart, startPosition = true, input.Position, object.Position
end
end)
topbarobject.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = false
end
end)
UserInputService.InputChanged:Connect(function(input)
if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
update(input)
end
end)
end
function Lib:Ui(name)
local Tabs = {}
-- // 主面板
local MainFolder = Instance.new("Folder")
local TabFolder = Instance.new("Folder")
local InfoFolder = Instance.new("Folder")
local Hack = Instance.new("ScreenGui")
local MainFrame = Instance.new("Frame")
local ScriptName = Instance.new("TextLabel")
local MainCorner = Instance.new("UICorner")
local TabFrames = Instance.new("ScrollingFrame")
local TabsList = Instance.new("UIListLayout")
MainFolder.Parent = game.CoreGui
Hack.Parent = MainFolder
Hack.Name = "Mgde"
MainFrame.Parent = Hack
MainFrame.Name = "MainFrame"
MainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
MainFrame.BorderColor3 = Color3.fromRGB(25, 25, 25)
MainFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
MainFrame.Size = UDim2.new(0, 570, 0, 350)
MainFrame.ZIndex = 1
MainFrame.Active = true
MainFrame.Draggable = true
TabFolder.Parent = MainFrame
InfoFolder.Parent = MainFrame
MainCorner.Parent = MainFrame
MainCorner.CornerRadius = UDim.new(.15, 0)
ScriptName.Parent = MainFramr
ScriptName.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
ScriptName.BackgroundTransparency = 0.350
ScriptName.BorderColor3 = Color3.fromRGB(0, 0, 0)
ScriptName.BorderSizePixel = 0
ScriptName.Position = UDim2.new(0.0526315793, 0, 0.0285714287, 0)
ScriptName.Size = UDim2.new(0, 132, 0, 32)
ScriptName.Font = Enum.Font.Unknown
ScriptName.Text = name
ScriptName.TextColor3 = Color3.fromRGB(255, 255, 255)
ScriptName.TextSize = 22.000
TabFrames.Name = "Tab"
TabFrames.Parent = MainFrame
TabFrames.Active = true
TabFrames.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
TabFrames.BorderColor3 = Color3.fromRGB(255, 255, 255)
TabFrames.BorderSizePixel = 0
TabFrames.Position = UDim2.new(0.0278611034, 0, 0.141205356, 0)
TabFrames.Size = UDim2.new(0, 46, 0, 206)
TabFrames.CanvasSize = UDim2.new(0, 0, 0, 0)
TabsList.Parent = TabFrames
TabsList.Padding = UDim.new(0, 6)
TabsList.SortOrder = Enum.SortOrder.LayoutOrder
-- // 信息面板
local PlayerPng = Instance.new("ImageLabel")
local PlayerName = Instance.new("TextLabel")
local PlayerCorner = Instance.new("UICorner")
PlayerPng.Name = "PlayerPng"
PlayerPng.Parent = InfoFolder
PlayerPng.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
PlayerPng.BackgroundTransparency = 0.35
PlayerPng.BorderColor3 = Color3.fromRGB(0, 0, 0)
PlayerPng.BorderSizePixel = 0
PlayerPng.Position = UDim2.new(0.0162359793, 0, 0.809999943, 0)
PlayerPng.Size = UDim2.new(0, 40, 0, 40)
PlayerPng.Image = "https://www.roblox.com/headshot-thumbnail/image?userId=".. game.Players.LocalPlayer.UserId .."&width=420&height=420&format=png"
PlayerCorner.Parent = MainFrame
PlayerCorner.CornerRadius = UDim.new(9, 0)
PlayerName.Name = "PlayerName"
PlayerName.Parent = PlayerPng
PlayerName.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
PlayerName.BorderColor3 = Color3.fromRGB(0, 0, 0)
PlayerName.BorderSizePixel = 0
PlayerName.Position = UDim2.new(1.51524389, 0, 0.274095088, 0)
PlayerName.Size = UDim2.new(0, 40, 0, 18)
PlayerName.Font = Enum.Font.SourceSansBold
PlayerName.Text = game.Players.LocalPlayer.Name
PlayerName.TextColor3 = Color3.fromRGB(255, 255, 255)
PlayerName.TextSize = 16.000
-- // 其他面板
local UiToggle = Instance.new("Button")
local ToggleCorner = Instance.new("UICorner")
UiToggle.Parent = Hack
UiToggle.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
UiToggle.BackgroundTransparency = 0.35
UiToggle.BorderColor3 = Color3.fromRGB(0, 0, 0)
UiToggle.BorderSizePixel = 0
UiToggle.Position = UDim2.new(0.184512421, 0, 0.105158731, 0)
UiToggle.Size = UDim2.new(0, 100, 0, 40)
UiToggle.Font = Enum.Font.SourceSansBold
UiToggle.TextColor3 = Color3.fromRGB(255, 255, 255)
UiToggle.Text = "On/Off"
UiToggle.TextSize = 18.000
UiToggle.TextTransparency = 0.500
UiToggle.MouseButton1Down:Connect(function()
if not MainFrame.Visible then
MainFrame:TweenSize(UDim2.new(0, 570, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, .5, true)
else
MainFrame:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, .5, true)
end
MainFrame.Visible = not MainFrame.Visible
end)
ToggleCorner.Parent = UiToggle
ToggleCorner.CornerRadius = UDim.new(.15, 0)
MakeDraggable(MainFrame, MainFrame)
MakeDraggable(UiToggle, UiToggle)
local Tabs = {}
function Tabs:Tab(name)
local TabName = Instance.new("Button")
local TabFrame = Instance.new("ScrollingFrame")
TabFrame.Name = "TabFrame"
TabFrame.Parent = MainFrame
TabFrame.Active = true
TabFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
TabFrame.BackgroundTransparency = 0.350
TabFrame.BorderColor3 = Color3.fromRGB(0, 0, 0)
TabFrame.BorderSizePixel = 0
TabFrame.Position = UDim2.new(0.12105263, 0, 0.140000001, 0)
TabFrame.Size = UDim2.new(0, 431, 0, 214)
TabFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
TabFrame.Visible = false
TabName.Name = "TabName"
TabName.Parent = TabFolder
TabName.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
TabName.BackgroundTransparency = 3.500
TabName.BorderColor3 = Color3.fromRGB(0, 0, 0)
TabName.BorderSizePixel = 0
TabName.Size = UDim2.new(0, 46, 0, 50)
TabName.SizeConstraint = Enum.SizeConstraint.RelativeYY
TabName.Font = Enum.Font.SourceSansBold
TabName.Text = name
TabName.TextColor3 = Color3.fromRGB(255, 255, 255)
TabName.TextSize = 12.000
TabName.LayoutOrder = #TabFolder:GetChildren() + 1
TabButton.MouseButton1Click:Connect(function()
for i, v in pairs(TabFolder:GetChildren()) do
v.Visible = false
end
TabFrame.Visible = true
TabFrame.CanvasSize = UDim2.new(0, 0, 0, TabsList.AbsoluteContentSize.Y) -- 更新 CanvasSize
end)
local Tab = {}
function Tab:Button(name,fuc)
local ButtonFrame = Instance.new("Frame")
local ButtonText = Instance.new("TextLabel")
local Button = Instance.new("Button")
ButtonFrame.Parent = TabFrame
ButtonFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
ButtonFrame.BackgroundTransparency = 0.300
ButtonFrame.BorderColor3 = Color3.fromRGB(0, 0, 0)
ButtonFrame.BorderSizePixel = 0
ButtonFrame.Size = UDim2.new(0, 397, 0, 35)
ButtonFrame.LayoutOrder = #TabFrame:GetChildren() + 1
ButtonText.Parent = ButtonFrame
ButtonText.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
ButtonText.BackgroundTransparency = 0.300
ButtonText.BorderColor3 = Color3.fromRGB(0, 0, 0)
ButtonText.BorderSizePixel = 0
ButtonText.Size = UDim2.new(0, 158, 0, 35)
ButtonText.Font = Enum.Font.SourceSansBold
ButtonText.Text = name
ButtonText.TextColor3 = Color3.fromRGB(255, 255, 255)
ButtonText.TextSize = 14.000
Button.Parent = ButtonFrame
Button.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
Button.BackgroundTransparency = 0.300
Button.BorderColor3 = Color3.fromRGB(0, 0, 0)
Button.BorderSizePixel = 0
Button.Position = UDim2.new(0.730478585, 0, 0, 0)
Button.Size = UDim2.new(0, 107, 0, 35)
Button.Font = Enum.Font.SourceSansBold
Button.Text = "运行"
Button.TextColor3 = Color3.fromRGB(255, 255, 255)
Button.TextSize = 18.000
Button.MouseButton1Down:Connect(fuc())
end
function Tab:Toggle(name,fuc)
local set = false
local ToggleFrame = Instance.new("Frame")
local ToggleText = Instance.new("TextLabel")
local Toggle = Instance.new("Button")
ToggleFrame.Parent = TabFrame
ToggleFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
ToggleFrame.BackgroundTransparency = 0.300
ToggleFrame.BorderColor3 = Color3.fromRGB(0, 0, 0)
ToggleFrame.BorderSizePixel = 0
ToggleFrame.Size = UDim2.new(0, 397, 0, 35)
ToggleFrame.LayoutOrder = #TabFrame:GetChildren() + 1
ToggleText.Parent = ButtonFrame
ToggleText.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
ToggleText.BackgroundTransparency = 0.300
ToggleText.BorderColor3 = Color3.fromRGB(0, 0, 0)
ToggleText.BorderSizePixel = 0
ToggleText.Size = UDim2.new(0, 158, 0, 35)
ToggleText.Font = Enum.Font.SourceSansBold
ToggleText.Text = name
ToggleText.TextColor3 = Color3.fromRGB(255, 255, 255)
ToggleText.TextSize = 14.000
Toggle.Parent = ButtonFrame
Toggle.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
Toggle.BackgroundTransparency = 0.300
Toggle.BorderColor3 = Color3.fromRGB(0, 0, 0)
Toggle.BorderSizePixel = 0
Toggle.Position = UDim2.new(0.730478585, 0, 0, 0)
Toggle.Size = UDim2.new(0, 107, 0, 35)
Toggle.Font = Enum.Font.SourceSansBold
Toggle.Text = "「 关闭 」"
Toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
Toggle.TextSize = 18.000
Toggle.MouseButton1Down:Connect(function()
set = not set
fuc(set)
if set then
Toggle.Text = "「 开启 」"
else
Toggle.Text = "「 关闭 」"
end
end)
local setToggle = {}
function setToggle:SetToggle(value)
set = value
end
return setToggle
end
function Tab:Texts(name,name2)
local Frame = Instance.new("Frame")
local TextLabel = Instance.new("TextLabel")
local TextLabel_2 = Instance.new("TextLabel")
Frame.Parent = game.StarterGui.Screen.Folder.GUI.TabFrame
Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
Frame.BackgroundTransparency = 0.300
Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
Frame.BorderSizePixel = 0
Frame.Position = UDim2.new(0.0301624127, 0, 0.299065411, 0)
Frame.Size = UDim2.new(0, 397, 0, 35)
TextLabel.Parent = Frame
TextLabel.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
TextLabel.BackgroundTransparency = 0.300
TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
TextLabel.BorderSizePixel = 0
TextLabel.Size = UDim2.new(0, 158, 0, 35)
TextLabel.Font = Enum.Font.SourceSansBold
TextLabel.Text = name
TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
TextLabel.TextSize = 14.000
TextLabel_2.Parent = Frame
TextLabel_2.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
TextLabel_2.BackgroundTransparency = 0.300
TextLabel_2.BorderColor3 = Color3.fromRGB(0, 0, 0)
TextLabel_2.BorderSizePixel = 0
TextLabel_2.Position = UDim2.new(0.730478585, 0, 0, 0)
TextLabel_2.Size = UDim2.new(0, 107, 0, 35)
TextLabel_2.Font = Enum.Font.SourceSansBold
TextLabel_2.Text = name2
TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
TextLabel_2.TextSize = 14.000
local settext = {}
function settext:SetText(n,n2)
TextLabel_2.Text = n2
TextLabel.Text = n
end
return settext
end
return Tab
end
return Tabs
end
return Lib
--[[
使用示例:
local LoadUi = loadstring(game:HttpGet("https://pastebin.com/raw/jM9K0u0p"))()
LoadUi:Ui("我丢")
]