Skip to content

Latest commit

 

History

History
354 lines (305 loc) · 5.61 KB

File metadata and controls

354 lines (305 loc) · 5.61 KB

CompKiller UI Document

Using Library

local Compkiller = loadstring(game:HttpGet("https://raw.githubusercontent.com/4lpaca-pin/CompKiller/refs/heads/main/src/source.luau"))();

Creating Notification

local Notifier = Compkiller.newNotify();

Send Notification

Notifier.new({
	Title = "Notification",
	Content = "Compkiller",
	Duration = 10,
	Icon = "rbxassetid://120245531583106"
});

Loading UI

Compkiller:Loader("rbxassetid://120245531583106" , 1.5).yield();

Creating Window

local Window = Compkiller.new({
	Name = "COMPKILLER",
	Keybind = "Insert",
	Logo = "rbxassetid://120245531583106",
	Scale = Compkiller.Scale.Window, -- Leave blank if you want automatic scale [PC, Mobile].
	TextSize = 15,
});

Creating Watermark

local Watermark = Window:Watermark();

Creating Text

local Time = Watermark:AddText({
	Icon = "timer",
	Text = "TIME",
});

Editing Text

Time:SetText(Compkiller:GetTimeNow());

Creating Tab Category

Window:DrawCategory({
	Name = "Category"
});

Creating Tab (Normal)

local NormalTab = Window:DrawTab({
	Name = "Example Tab",
	Icon = "apple",
});

Creating Tab (Single)

local NormalTab = Window:DrawTab({
	Name = "Example Tab",
	Icon = "apple",
	Type = "Single",
});

Creating Container Tab

local ContainerTab = Window:DrawContainerTab({
	Name = "Extract Tabs",
	Icon = "contact",
});

-- Creating Tab (Normal) --
local ExtractTab = ContainerTab:DrawTab({
	Name = "Tab 1",
	Type = "Double"
});

-- Creating Tab (Single) --
local SingleExtractTab = ContainerTab:DrawTab({
	Name = "Tab 2",
	Type = "Single",
});

Creating Section

local NormalSection = NormalTab:DrawSection({
	Name = "Section",
	Position = 'left'	
});

Creating Toggle

local Toggle = NormalSection:AddToggle({
	Name = "Toggle",
	Flag = "Toggle_Example", -- Leave it blank will not save to config (ALL ELEMENTS)
	Default = false,
	Callback = print,
});

Element Link

Link is available for Toggle, Slider, Keybind and Color Picker

Link Keybind

Element.Link:AddKeybind({
	Default = "E",
	Flag = "Option_Keybind",
	Callback = print
});

Link Helper

Element.Link:AddHelper({
	Text = "Helper Text"
})

Link Color-Picker

Element.Link:AddColorPicker({
	Default = Color3.fromRGB(255,255,255),
	Callback = print
})

Link Option

local Option = Toggle.Link:AddOption()

Option:AddToggle({
	Name = "Toggle in option!",
	Callback = print
})

Creating Keybind

NormalSection:AddKeybind({
	Name = "Keybind",
	Default = "LeftAlt",
	Flag = "Keybind_Example",
	Callback = print,
});

Creating Slider

NormalSection:AddSlider({
	Name = "Slider",
	Min = 0,
	Max = 100,
	Default = 50,
	Round = 0,
	Flag = "Slider_Example",
	Callback = print
});

Creating ColorPicker

NormalSection:AddColorPicker({
	Name = "ColorPicker",
	Default = Color3.fromRGB(0, 255, 140),
	Flag = "Color_Picker_Example",
	Callback = print
})

Creating Dropdown

NormalSection:AddDropdown({
	Name = "Single Dropdown",
	Default = "Head",
	Flag = "Single_Dropdown",
	Values = {"Head","Body","Arms","Legs"},
	Callback = print
})

Multi Dropdown

NormalSection:AddDropdown({
	Name = "Multi Dropdown",
	Default = {"Head"},
	Multi = true,
	Flag = "Multi_Dropdown",
	Values = {"Head","Body","Arms","Legs"},
	Callback = print
})

Creating Button

NormalSection:AddButton({
	Name = "Button",
	Callback = function()
		print('PRINT!')
	end,
})

Creating Paragraph

NormalSection:AddParagraph({
	Title = "Paragraph",
	Content = "Very cool paragraph"
})

Creating Textbox

NormalSection:AddTextBox({
	Name = "Textbox",
	Placeholder = "Placeholder",
	Default = "Hello, World",
  Flag = "TextBoxExample",
	Callback = print
})

Creating Config Tab

local ConfigUI = Window:DrawConfig({
	Name = "Config",
	Icon = "folder",
	Config = ConfigManager, -- Config Manager (required)
});

ConfigUI:Init();

Config Manager

Write Config

write current value to config

ConfigManager:WriteConfig({
	Name = "Config Name",
	Author = "Creator Name"
})

Read Info

read config info. Ex: Author and Created date

ConfigManager:ReadInfo("<Config Name>")

Load Config

Load the config in directory

ConfigManager:LoadConfig("<Config Name>")

Delete Config

Delete the config in directory

ConfigManager:DeleteConfig("<Config Name>")

Get Configs

get all configs in directory

ConfigManager:GetConfigs()

Directory Path

config directory path

ConfigManager.Directory

User Settings

Create

local UserSettings = Window.UserSettings:Create();

Example

UserSettings:AddColorPicker({
	Name = "Menu Color",
	Default = Compkiller.Colors.Highlight,
	Callback = function(f)
		Compkiller.Colors.Highlight = f;
		
		Compkiller:RefreshCurrentColor();
	end,
});

UserSettings:AddKeybind({
	Name = "Menu Key",
	Default = MenuKey,
	Callback = function(f)
		MenuKey = f;
		
		Window:SetMenuKey(MenuKey)
	end,
});

UserSettings:AddDropdown({
	Name = "Menu Language",
	Values = {"English","Russian","Chinese"},
	Default = "English",
	Callback = print
});

UserSettings:AddDropdown({
	Name = "Menu Theme",
	Values = {
		"Default",
		"Dark Green",
		"Dark Blue",
		"Purple Rose",
		"Skeet"
	},
	
	Default = "Default",
	
	Callback = function(f)
		Compkiller:SetTheme(f)
	end,
});

UserSettings:AddDropdown({
	Name = "Visible Widgets",
	Values = {"Watermark","Keybinds","Double Tab"},
	Multi = true,
	Default = {"Watermark"},
	Callback = function(f)
		print(f)
	end,
});