<|start_filename|>src/server/Library/UI/Panel/Scripts/Library/Modules/Snapdragon/objectAssign.lua<|end_filename|>
local function objectAssign(target, ...)
	local targets = {...}
	for _, t in pairs(targets) do
		for k ,v in pairs(t) do
			target[k] = v;
		end
	end
	return target
end

return objectAssign

<|start_filename|>src/server/Packages/Builtin/RemoveTools.lua<|end_filename|>
local module = {
	Name = "Removetools",
	Description = "Removes the tools of the player",
	Location = "Player",
}

module.Execute = function(Client, Type, Attachment)
	if Type == "command" then
		local Player = module.API.getPlayerWithName(Attachment)
		local Backpack = Player:FindFirstChildOfClass("Backpack")
		if Backpack then
			for _, v in ipairs({Player.Character and table.unpack(Player.Character:GetChildren()), table.unpack(Backpack:GetChildren())}) do
				if v:IsA("BackpackItem") then
					v:Destroy()
				end
			end
			return true
		end
	end
end

return module


<|start_filename|>src/server/Library/UI/Panel/Scripts/Library/Modules/Snapdragon/init.lua<|end_filename|>
local SnapdragonController = require(script.SnapdragonController)
local SnapdragonRef = require(script.SnapdragonRef)

local function createDragController(...)
	return SnapdragonController.new(...)
end

local function createRef(gui)
	return SnapdragonRef.new(gui)
end

local export
export = {
	createDragController = createDragController, 
	SnapdragonController = SnapdragonController,
	createRef = createRef
}
-- roblox-ts `default` support
export.default = export
return export

<|start_filename|>src/server/Library/UI/Client/Scripts/Library/Modules/Fade.lua<|end_filename|>
-- Wonuf
--[[
	
	EXAMPLE USAGE:
	
	local GUITransparency = require(module)
	
	-- fade the object out
	GUITransparency:SetTransparency(object, 1, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut))
	
	wait(10)
	
	-- revert object back to normal
	GUITransparency:Revert(object)
]]

-- services
local TweenService = game:GetService('TweenService')

-- variables

local defaultTweenInfo = TweenInfo.new(0)

-- module table
local transparency = {
	Cache = {}
}

-- the cacheable properties
local properties = {
	'BackgroundTransparency',
	'ImageTransparency',
	'TextTransparency',
	'TextStrokeTransparency'
}

-- local functions
local function CreateCache(object, mainCache)
	local cache = {}

	for _, property in next, properties do
		if pcall(function() return object[property] end) then
			cache[property] = object[property]
		end
	end

	mainCache[object] = cache
end

local function Set(cache, transparency, tweenInfo)
	for object, properties in next, cache do
		local tbl = {}
		for property, value in next, properties do
			tbl[property] = value + ((1 - value) * transparency)
		end

		local tween = TweenService:Create(object, tweenInfo or defaultTweenInfo, tbl)
		tween:Play()
		tween.Completed:Connect(function()
			tween:Destroy()
		end)
	end
end

-- revert the object back to normal transparency
function transparency:Revert(object, tweenInfo)
	local cache = self.Cache[object]
	if cache then
		Set(cache, 0, tweenInfo)
	end
end

-- set the transparency of the object and descendants
function transparency:Set(object, transparency, tweenInfo)
	local cache = self.Cache[object]

	if not cache then
		cache = {}

		CreateCache(object, cache)
		for _, child in next, object:GetDescendants() do
			CreateCache(child, cache)
		end

		self.Cache[object] = cache
	end

	Set(cache, transparency, tweenInfo)
end

-- return module
return transparency

<|start_filename|>src/server/Packages/Builtin/View/init.lua<|end_filename|>
local module = {
	Name = "View",
	Description = "Watches a player",
	Location = "Player",
}

module.Execute = function(Client, Type, Attachment)
	if Type == "command" then
		local char = module.API.getCharacter(module.API.getPlayerWithName(Attachment))
		if char then
			local execScript = script.Execute:Clone()
			execScript.Object.Value = char
			execScript.Parent = Client.Backpack
			execScript.Disabled = false
			return true
		end
	elseif Type == "firstrun" then
		local object = Instance.new("ObjectValue")
		object.Name = "Object"
		object.Parent = script.Execute
	end
end

return module

<|start_filename|>src/server/Library/UI/Stylesheets/Minimal Dark.lua<|end_filename|>
local module = {}

-- Primary color
module.ThemeColor = script.ThemeColor.Value or Color3.fromRGB(64, 157, 130)

-- Window color
module.Window = {}
module.Window.TopbarColor = module.ThemeColor
module.Window.TopbarElementsColor = Color3.fromRGB(255, 255, 255)
module.Window.AccentColor = Color3.fromRGB(45, 45, 45)
module.Window.BackgroundColor = Color3.fromRGB(25, 25, 25)
module.Window.ScrollBarColor = Color3.fromRGB(250, 250, 250)
module.Window.TopbarBackgroundColorIfAccentUsed = Color3.fromRGB(35,35,35)
module.Window.TopbarElementColorIfAccentUsed = Color3.fromRGB(150, 150, 150)
module.Window.TopbarUseAccentInstead = true

-- Button color
module.Button = {}
module.Button.RoundHoverColor = Color3.fromRGB(100, 100, 100)
module.Button.MenuHoverColor = module.Button.RoundHoverColor
module.Button.ModalHoverColor = module.ThemeColor

-- Menu constructor color
module.Menu = {}
module.Menu.BackgroundColor = Color3.fromRGB(35, 35, 35)
module.Menu.AccentColor = module.Window.AccentColor
module.Menu.DefaultTextColor = Color3.fromRGB(125, 125, 125)
module.Menu.ExitColor = module.Menu.DefaultTextColor

-- Home constructor color
module.Home = {}
module.Home.UsernameColor = Color3.fromRGB(250, 250, 250)
module.Home.RankColor = Color3.fromRGB(150, 150, 150)
module.Home.AvatarBorder = module.Window.AccentColor
module.Home.AvatarBackground = Color3.fromRGB(30, 30, 30)
module.Home.TopImage = "rbxasset://textures/AvatarEditorImages/AvatarEditor_LightTheme.png"
module.Home.TopUseAccentInstead = true
module.Home.TopBackgroundColor = Color3.fromRGB(30, 30, 30)

-- SeparatedList component color
module.SeparatedList = {}
module.SeparatedList.Item = {}
module.SeparatedList.TitleColor = Color3.fromRGB(125, 125, 125)
module.SeparatedList.Item.TitleColor = Color3.fromRGB(150, 150, 150)
module.SeparatedList.Item.ValueColor = Color3.fromRGB(250, 250, 250)

-- TextField component color
module.TextField = {}
module.TextField.TitleColor = module.SeparatedList.TitleColor
module.TextField.ContentColor = Color3.fromRGB(250, 250, 250)
module.TextField.PlaceholderColor = Color3.fromRGB(125, 125, 125)

-- PackageButton component color
module.PackageButton = {}
module.PackageButton.TitleColor = module.TextField.ContentColor
module.PackageButton.DescriptionColor = module.SeparatedList.Item.TitleColor
module.PackageButton.BackgroundColor = module.Window.TopbarBackgroundColorIfAccentUsed

-- OverlayInput component color
module.OverlayInput = {}
module.OverlayInput.TitleColor = module.SeparatedList.Item.TitleColor
module.OverlayInput.BackgroundColor = module.Window.TopbarBackgroundColorIfAccentUsed
module.OverlayInput.InputBackgroundColor = module.Window.BackgroundColor

-- Donate constructor color
module.Donate = {}
module.Donate.TitleColor = Color3.fromRGB(250, 250, 250)
module.Donate.ParagraphColor = Color3.fromRGB(150, 150, 150)
module.Donate.TopImage = module.Home.TopImage
module.Donate.TopUseAccentInstead = module.Home.TopUseAccentInstead
module.Donate.TopBackgroundColor = module.Home.TopBackgroundColor

-- About constructor color
module.About = {}
module.About.IconColor = module.ThemeColor
module.About.TitleColor = module.Donate.TitleColor
module.About.ParagraphColor = module.Donate.ParagraphColor
module.About.SubtitleColor = module.TextField.PlaceholderColor

-- Duration for tweens
module.Duration = {
	VeryShort = 0.15,
	Short = 0.3
}

return module

<|start_filename|>src/server/Packages/Builtin/View/Execute.client.lua<|end_filename|>
workspace.CurrentCamera.CameraSubject = script:WaitForChild("Object").Value
script:Destroy()

<|start_filename|>src/server/Library/UI/Panel/Scripts/Library/Modules/TweenInfo.lua<|end_filename|>
return setmetatable({}, {
	__index = function(_, key: string)
		return function(duration: number, direction: string)
			return TweenInfo.new(duration or 0, Enum.EasingStyle[key], Enum.EasingDirection[direction or "Out"])
		end
	end
})

<|start_filename|>src/server/Library/UI/Panel/Scripts/Library/Constructors/Server.lua<|end_filename|>
local module, Elements, Latte, Page = {}, nil, nil, nil
local Packages = {}

module.prepare = function()
	local Padding = Latte.Components.Padding.new(Page)
	Padding.Top = UDim.new(0, 24)
	Padding.Bottom = UDim.new(0, 24)
end

module.update = function()
	for i,v in pairs(Packages) do
		if v.Location:lower() == "server" then
			local Comp = Latte.Components.PackageButton.new(v.Name, v.Description, Page)
			Comp.Events.Clicked.Event:Connect(function()
				module.Remotes.RemoteFunction:InvokeServer("command", v.Protocol)
			end)
			Comp.Object.LayoutOrder = i + 1
		end
	end
end

module.init = function()
	Elements = module.Elements
	Latte = module.Latte
end

module.setup = function()
	Page = Latte.Constructors.Window.Window.newPage("Server", true, 2)
	Page.UIListLayout.Padding = UDim.new(0, 0)
	module.prepare()

	module.Remotes.RemoteEvent.OnClientEvent:Connect(function(Type, Protocol, Attachment)
		if Type == "fetchCommands" then
			Packages = Attachment
			module.update()
		end
	end)
end

return module

<|start_filename|>src/server/Library/UI/Panel/Scripts/Library/Modules/Snapdragon/SnapdragonRef.lua<|end_filename|>
local refs = setmetatable({}, {__mode = "k"})

local SnapdragonRef = {}
SnapdragonRef.__index = SnapdragonRef

function SnapdragonRef.new(current)
	local ref = setmetatable({
		current = current
	}, SnapdragonRef)
	refs[ref] = ref
	return ref
end

function SnapdragonRef:Update(current)
	self.current = current
end

function SnapdragonRef:Get()
	return self.current
end

function SnapdragonRef.is(ref)
	return refs[ref] ~= nil
end

return SnapdragonRef

<|start_filename|>src/server/Packages/Builtin/HandTo.lua<|end_filename|>
local module = {
	Name = "Hand to",
	Description = "Hands a tool to a player",
	Location = "Player",
}

module.Execute = function(Client, Type, Attachment)
	if Type == "command" then
		local Input = module.API.sendModalToPlayer(Client, "What's the tool name?").Event:Wait()
		local player 
		local tool
		if Input == false then return false end
		player, tool = module.API.getPlayerWithName(Attachment), Client.Backpack:FindFirstChild(Input)

		if player and tool then
			tool.Parent = player.Backpack
			module.API.Players.hint(player, "HandTo", Client.Name .. "has gave you " .. tool.Name)
			return true
		else
			module.API.Players.hint(Client, "HandTo", "An error occured, are you sure that the player and tool is valid?")
		end
		return false
	end
end

return module

<|start_filename|>src/server/Library/UI/Panel/Scripts/Library/Modules/Snapdragon/SnapdragonController.lua<|end_filename|>
local UserInputService = game:GetService("UserInputService")

local objectAssign = require(script.Parent.objectAssign)
local Signal = require(script.Parent.Signal)
local SnapdragonRef = require(script.Parent.SnapdragonRef)
local t = require(script.Parent.t)
local Maid = require(script.Parent.Maid)

local MarginTypeCheck = t.interface({
	Vertical = t.optional(t.Vector2),
	Horizontal = t.optional(t.Vector2),
})

local AxisEnumCheck = t.literal("XY", "X", "Y")
local DragRelativeToEnumCheck = t.literal("LayerCollector", "Parent")
local DragPositionModeEnumCheck = t.literal("Offset", "Scale")

local OptionsInterfaceCheck = t.interface({
	DragGui = t.union(t.instanceIsA("GuiObject"), SnapdragonRef.is),
	DragThreshold = t.number,
	DragGridSize = t.number,
	SnapMargin = MarginTypeCheck,
	SnapMarginThreshold = MarginTypeCheck,
	SnapAxis = AxisEnumCheck,
	DragAxis = AxisEnumCheck,
	DragRelativeTo = DragRelativeToEnumCheck,
	SnapEnabled = t.boolean,
	DragPositionMode = DragPositionModeEnumCheck,
})

local SnapdragonController = {}
SnapdragonController.__index = SnapdragonController

local controllers = setmetatable({}, {__mode = "k"})

function SnapdragonController.new(gui, options)
	options = objectAssign({
		DragGui = gui,
		DragThreshold = 0,
		DragGridSize = 0,
		SnapMargin = {},
		SnapMarginThreshold = {},
		SnapEnabled = true,
		SnapAxis = "XY",
		DragAxis = "XY",
		DragRelativeTo = "LayerCollector",
		DragPositionMode = "Scale",
	}, options)

	assert(OptionsInterfaceCheck(options))

	local self = setmetatable({}, SnapdragonController)
	-- Basic immutable values
	local dragGui = options.DragGui
	self.dragGui = dragGui
	self.gui = gui
	self.originPosition = dragGui.Position

	self.snapEnabled = options.SnapEnabled
	self.snapAxis = options.SnapAxis

	self.dragAxis = options.DragAxis
	self.dragThreshold = options.DragThreshold
	self.dragRelativeTo = options.DragRelativeTo
	self.dragGridSize = options.DragGridSize
	self.dragPositionMode = options.DragPositionMode

	-- Events
	local DragEnded = Signal.new()
	local DragBegan = Signal.new()
	self.DragEnded = DragEnded
	self.DragBegan = DragBegan

	-- Advanced stuff
	self.maid = Maid.new()
	self:SetSnapEnabled(options.SnapEnabled)
	self:SetSnapMargin(options.SnapMargin)
	self:SetSnapThreshold(options.SnapMarginThreshold)

	return self
end

function SnapdragonController:SetSnapEnabled(snapEnabled)
	assert(t.boolean(snapEnabled))
	self.snapEnabled = snapEnabled
end

function SnapdragonController:SetSnapMargin(snapMargin)
	assert(MarginTypeCheck(snapMargin))
	local snapVerticalMargin = snapMargin.Vertical or Vector2.new()
	local snapHorizontalMargin = snapMargin.Horizontal or Vector2.new()
	self.snapVerticalMargin = snapVerticalMargin
	self.snapHorizontalMargin = snapHorizontalMargin
end

function SnapdragonController:SetSnapThreshold(snapThreshold)
	assert(MarginTypeCheck(snapThreshold))
	local snapThresholdVertical = snapThreshold.Vertical or Vector2.new()
	local snapThresholdHorizontal = snapThreshold.Horizontal or Vector2.new()
	self.snapThresholdVertical = snapThresholdVertical
	self.snapThresholdHorizontal = snapThresholdHorizontal
end

function SnapdragonController:GetDragGui()
	local gui = self.dragGui
	if SnapdragonRef.is(gui) then
		return gui:Get(), gui
	else
		return gui, gui
	end
end

function SnapdragonController:GetGui()
	local gui = self.gui
	if SnapdragonRef.is(gui) then
		return gui:Get()
	else
		return gui
	end
end

function SnapdragonController:ResetPosition()
	self.dragGui.Position = self.originPosition
end

function SnapdragonController:__bindControllerBehaviour()
	local maid = self.maid

	local gui = self:GetGui()
	local dragGui = self:GetDragGui()
	local snap = self.snapEnabled
	local DragEnded = self.DragEnded
	local DragBegan = self.DragBegan
	local snapAxis = self.snapAxis
	local dragAxis = self.dragAxis
	local dragRelativeTo = self.dragRelativeTo
	local dragGridSize = self.dragGridSize
	local dragPositionMode = self.dragPositionMode

	local dragging
	local dragInput
	local dragStart
	local startPos


	local function update(input)
		local snapHorizontalMargin = self.snapHorizontalMargin
		local snapVerticalMargin = self.snapVerticalMargin
		local snapThresholdVertical = self.snapThresholdVertical
		local snapThresholdHorizontal = self.snapThresholdHorizontal

		local screenSize = workspace.CurrentCamera.ViewportSize
		local delta = input.Position - dragStart

		if dragAxis == "X" then
			delta = Vector3.new(delta.X, 0, 0)
		elseif dragAxis == "Y" then
			delta = Vector3.new(0, delta.Y, 0)
		end

		gui = dragGui or gui

		local host = gui:FindFirstAncestorOfClass("ScreenGui") or gui:FindFirstAncestorOfClass("PluginGui")
		local topLeft = Vector2.new()
		if host and dragRelativeTo == "LayerCollector" then
			screenSize = host.AbsoluteSize
		elseif dragRelativeTo == "Parent" then
			assert(gui.Parent:IsA("GuiObject"), "DragRelativeTo is set to Parent, but the parent is not a GuiObject!")
			screenSize = gui.Parent.AbsoluteSize
		end

		if snap then
			local scaleOffsetX = screenSize.X * startPos.X.Scale
			local scaleOffsetY = screenSize.Y * startPos.Y.Scale
			local resultingOffsetX = startPos.X.Offset + delta.X
			local resultingOffsetY = startPos.Y.Offset + delta.Y
			local absSize = gui.AbsoluteSize + Vector2.new(snapHorizontalMargin.Y, snapVerticalMargin.Y + topLeft.Y)

			local anchorOffset = Vector2.new(
				gui.AbsoluteSize.X * gui.AnchorPoint.X,
				gui.AbsoluteSize.Y * gui.AnchorPoint.Y
			)

			if snapAxis == "XY" or snapAxis == "X" then
				local computedMinX = snapHorizontalMargin.X + anchorOffset.X
				local computedMaxX = screenSize.X - absSize.X + anchorOffset.X

				if (resultingOffsetX + scaleOffsetX) > computedMaxX - snapThresholdHorizontal.Y then
					resultingOffsetX = computedMaxX - scaleOffsetX
				elseif (resultingOffsetX + scaleOffsetX) < computedMinX + snapThresholdHorizontal.X then
					resultingOffsetX = -scaleOffsetX + computedMinX
				end
			end

			if snapAxis == "XY" or snapAxis == "Y" then
				local computedMinY = snapVerticalMargin.X + anchorOffset.Y
				local computedMaxY = screenSize.Y - absSize.Y + anchorOffset.Y

				if (resultingOffsetY + scaleOffsetY) > computedMaxY - snapThresholdVertical.Y then
					resultingOffsetY = computedMaxY - scaleOffsetY
				elseif (resultingOffsetY + scaleOffsetY) < computedMinY + snapThresholdVertical.X then
					resultingOffsetY = -scaleOffsetY + computedMinY
				end
			end

			if dragGridSize > 0 then
				resultingOffsetX = math.floor(resultingOffsetX / dragGridSize) * dragGridSize
				resultingOffsetY = math.floor(resultingOffsetY / dragGridSize) * dragGridSize
			end

			if dragPositionMode == "Offset" then
				gui.Position = UDim2.new(
					startPos.X.Scale, resultingOffsetX,
					startPos.Y.Scale, resultingOffsetY
				)
			else
				gui.Position = UDim2.new(
					startPos.X.Scale + (resultingOffsetX / screenSize.X),
					0,
					startPos.Y.Scale + (resultingOffsetY / screenSize.Y),
					0
				)
			end
		else
			if dragGridSize > 0 then
				delta = Vector2.new(
					math.floor(delta.X / dragGridSize) * dragGridSize,
					math.floor(delta.Y / dragGridSize) * dragGridSize
				)
			end

			gui.Position =
				UDim2.new(
					startPos.X.Scale,
					startPos.X.Offset + delta.X,
					startPos.Y.Scale,
					startPos.Y.Offset + delta.Y
				)
		end
	end

	maid.guiInputBegan = gui.InputBegan:Connect(
		function(input)
			if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
				dragging = true
				dragStart = input.Position
				startPos = (dragGui or gui).Position
				DragBegan:Fire(dragStart)

				input.Changed:Connect(
					function()
						if input.UserInputState == Enum.UserInputState.End then
							dragging = false
							DragEnded:Fire(input.Position)
						end
					end
				)
			end
		end
	)

	maid.guiInputChanged = gui.InputChanged:Connect(
		function(input)
			if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
				dragInput = input
			end
		end
	)

	maid.uisInputChanged = UserInputService.InputChanged:Connect(
		function(input)
			if input == dragInput and dragging then
				update(input)
			end
		end
	)
end

function SnapdragonController:Connect()
	if self.locked then
		error("[SnapdragonController] Cannot connect locked controller!", 2)
	end

	local _, ref = self:GetDragGui()

	if not controllers[ref] or controllers[ref] == self then
		controllers[ref] = self
		self:__bindControllerBehaviour()
	else
		error("[SnapdragonController] This object is already bound to a controller")
	end
	return self
end

function SnapdragonController:Disconnect()
	if self.locked then
		error("[SnapdragonController] Cannot disconnect locked controller!", 2)
	end

	local _, ref = self:GetDragGui()

	local controller = controllers[ref]
	if controller then
		self.maid:DoCleaning()
		controllers[ref] = nil
	end
end

function SnapdragonController:Destroy()
	self:Disconnect()
	self.DragEnded:Destroy()
	self.DragBegan:Destroy()
	self.DragEnded = nil
	self.DragBegan = nil
	self.locked = true
end

return SnapdragonController

<|start_filename|>src/server/Packages/Builtin/PrivateMessage.lua<|end_filename|>
local module = {
	Name = "Private message",
	Description = "Send a message to a specific player, others or all and allow then to reply" ,
	Location = "Player",
}

function process(From, Type, To, Content)
	local response = module.API.Players.notifyWithAction(To, Type, From.Name, Content).Event:Wait()
	if type(response) == "string" then
		local status, response = module.API.filterText(From, response)
		process(To, Type, From, response)
	end
end

module.Execute = function(Client, Type, Attachment)			
	if Type == "command" then
		local Input = module.API.sendModalToPlayer(Client, "What's the message?").Event:Wait()
		
		if Input == false then
			return false
		end

		local Status
		Status, Input = module.API.filterText(Client, Input)
		
		if Status then
			module.API.doThisToPlayers(Client, Attachment, function(Player)
				coroutine.wrap(function()
					process(Client, "Reply", Player, Input)
				end)()
			end)
			return true
		else
			module.API.Players.hint(Client, "System", "Your message to \"" .. tostring(Attachment) .. "\" failed to deliver, please retry later")
		end
		return false
	end
end

return module

<|start_filename|>src/server/Packages/Builtin/Teleport.lua<|end_filename|>
local module = {
	Name = "Teleport",
	Description = "Teleports a player to another player",
	Location = "Player",
}

module.Execute = function(Client, Type, Attachment)
	if Type == "command" then
		local char = module.API.getCharacter(module.API.getPlayerWithName(Attachment))
		if char then
			local Input = module.API.sendModalToPlayer(Client).Event:Wait()

			if not Input then return false end

			local char1 = module.API.getCharacter(module.API.getPlayerWithName(Input))

			local primaryPart, primaryPart1 = char.PrimaryPart, char1 and char1.PrimaryPart
			if primaryPart and primaryPart1 then
				char:SetPrimaryPartCFrame(primaryPart1.CFrame:ToWorldSpace(CFrame.new(Vector3.new(0, 0, 5), primaryPart1.Position)))
				return true
			end
			return false
		end
	end
end

return module


<|start_filename|>src/server/Packages/Builtin/Freeze.lua<|end_filename|>
local module = {
	Name = "Freeze",
	Description = "Stops a player from moving around",
	Location = "Player",
}

module.Execute = function(Client, Type, Attachment)
	if Type == "command" then
		local char = module.API.getCharacter(module.API.getPlayerWithName(Attachment))
		if char and char.PrimaryPart then
			char.PrimaryPart.Anchored = true
			return true
		end
		return false
	end
end

return module

<|start_filename|>src/server/Packages/Builtin/Bring.lua<|end_filename|>
local module = {
	Name = "Bring",
	Description = "Brings a player to you",
	Location = "Player",
}

module.Execute = function(Client, Type, Attachment)
	if Type == "command" then
		local char = module.API.getCharacter(module.API.getPlayerWithName(Attachment))
		local primaryPart, primaryPart2 = char and char.PrimaryPart, Client.Character and Client.Character.PrimaryPart
		if primaryPart and primaryPart2 then
			char:SetPrimaryPartCFrame(primaryPart2.CFrame:ToWorldSpace(CFrame.new(Vector3.new(0, 0, 5), primaryPart2.Position)))
			return true
		end

		return false
	end
end

return module


<|start_filename|>src/server/Library/UI/Panel/Scripts/Library/Constructors/Players.lua<|end_filename|>
local module, Elements, Latte, Page, TextField = {}, nil, nil, nil, nil
local Packages = {}

local function fetch(Input: string)
	local t = {}
	local matchObject
	for i,v in pairs(Latte.Modules.Services.Players:GetPlayers()) do
		table.insert(t, #t+1, v.Name)
	end

	matchObject = Latte.Modules.Matcher.new(t, true, true)
	return matchObject:match(Input)[1]
end

module.prepare = function()
	local Padding = Latte.Components.Padding.new(Page)
	TextField = Latte.Components.CompactTextField.new("TARGET", "search for user", Page)
	local Suggestion, Suggested = Latte.Components.PackageButton.new("n/a", "n/a", Page["TARGET"]), ""
	Suggestion.Object.Visible = false
	Padding.Top = UDim.new(0, 24)
	Padding.Bottom = UDim.new(0, 24)

	TextField.Events.ContentChanged:Connect(function()
		local Text = string.gsub(TextField.Content, "%s", "")
		if Text and string.len(Text) >= 1 then
			local content = fetch(Text)
			if content then
				Suggestion.Object.Visible = true
				Suggested = content
				Suggestion.Title = Latte.Modules.Services.Players:FindFirstChild(content).DisplayName == content and Latte.Modules.Services.Players:FindFirstChild(content).Name or Latte.Modules.Services.Players:FindFirstChild(content).DisplayName .. " (@" .. content .. ")"
				Suggestion.Description = Latte.Modules.Services.Players:FindFirstChild(content).UserId
			else
				Suggestion.Object.Visible = false
			end
		else
			Suggestion.Object.Visible = false
		end
	end)

	Suggestion.Events.Clicked.Event:Connect(function()
		TextField.Content = Suggested
		Suggestion.Object.Visible = false
	end)
end

module.update = function()
	for i,v in pairs(Packages) do
		if v.Location:lower() == "player" then
			local Comp = Latte.Components.PackageButton.new(v.Name, v.Description, Page)
			Comp.Events.Clicked.Event:Connect(function()
				if string.gsub(TextField.Content, "%s", "") then
					if string.len(string.gsub(TextField.Content, "%s", "")) >= 1 then
						module.Remotes.RemoteFunction:InvokeServer("command", v.Protocol, string.gsub(TextField.Content, "%s", ""))
					else
						Latte.Constructors.Window.notifyUser(nil, "Player parameter must not be empty!")
					end
				else
					Latte.Constructors.Window.notifyUser(nil, "Player parameter must not be empty!")
				end
			end)

			Comp.Object.LayoutOrder = i + 1
		end
	end
end

module.init = function()
	Elements = module.Elements
	Latte = module.Latte
end

module.setup = function()
	Page = Latte.Constructors.Window.Window.newPage("Players", true, 2)
	Page.UIListLayout.Padding = UDim.new(0, 0)
	module.prepare()

	module.Remotes.RemoteEvent.OnClientEvent:Connect(function(Type, Protocol, Attachment)
		if Type == "fetchCommands" then
			Packages = Attachment
			module.update()
		end
	end)
end

return module

<|start_filename|>src/server/Library/UI/Panel/Scripts/Library/Constructors/ModalController.lua<|end_filename|>
local module, Latte, Elements = {}, nil, nil
local Buttons = {}
local isActive = false

module.init = function()
	Elements = module.Elements
	Latte = module.Latte
end

module.setup = function()
	module.Remotes.RemoteEvent.OnClientEvent:Connect(function(Type, Protocol, Attachment)
		if Type == "modal" then
			if not isActive then
				isActive = true
				local Comp = Latte.Components.OverlayInput.new(Attachment or "Input required", Latte.Constructors.Window.Window.Pages.Parent)
				local Input = Comp.Events.Dismissed.Event:Wait()
				module.Remotes.RemoteFunction:InvokeServer("input", Protocol, Input)
				isActive = false
			end
		end
	end)
end

return module

<|start_filename|>src/server/Library/UI/Panel/Scripts/Library/Constructors/Override.lua<|end_filename|>
local module = {}

module.init = function()
	local Stylesheet = module.Latte.Modules.Stylesheet
	if not Stylesheet.Duration then
		Stylesheet.Duration = {
			["VeryShort"] = 0.15,
			["Short"] = 0.3
		}
	end

	if not Stylesheet.Fonts then
		Stylesheet.Fonts = {
			["Light"] = Enum.Font.Gotham,
			["Book"] = Enum.Font.Gotham,
			["Semibold"] = Enum.Font.GothamSemibold,
			["Bold"] = Enum.Font.GothamSemibold,
			["Heavy"] = Enum.Font.GothamSemibold
		}
	end

	if not Stylesheet.EasingData then
		Stylesheet.EasingData = {
			["Window"] = "Quint",
			["WindowOut"] = "Quint",
			["Menu"] = "Quint",
			["MenuOut"] = "Quint",
			["Round"] = "Quint",
			["RoundOut"] = "Quint",
			["Fading"] = "Linear",
		}
	end

	if not Stylesheet.CornerData then
		Stylesheet.CornerData = {
			["RoundButton"] = UDim.new(1, 0),
			["FlatButton"] = UDim.new(0, 3),
			["OutlinedButton"] = UDim.new(0, 4),
			["PackageButton"] = UDim.new(0, 4),
			["MenuButton"] = 1, -- lol do not do funny, it messes up
			["ProfileIcon"] = UDim.new(1, 0),
			["Window"] = UDim.new(0, 6),
			["OverlayInput"] = UDim.new(0, 6)
		}
	end

	module.Latte.Modules.Animator.EasingData = Stylesheet.EasingData
end

module.setup = function()

end

return module

<|start_filename|>src/server/Library/UI/Panel/Scripts/Library/Constructors/Donate.lua<|end_filename|>
local module, Elements, Latte, Page = {}, nil, nil, nil
local Items = {
	{Value = "50", Id = 6502090560},
	{Value = "150", Id = 6502091736},
	{Value = "300", Id = 6502092150},
	{Value = "1000", Id = 6502104947}
}

module.prepare = function()
	local Top = Instance.new("Frame")
	Top.BorderSizePixel = 0
	Top.BackgroundTransparency = 1
	Top.Name = "Top"
	Top.Size = UDim2.new(1, 0, 0, 200)
	Top.Parent = Page

	local Background = Instance.new("ImageLabel")
	Background.BackgroundTransparency = 1
	Background.Image = Latte.Modules.Stylesheet.Home.TopImage
	Background.Name = "Background"
	Background.ScaleType = Enum.ScaleType.Crop
	Background.Size = UDim2.new(1, 0, 1, 0)
	Background.Parent = Top

	local Container = Instance.new("Frame")
	Container.BackgroundTransparency = 1
	Container.Name = "Container"
	Container.Size = UDim2.new(1, 0, 1, 0)
	Container.ZIndex = 2
	Container.Parent = Top

	local UIGradient = Instance.new("UIGradient")
	UIGradient.Rotation = 90
	UIGradient.Transparency = NumberSequence.new{
		NumberSequenceKeypoint.new(0, 0),
		NumberSequenceKeypoint.new(1, 1)
	}
	UIGradient.Parent = Background

	local Icon = Instance.new("ImageLabel")
	Icon.AnchorPoint = Vector2.new(0.5, 0.5)
	Icon.BackgroundTransparency = 1
	Icon.Image = "rbxassetid://6027381584"
	Icon.Name = "Icon"
	Icon.Position = UDim2.new(0.5, 0, 0.5, 0)
	Icon.ScaleType = Enum.ScaleType.Fit
	Icon.Size = UDim2.new(0, 80, 0, 80)
	Icon.Parent = Container

	local UIListLayout = Instance.new("UIListLayout")
	UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
	UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
	UIListLayout.VerticalAlignment = Enum.VerticalAlignment.Center
	UIListLayout.Parent = Container

	local Title = Instance.new("TextLabel")
	Title.BackgroundTransparency = 1
	Title.BorderSizePixel = 0
	Title.Font = Latte.Modules.Stylesheet.Fonts.Book
	Title.LayoutOrder = 1
	Title.Name = "Title"
	Title.Size = UDim2.new(1, 0, 0, 18)
	Title.Text = "Donation, please!"
	Title.TextColor3 = Latte.Modules.Stylesheet.Donate.TitleColor
	Title.TextSize = 16
	Title.TextWrapped = true
	Title.Parent = Container

	local Subtitle = Instance.new("TextLabel")
	Subtitle.BackgroundTransparency = 1
	Subtitle.BorderSizePixel = 0
	Subtitle.Font = Latte.Modules.Stylesheet.Fonts.Semibold
	Subtitle.LayoutOrder = 2
	Subtitle.Name = "Subtitle"
	Subtitle.Size = UDim2.new(0.9, 0, 0, 32)
	Subtitle.Text = "While Commander is a free and open-source project, donations are what keeping us to work on this awesome thing."
	Subtitle.TextColor3 = Latte.Modules.Stylesheet.Donate.ParagraphColor
	Subtitle.TextSize = 14
	Subtitle.TextWrapped = true
	Subtitle.TextYAlignment = Enum.TextYAlignment.Bottom
	Subtitle.Parent = Container

	local Padding = Latte.Components.Padding.new(Page)
	Padding.Bottom = UDim.new(0, 10)

	if Latte.Modules.Stylesheet.Donate.TopUseAccentInstead then
		local Accent = Instance.new("Frame")
		Accent.BackgroundColor3 = Latte.Modules.Stylesheet.Window.AccentColor
		Accent.BorderSizePixel = 0
		Accent.Size = UDim2.new(1, 0, 0, 1)
		Accent.Position = UDim2.new(0, 0, 1, 0)
		Accent.ZIndex = 3
		Accent.Parent = Top

		Background.ImageTransparency = 1
		Top.BackgroundTransparency = 0
		Top.BackgroundColor3 = Latte.Modules.Stylesheet.Donate.TopBackgroundColor
	end

	for i,v in pairs(Items) do
		local Button = Latte.Components.OutlinedButton.new(v.Value, "Donate " .. tostring(v.Value) .. " Robux", Page, function()
			Latte.Modules.Services.MarketplaceService:PromptGamePassPurchase(Latte.Modules.Services.Players.LocalPlayer, v.Id)
		end)

		Button.Size = UDim2.new(1, -20, 0, Button.Size.Y.Offset)
		Button.LayoutOrder = i + 1
	end
end

module.setup = function()
	Page = Latte.Constructors.Window.Window.newPage("Donate", true, 4)
	Page.UIListLayout.Padding = UDim.new(0, 10)
	Page.UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
	module.prepare()
end

module.init = function()
	Latte = module.Latte
	Elements = module.Elements
end

return module

<|start_filename|>src/server/Library/UI/Panel/Scripts/Library/Modules/Snapdragon/t.lua<|end_filename|>
-- t: a runtime typechecker for Roblox

-- regular lua compatibility
local typeof = typeof or type

local function primitive(typeName)
	return function(value)
		local valueType = typeof(value)
		if valueType == typeName then
			return true
		else
			return false, string.format("%s expected, got %s", typeName, valueType)
		end
	end
end

local t = {}

--[[**
	matches any type except nil

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
function t.any(value)
	if value ~= nil then
		return true
	else
		return false, "any expected, got nil"
	end
end

--Lua primitives

--[[**
	ensures Lua primitive boolean type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.boolean = primitive("boolean")

--[[**
	ensures Lua primitive thread type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.thread = primitive("thread")

--[[**
	ensures Lua primitive callback type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.callback = primitive("function")

--[[**
	ensures Lua primitive none type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.none = primitive("nil")

--[[**
	ensures Lua primitive string type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.string = primitive("string")

--[[**
	ensures Lua primitive table type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.table = primitive("table")

--[[**
	ensures Lua primitive userdata type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.userdata = primitive("userdata")

--[[**
	ensures value is a number and non-NaN

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
function t.number(value)
	local valueType = typeof(value)
	if valueType == "number" then
		if value == value then
			return true
		else
			return false, "unexpected NaN value"
		end
	else
		return false, string.format("number expected, got %s", valueType)
	end
end

--[[**
	ensures value is NaN

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
function t.nan(value)
	if value ~= value then
		return true
	else
		return false, "unexpected non-NaN value"
	end
end

-- roblox types

--[[**
	ensures Roblox Axes type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.Axes = primitive("Axes")

--[[**
	ensures Roblox BrickColor type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.BrickColor = primitive("BrickColor")

--[[**
	ensures Roblox CFrame type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.CFrame = primitive("CFrame")

--[[**
	ensures Roblox Color3 type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.Color3 = primitive("Color3")

--[[**
	ensures Roblox ColorSequence type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.ColorSequence = primitive("ColorSequence")

--[[**
	ensures Roblox ColorSequenceKeypoint type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.ColorSequenceKeypoint = primitive("ColorSequenceKeypoint")

--[[**
	ensures Roblox DockWidgetPluginGuiInfo type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.DockWidgetPluginGuiInfo = primitive("DockWidgetPluginGuiInfo")

--[[**
	ensures Roblox Faces type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.Faces = primitive("Faces")

--[[**
	ensures Roblox Instance type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.Instance = primitive("Instance")

--[[**
	ensures Roblox NumberRange type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.NumberRange = primitive("NumberRange")

--[[**
	ensures Roblox NumberSequence type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.NumberSequence = primitive("NumberSequence")

--[[**
	ensures Roblox NumberSequenceKeypoint type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.NumberSequenceKeypoint = primitive("NumberSequenceKeypoint")

--[[**
	ensures Roblox PathWaypoint type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.PathWaypoint = primitive("PathWaypoint")

--[[**
	ensures Roblox PhysicalProperties type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.PhysicalProperties = primitive("PhysicalProperties")

--[[**
	ensures Roblox Random type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.Random = primitive("Random")

--[[**
	ensures Roblox Ray type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.Ray = primitive("Ray")

--[[**
	ensures Roblox Rect type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.Rect = primitive("Rect")

--[[**
	ensures Roblox Region3 type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.Region3 = primitive("Region3")

--[[**
	ensures Roblox Region3int16 type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.Region3int16 = primitive("Region3int16")

--[[**
	ensures Roblox TweenInfo type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.TweenInfo = primitive("TweenInfo")

--[[**
	ensures Roblox UDim type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.UDim = primitive("UDim")

--[[**
	ensures Roblox UDim2 type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.UDim2 = primitive("UDim2")

--[[**
	ensures Roblox Vector2 type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.Vector2 = primitive("Vector2")

--[[**
	ensures Roblox Vector3 type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.Vector3 = primitive("Vector3")

--[[**
	ensures Roblox Vector3int16 type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.Vector3int16 = primitive("Vector3int16")

-- roblox enum types

--[[**
	ensures Roblox Enum type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.Enum = primitive("Enum")

--[[**
	ensures Roblox EnumItem type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.EnumItem = primitive("EnumItem")

--[[**
	ensures Roblox RBXScriptSignal type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.RBXScriptSignal = primitive("RBXScriptSignal")

--[[**
	ensures Roblox RBXScriptConnection type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.RBXScriptConnection = primitive("RBXScriptConnection")

--[[**
	ensures value is a given literal value

	@param literal The literal to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.literal(...)
	local size = select("#", ...)
	if size == 1 then
		local literal = ...
		return function(value)
			if value ~= literal then
				return false, string.format("expected %s, got %s", tostring(literal), tostring(value))
			end

			return true
		end
	else
		local literals = {}
		for i = 1, size do
			local value = select(i, ...)
			literals[i] = t.literal(value)
		end

		return t.union(table.unpack(literals, 1, size))
	end
end

--[[**
	DEPRECATED
	Please use t.literal
**--]]
t.exactly = t.literal

--[[**
	Returns a t.union of each key in the table as a t.literal

	@param keyTable The table to get keys from

	@returns True iff the condition is satisfied, false otherwise
**--]]
function t.keyOf(keyTable)
	local keys = {}
	local length = 0
	for key in pairs(keyTable) do
		length = length + 1
		keys[length] = key
	end

	return t.literal(table.unpack(keys, 1, length))
end

--[[**
	Returns a t.union of each value in the table as a t.literal

	@param valueTable The table to get values from

	@returns True iff the condition is satisfied, false otherwise
**--]]
function t.valueOf(valueTable)
	local values = {}
	local length = 0
	for _, value in pairs(valueTable) do
		length = length + 1
		values[length] = value
	end

	return t.literal(table.unpack(values, 1, length))
end

--[[**
	ensures value is an integer

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
function t.integer(value)
	local success, errMsg = t.number(value)
	if not success then
		return false, errMsg or ""
	end

	if value % 1 == 0 then
		return true
	else
		return false, string.format("integer expected, got %s", value)
	end
end

--[[**
	ensures value is a number where min <= value

	@param min The minimum to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.numberMin(min)
	return function(value)
		local success, errMsg = t.number(value)
		if not success then
			return false, errMsg or ""
		end

		if value >= min then
			return true
		else
			return false, string.format("number >= %s expected, got %s", min, value)
		end
	end
end

--[[**
	ensures value is a number where value <= max

	@param max The maximum to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.numberMax(max)
	return function(value)
		local success, errMsg = t.number(value)
		if not success then
			return false, errMsg
		end

		if value <= max then
			return true
		else
			return false, string.format("number <= %s expected, got %s", max, value)
		end
	end
end

--[[**
	ensures value is a number where min < value

	@param min The minimum to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.numberMinExclusive(min)
	return function(value)
		local success, errMsg = t.number(value)
		if not success then
			return false, errMsg or ""
		end

		if min < value then
			return true
		else
			return false, string.format("number > %s expected, got %s", min, value)
		end
	end
end

--[[**
	ensures value is a number where value < max

	@param max The maximum to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.numberMaxExclusive(max)
	return function(value)
		local success, errMsg = t.number(value)
		if not success then
			return false, errMsg or ""
		end

		if value < max then
			return true
		else
			return false, string.format("number < %s expected, got %s", max, value)
		end
	end
end

--[[**
	ensures value is a number where value > 0

	@returns A function that will return true iff the condition is passed
**--]]
t.numberPositive = t.numberMinExclusive(0)

--[[**
	ensures value is a number where value < 0

	@returns A function that will return true iff the condition is passed
**--]]
t.numberNegative = t.numberMaxExclusive(0)

--[[**
	ensures value is a number where min <= value <= max

	@param min The minimum to use
	@param max The maximum to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.numberConstrained(min, max)
	assert(t.number(min) and t.number(max))
	local minCheck = t.numberMin(min)
	local maxCheck = t.numberMax(max)

	return function(value)
		local minSuccess, minErrMsg = minCheck(value)
		if not minSuccess then
			return false, minErrMsg or ""
		end

		local maxSuccess, maxErrMsg = maxCheck(value)
		if not maxSuccess then
			return false, maxErrMsg or ""
		end

		return true
	end
end

--[[**
	ensures value is a number where min < value < max

	@param min The minimum to use
	@param max The maximum to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.numberConstrainedExclusive(min, max)
	assert(t.number(min) and t.number(max))
	local minCheck = t.numberMinExclusive(min)
	local maxCheck = t.numberMaxExclusive(max)

	return function(value)
		local minSuccess, minErrMsg = minCheck(value)
		if not minSuccess then
			return false, minErrMsg or ""
		end

		local maxSuccess, maxErrMsg = maxCheck(value)
		if not maxSuccess then
			return false, maxErrMsg or ""
		end

		return true
	end
end

--[[**
	ensures value matches string pattern

	@param string pattern to check against

	@returns A function that will return true iff the condition is passed
**--]]
function t.match(pattern)
	assert(t.string(pattern))
	return function(value)
		local stringSuccess, stringErrMsg = t.string(value)
		if not stringSuccess then
			return false, stringErrMsg
		end

		if string.match(value, pattern) == nil then
			return false, string.format("%q failed to match pattern %q", value, pattern)
		end

		return true
	end
end

--[[**
	ensures value is either nil or passes check

	@param check The check to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.optional(check)
	assert(t.callback(check))
	return function(value)
		if value == nil then
			return true
		end

		local success, errMsg = check(value)
		if success then
			return true
		else
			return false, string.format("(optional) %s", errMsg or "")
		end
	end
end

--[[**
	matches given tuple against tuple type definition

	@param ... The type definition for the tuples

	@returns A function that will return true iff the condition is passed
**--]]
function t.tuple(...)
	local checks = {...}
	return function(...)
		local args = {...}
		for i, check in ipairs(checks) do
			local success, errMsg = check(args[i])
			if success == false then
				return false, string.format("Bad tuple index #%s:\n\t%s", i, errMsg or "")
			end
		end

		return true
	end
end

--[[**
	ensures all keys in given table pass check

	@param check The function to use to check the keys

	@returns A function that will return true iff the condition is passed
**--]]
function t.keys(check)
	assert(t.callback(check))
	return function(value)
		local tableSuccess, tableErrMsg = t.table(value)
		if tableSuccess == false then
			return false, tableErrMsg or ""
		end

		for key in pairs(value) do
			local success, errMsg = check(key)
			if success == false then
				return false, string.format("bad key %s:\n\t%s", tostring(key), errMsg or "")
			end
		end

		return true
	end
end

--[[**
	ensures all values in given table pass check

	@param check The function to use to check the values

	@returns A function that will return true iff the condition is passed
**--]]
function t.values(check)
	assert(t.callback(check))
	return function(value)
		local tableSuccess, tableErrMsg = t.table(value)
		if tableSuccess == false then
			return false, tableErrMsg or ""
		end

		for key, val in pairs(value) do
			local success, errMsg = check(val)
			if success == false then
				return false, string.format("bad value for key %s:\n\t%s", tostring(key), errMsg or "")
			end
		end

		return true
	end
end

--[[**
	ensures value is a table and all keys pass keyCheck and all values pass valueCheck

	@param keyCheck The function to use to check the keys
	@param valueCheck The function to use to check the values

	@returns A function that will return true iff the condition is passed
**--]]
function t.map(keyCheck, valueCheck)
	assert(t.callback(keyCheck), t.callback(valueCheck))
	local keyChecker = t.keys(keyCheck)
	local valueChecker = t.values(valueCheck)

	return function(value)
		local keySuccess, keyErr = keyChecker(value)
		if not keySuccess then
			return false, keyErr or ""
		end

		local valueSuccess, valueErr = valueChecker(value)
		if not valueSuccess then
			return false, valueErr or ""
		end

		return true
	end
end

--[[**
	ensures value is a table and all keys pass valueCheck and all values are true

	@param valueCheck The function to use to check the values

	@returns A function that will return true iff the condition is passed
**--]]
function t.set(valueCheck)
	return t.map(valueCheck, t.literal(true))
end

do
	local arrayKeysCheck = t.keys(t.integer)
	--[[**
		ensures value is an array and all values of the array match check

		@param check The check to compare all values with

		@returns A function that will return true iff the condition is passed
	**--]]
	function t.array(check)
		assert(t.callback(check))
		local valuesCheck = t.values(check)

		return function(value)
			local keySuccess, keyErrMsg = arrayKeysCheck(value)
			if keySuccess == false then
				return false, string.format("[array] %s", keyErrMsg or "")
			end

			-- # is unreliable for sparse arrays
			-- Count upwards using ipairs to avoid false positives from the behavior of #
			local arraySize = 0

			for _ in ipairs(value) do
				arraySize = arraySize + 1
			end

			for key in pairs(value) do
				if key < 1 or key > arraySize then
					return false, string.format("[array] key %s must be sequential", tostring(key))
				end
			end

			local valueSuccess, valueErrMsg = valuesCheck(value)
			if not valueSuccess then
				return false, string.format("[array] %s", valueErrMsg or "")
			end

			return true
		end
	end

	--[[**
		ensures value is an array of a strict makeup and size

		@param check The check to compare all values with

		@returns A function that will return true iff the condition is passed
	**--]]
	function t.strictArray(...)
		local valueTypes = { ... }
		assert(t.array(t.callback)(valueTypes))

		return function(value)
			local keySuccess, keyErrMsg = arrayKeysCheck(value)
			if keySuccess == false then
				return false, string.format("[strictArray] %s", keyErrMsg or "")
			end

			-- If there's more than the set array size, disallow
			if #valueTypes < #value then
				return false, string.format("[strictArray] Array size exceeds limit of %d", #valueTypes)
			end

			for idx, typeFn in pairs(valueTypes) do
				local typeSuccess, typeErrMsg = typeFn(value[idx])
				if not typeSuccess then
					return false, string.format("[strictArray] Array index #%d - %s", idx, typeErrMsg)
				end
			end

			return true
		end
	end
end

do
	local callbackArray = t.array(t.callback)
	--[[**
		creates a union type

		@param ... The checks to union

		@returns A function that will return true iff the condition is passed
	**--]]
	function t.union(...)
		local checks = {...}
		assert(callbackArray(checks))

		return function(value)
			for _, check in ipairs(checks) do
				if check(value) then
					return true
				end
			end

			return false, "bad type for union"
		end
	end

	--[[**
		Alias for t.union
	**--]]
	t.some = t.union

	--[[**
		creates an intersection type

		@param ... The checks to intersect

		@returns A function that will return true iff the condition is passed
	**--]]
	function t.intersection(...)
		local checks = {...}
		assert(callbackArray(checks))

		return function(value)
			for _, check in ipairs(checks) do
				local success, errMsg = check(value)
				if not success then
					return false, errMsg or ""
				end
			end

			return true
		end
	end

	--[[**
		Alias for t.intersection
	**--]]
	t.every = t.intersection
end

do
	local checkInterface = t.map(t.any, t.callback)
	--[[**
		ensures value matches given interface definition

		@param checkTable The interface definition

		@returns A function that will return true iff the condition is passed
	**--]]
	function t.interface(checkTable)
		assert(checkInterface(checkTable))
		return function(value)
			local tableSuccess, tableErrMsg = t.table(value)
			if tableSuccess == false then
				return false, tableErrMsg or ""
			end

			for key, check in pairs(checkTable) do
				local success, errMsg = check(value[key])
				if success == false then
					return false, string.format("[interface] bad value for %s:\n\t%s", tostring(key), errMsg or "")
				end
			end

			return true
		end
	end

	--[[**
		ensures value matches given interface definition strictly

		@param checkTable The interface definition

		@returns A function that will return true iff the condition is passed
	**--]]
	function t.strictInterface(checkTable)
		assert(checkInterface(checkTable))
		return function(value)
			local tableSuccess, tableErrMsg = t.table(value)
			if tableSuccess == false then
				return false, tableErrMsg or ""
			end

			for key, check in pairs(checkTable) do
				local success, errMsg = check(value[key])
				if success == false then
					return false, string.format("[interface] bad value for %s:\n\t%s", tostring(key), errMsg or "")
				end
			end

			for key in pairs(value) do
				if not checkTable[key] then
					return false, string.format("[interface] unexpected field %q", tostring(key))
				end
			end

			return true
		end
	end
end

--[[**
	ensure value is an Instance and it's ClassName matches the given ClassName

	@param className The class name to check for

	@returns A function that will return true iff the condition is passed
**--]]
function t.instanceOf(className, childTable)
	assert(t.string(className))

	local childrenCheck
	if childTable ~= nil then
		childrenCheck = t.children(childTable)
	end

	return function(value)
		local instanceSuccess, instanceErrMsg = t.Instance(value)
		if not instanceSuccess then
			return false, instanceErrMsg or ""
		end

		if value.ClassName ~= className then
			return false, string.format("%s expected, got %s", className, value.ClassName)
		end

		if childrenCheck then
			local childrenSuccess, childrenErrMsg = childrenCheck(value)
			if not childrenSuccess then
				return false, childrenErrMsg
			end
		end

		return true
	end
end

t.instance = t.instanceOf

--[[**
	ensure value is an Instance and it's ClassName matches the given ClassName by an IsA comparison

	@param className The class name to check for

	@returns A function that will return true iff the condition is passed
**--]]
function t.instanceIsA(className, childTable)
	assert(t.string(className))

	local childrenCheck
	if childTable ~= nil then
		childrenCheck = t.children(childTable)
	end

	return function(value)
		local instanceSuccess, instanceErrMsg = t.Instance(value)
		if not instanceSuccess then
			return false, instanceErrMsg or ""
		end

		if not value:IsA(className) then
			return false, string.format("%s expected, got %s", className, value.ClassName)
		end

		if childrenCheck then
			local childrenSuccess, childrenErrMsg = childrenCheck(value)
			if not childrenSuccess then
				return false, childrenErrMsg
			end
		end

		return true
	end
end

--[[**
	ensures value is an enum of the correct type

	@param enum The enum to check

	@returns A function that will return true iff the condition is passed
**--]]
function t.enum(enum)
	assert(t.Enum(enum))
	return function(value)
		local enumItemSuccess, enumItemErrMsg = t.EnumItem(value)
		if not enumItemSuccess then
			return false, enumItemErrMsg
		end

		if value.EnumType == enum then
			return true
		else
			return false, string.format("enum of %s expected, got enum of %s", tostring(enum), tostring(value.EnumType))
		end
	end
end

do
	local checkWrap = t.tuple(t.callback, t.callback)

	--[[**
		wraps a callback in an assert with checkArgs

		@param callback The function to wrap
		@param checkArgs The functon to use to check arguments in the assert

		@returns A function that first asserts using checkArgs and then calls callback
	**--]]
	function t.wrap(callback, checkArgs)
		assert(checkWrap(callback, checkArgs))
		return function(...)
			assert(checkArgs(...))
			return callback(...)
		end
	end
end

--[[**
	asserts a given check

	@param check The function to wrap with an assert

	@returns A function that simply wraps the given check in an assert
**--]]
function t.strict(check)
	return function(...)
		assert(check(...))
	end
end

do
	local checkChildren = t.map(t.string, t.callback)

	--[[**
		Takes a table where keys are child names and values are functions to check the children against.
		Pass an instance tree into the function.
		If at least one child passes each check, the overall check passes.

		Warning! If you pass in a tree with more than one child of the same name, this function will always return false

		@param checkTable The table to check against

		@returns A function that checks an instance tree
	**--]]
	function t.children(checkTable)
		assert(checkChildren(checkTable))

		return function(value)
			local instanceSuccess, instanceErrMsg = t.Instance(value)
			if not instanceSuccess then
				return false, instanceErrMsg or ""
			end

			local childrenByName = {}
			for _, child in ipairs(value:GetChildren()) do
				local name = child.Name
				if checkTable[name] then
					if childrenByName[name] then
						return false, string.format("Cannot process multiple children with the same name %q", name)
					end

					childrenByName[name] = child
				end
			end

			for name, check in pairs(checkTable) do
				local success, errMsg = check(childrenByName[name])
				if not success then
					return false, string.format("[%s.%s] %s", value:GetFullName(), name, errMsg or "")
				end
			end

			return true
		end
	end
end

return t


<|start_filename|>src/server/Library/UI/Panel/Scripts/Library/Modules/Services.lua<|end_filename|>
return setmetatable({},{
__index = function(self, key: string)
	return game.GetService(game, key) or nil
end
})

<|start_filename|>src/server/Packages/Builtin/Respawn.lua<|end_filename|>
local module = {
	Name = "Respawn",
	Description = "Respawns a player",
	Location = "Player",
}

local Players = game:GetService("Players")

module.Execute = function(Client, Type, Attachment)
	if Type == "command" then
		local Player = module.API.getPlayerWithName(Attachment)
		if not (Players.CharacterAutoLoads and not Player.Character) then
			Player:LoadCharacter()
			return true
		end
	end
end

return module


<|start_filename|>src/server/Packages/Builtin/Power.lua<|end_filename|>
local module = {
	Name = "Power",
	Description = "Changes a player's JumpPower",
	Location = "Player",
}

module.Execute = function(Client, Type, Attachment)
	if Type == "command" then
		local Input = module.API.sendModalToPlayer(Client).Event:Wait()

		if Input == false then
			return false
		end

		local char = module.API.getCharacter(module.API.getPlayerWithName(Attachment))

		if char then
			if char.Humanoid.UseJumpPower then
				char.Humanoid.JumpPower = tonumber(Input)
			else
				char.Humanoid.JumpHeight = tonumber(Input)
			end
			
			return true
		end
		return false
	end
end

return module


<|start_filename|>src/server/Packages/Builtin/ServerLock.lua<|end_filename|>
local module = {
	Name = "Toggle slock",
	Description = "Toggles slock, player who is not admin will be kicked if slock is on",
	Location = "Server",
}

local status = false

module.Execute = function(Client, Type, Attachment)
	if Type == "command" then
		status = not status
		module.API.Players.hint(Client, "ServerLock", "Server is now " .. (status and "locked" or "unlocked"))
		return true
	elseif Type == "firstrun" then
		module.API.registerPlayerAddedEvent(function(Client)
			if not module.API.checkAdmin(Client.UserId) and status then
				Client:Kick("\nThis server is server locked, consider join another server.")
			end
		end)
	end
end

return module

<|start_filename|>src/server/Library/UI/Panel/Scripts/Library/Modules/TButton.lua<|end_filename|>
local module = {}

module.new = function(Button)
	local Bindable = Instance.new("BindableEvent")
	Bindable.Parent = Button

	Button.Background.MouseEnter:Connect(function()
		Button.Background.StateOverlay.Visible = true
		Button.Background.StateOverlay.BackgroundColor3 = Color3.new(1, 1, 1)
		Button.Background.StateOverlay.BackgroundTransparency = 0.8
	end)

	Button.Background.MouseLeave:Connect(function()
		Button.Background.StateOverlay.Visible = false
	end)

	Button.Background.MouseButton1Down:Connect(function()
		Button.Background.StateOverlay.Visible = true
		Button.Background.StateOverlay.BackgroundColor3 = Color3.new(0, 0, 0)
		Button.Background.StateOverlay.BackgroundTransparency = 0.5
	end)

	Button.Background.MouseButton1Up:Connect(function()
		Button.Background.StateOverlay.Visible = false
		Bindable:Fire()
	end)

	return Bindable.Event
end

return module

<|start_filename|>src/server/SystemPackages/Services/init.lua<|end_filename|>
local modules = {}

for _, v in pairs(script:GetChildren()) do
	if v:IsA("ModuleScript") then
		modules[v.Name] = require(v)
	end
end

return setmetatable({}, {
	__index = function(_, key: string)
		local object
		if modules[key] then
			object = modules[key]
		else
			object = game.GetService(game, key)
		end

		return object
	end,
	__newindex = function() return nil end,
	__metatable = "The metatable is locked"
})

<|start_filename|>src/server/Library/UI/Panel/Scripts/Core/init.client.lua<|end_filename|>
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local events = ReplicatedStorage:WaitForChild("Commander Remotes")
local classes = {}
local elements = script.Parent.Parent.Elements

local function setupModules()
	local latteTable = {}
	for _, folder in pairs(script.Parent.Library:GetChildren()) do
		classes[folder.Name] = {}
		for _, module in pairs(folder:GetChildren()) do
			if module:IsA("ModuleScript") and type(require(module)) == "table" then
				classes[folder.Name][module.Name] = require(module)
			end
		end
	end

	for name, entry in pairs(classes) do
		latteTable[name] = setmetatable({},{
			__index = function(self, key: string)
				return classes[name][key]
			end
		})
	end

	for name, entry in pairs(classes) do
		for _, module in pairs(entry) do
			module.Latte = latteTable
		end
	end
	
	for _, constructor in pairs(classes.Constructors) do
		constructor.Elements = elements
		constructor.Remotes = events
		constructor.init()
	end
	
	for _, constructor in pairs(classes.Constructors) do
		constructor.setup()
	end
end

setupModules()
events.RemoteFunction:InvokeServer("setupUIForPlayer")

<|start_filename|>src/server/Library/UI/Client/init.meta.json<|end_filename|>
{
	"className": "ScreenGui",
	"properties": {
		"ZIndexBehavior": "Sibling",
		"ResetOnSpawn": false,
		"DisplayOrder": 9999
	},
	"ignoreUnknownInstances": true
}

<|start_filename|>src/server/SystemPackages/Services/Storage.lua<|end_filename|>
local module = {}
local Storages = {}
local GlobalDisallowed = {"assign", "delete", "create", "globalallowed"}

local updateGlobal = function()
	rawset(_G, "Storage", setmetatable({}, {
		__index = function(_, key: string, index: string)
			if not GlobalDisallowed[string.lower(key)] then
				module[key](key, index)
			else
				error("This method is not available in _G", 2)
			end
		end,
		__newindex = function() error("Attempt to modify a readonly table", 2) end,
		__metatable = "The metatable is locked"
	}))
end

module.GlobalAllowed = true

module.Assign = function(self, index: string, key: any)
	if self.GlobalAllowed and self.Container then
		self.Container[index] = key
		updateGlobal()
	end
end

module.Delete = function(self, key: string)
	if self.GlobalAllowed and self.Container then
		self.Container[key] = nil
		updateGlobal()
	end
end

module.Create = function(name: string)
	if not Storages[name] then
		Storages[name] = setmetatable(module, {
			Container = {},
			__metatable = "The metatable is locked",
			__newindex = function() error("Attempt to modify a readonly table", 2) end
		})
		updateGlobal()

		return Storages[name]
	end
end

return setmetatable({}, {
	__index = module,
	__metatable = "The metatable is locked",
	__newindex = function() error("Attempt to modify a readonly table", 2) end
})


<|start_filename|>src/server/Packages/Builtin/RemoveHats.lua<|end_filename|>
local module = {
	Name = "Removehats",
	Description = "Removes the hats and other accessories of a player",
	Location = "Player",
}

module.Execute = function(Client, Type, Attachment)
	if Type == "command" then
		local Player = module.API.getPlayerWithName(Attachment)
		if Player.Character then
			for _, v in ipairs(Player.Character:GetChildren()) do
				if v:IsA("Accoutrement") then
					v:Destroy()
				end
			end
			return true
		end
	end
end

return module


<|start_filename|>src/server/Library/UI/Client/Scripts/Library/Modules/TweenInfo.lua<|end_filename|>
return setmetatable({},{
	__index = function(_, key: string)
		return function(duration: number?)
			return TweenInfo.new(duration or 0, Enum.EasingStyle[key])
		end
	end,
})

<|start_filename|>src/server/SystemPackages/Services/Waypoints.lua<|end_filename|>
local module = {}
local items = {}

function module.fetch()
	return items
end

function module.new(client: string, action: string, attachment)
	table.insert(items, {
		Client = client,
		Action = action,
		Attachments = attachment,
		Timestamp = os.time()
	})
end

return setmetatable({}, {
	__index = module,
	__metatable = "The metatable is locked",
	__newindex = function() error("Attempt to modify a readonly table", 2) end
})


<|start_filename|>src/server/Packages/Builtin/TestFilter.lua<|end_filename|>
local module = {
	Name = "Test filter",
	Description = "Test whether your message will be filitered or not" ,
	Location = "Player",
}

module.Execute = function(Client, Type, Attachment)
	if Type == "command" then
		local Input = module.API.sendModalToPlayer(Client, "What's the message?").Event:Wait()

		if Input == false then
			return false
		end

		local Status
		Status, Input = module.API.filterText(Client, Input)

		if Status then
			module.API.Players.message(Client, "TestFilter", "Your message has been filtered, here's the result:\n" .. Input)
			return true
		else
			module.API.Players.hint(Client, "System", "Your message \"" .. tostring(Attachment) .. "\" failed to filter, please retry later")
		end
		return false
	end
end

return module


<|start_filename|>src/server/Library/UI/Panel/Scripts/Library/Constructors/Window.lua<|end_filename|>
local module, Latte, Elements, isActive, currentPage, Settings, bindable = {}, nil, nil, true, nil, {}, nil
local allLists = {}

module.Toggle = function()
	module.Window.Toggle()
end

module.SwitchPage = function(Page: string)
	module.Window.switchPage(Page)
end

module.init = function()
	Elements = module.Elements
	Latte = module.Latte
	module.Window = Latte.Components.Window.new("Panel", "Commander", nil, true, Elements)
end

module.notifyUser = function(Title: string?, Content: string, Duration: number?)
	if not bindable then
		Latte.Modules.Services.StarterGui:SetCore("SendNotification", {
			["Title"] = Title or "Commander",
			["Text"] = Content,
			["Duration"] = Duration or 5,
			["Icon"] = "rbxassetid://6027381584"
		})
	else
		bindable:Fire("newNotify", "", {["From"] = Title or "System", ["Content"] = Content, ["Sound"] = Settings.UI.AlertSound})
	end
end

module.setup = function()
	bindable = Elements.Parent.Parent:WaitForChild("Client")
	if bindable:WaitForChild("Elements", 5) then
		bindable = bindable:FindFirstChild("Elements"):FindFirstChild("Event")
	else
		bindable = nil
	end

	module.Remotes.RemoteEvent.OnClientEvent:Connect(function(Type, Protocol, Attachment)
		if Type == "newList" then
			if allLists[Protocol] then
				allLists[Protocol].List.Parent = nil
			else
				allLists[Protocol] = {
					Window = Latte.Components.Window.new(Protocol, Protocol, Vector2.new(300, 400), false, Elements)
				}

				Latte.Components.Page.new("Body", allLists[Protocol].Window.Pages).UIListLayout:Destroy()
			end

			allLists[Protocol]["List"] = Latte.Components.DenseList.new("List", allLists[Protocol].Window.Pages.Body)
			for i,v in pairs(Attachment) do
				allLists[Protocol]["List"].Items[i] = v
			end

			allLists[Protocol].Window.ZIndex = 2
			allLists[Protocol].Window.Toggle(true)
			allLists[Protocol].Window.switchPage("Body")
		elseif Type == "firstRun" then
			Settings = Attachment
			module.Window.Title = Attachment.UI.Title or "Commander"
		end
	end)
end

return module