For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Config file

-- ===========================================================
-- Created by okok Scripts
-- Store: https://okok.tebex.io/
-- Documentation: https://docs.okokscripts.io/
-- Discord: https://discord.gg/okok
-- © 2026 okokScripts. All rights reserved.
-- ===========================================================

Config, Locales = {}, {}

Config.Debug = false 												-- If you want to add debug messages to help resolving issues


-- =========================
-- DASHBOARD SETTINGS
-- =========================
Config.OpenMenuKey = 'F7' 											-- Key to open the menu
Config.OpenMenuCommand = 'invoices' 								-- Command to open the menu
Config.SendInvoiceCommand = 'sendinvoice' 							-- Command to send open the create invoice menu


-- =========================
-- INVOICE SETTINGS
-- =========================

Config.ReferencePrefix = 'OK' 										-- Prefix for the reference of the invoices
Config.PrintedInvoiceItem = 'printed_invoice' 						-- Item added to the inventory when an invoice is printed
Config.AllowPlayersInvoice = true 									-- Allow players without jobs to create personal invoices
Config.InvoiceDistance = 5 											-- Distance to check for users to send invoices

Config.ShowOnlyClosestEmployees = false 							-- Show only the closest employees on the dropdown menu in permissions instead of all employees

Config.DeleteInvoicesAfter = 30 									-- Paid invoices are deleted this many days after paid_date, when the resource starts. Cancelled invoices are kept. Set to 0 to disable

Config.AutoPaySettings = {
	enabled = true, 												-- Charge unpaid invoices automatically after the due date
	limitDate = 7, 													-- Days the receiver has to pay
	checkEvery = 5, 												-- Minutes between unpaid invoice checks, recommended to be 5 minutes or higher to avoid overloading the server side
}

Config.InterestSettings = {
	enabled = false, 												-- Charge interest on top of the invoice if you don't pay it on time
	percentage = 5, 												-- Percentage of the original invoice added each interval after the due date
	interval = 1, 													-- Interval in days to add the interest to the invoice
}


-- =========================
-- VAT SETTINGS
-- =========================

Config.VatSettings = {
	enabled = true, 												-- Add VAT on top of the invoice (100 + 25% = 125)
	percentage = 25, 												-- Percentage of the VAT
	society = 'government', 								-- Society that receives the VAT when an invoice is paid
}


-- =========================
-- INSPECT SETTINGS
-- =========================

Config.InspectCitizenSocieties = {      							-- Societies that can receive the Inspect Players & Societies permission, then the boss can give the permissions to the grades on the UI
	'police',
	'government'
}


-- =========================
-- PERSONAL SETTINGS
-- =========================

Config.BasePersonalTemplates = {    								-- This is the base templates that will be used for personal invoices but users can remove, add or edit their templates in game
	{
		slug = 'vehicle-services', 									-- Unique identifier for the template
		name = 'Vehicle Services', 									-- Label, this is the name that will be shown in the template list
		icon = 'car', 												-- To fetch the icons, get them from https://lucide.dev/icons/
		color = 'blue', 											-- blue | red | amber | green | cyan | violet | neutral | or rgb(59, 130, 246) format
		items = { 													-- Default items, after a player edits the template in-game, their saved version is used instead of this list
			{ name = 'Car wash', amount = 250 },
			{ name = 'Interior cleaning', amount = 200 },
			{ name = 'Tire change', amount = 350 },
		}
	},
	{
		slug = 'odd-jobs',
		name = 'Odd Jobs',
		icon = 'wrench',
		color = 'green',
		items = {
			{ name = 'House cleaning', amount = 300 },
			{ name = 'Moving help', amount = 400 },
			{ name = 'Gardening', amount = 200 },
		}
	},
	{
		slug = 'personal',
		name = 'Personal',
		icon = 'user-round',
		color = 'violet',
		items = {
			{ name = 'Item sold', amount = 100 },
			{ name = 'Shared expenses', amount = 50 },
			{ name = 'Favor / service', amount = 150 },
		}
	},
}


-- =========================
-- SOCIETIES SETTINGS
-- =========================

Config.AllowedSocieties = { 										-- This is the base templates that will be used for society invoices but users with permissions can remove, add or edit the society templates in game
	['police'] = {
		authorPercentage = 0, 										-- Percentage of the invoice that the author receives
		templates = {
			{
				slug = 'traffic-fines',     						-- Unique identifier for the template
				name = 'Traffic Fines',     						-- Label, this is the name that will be shown in the template list
				icon = 'car', 										-- To fetch the icons, get them from https://lucide.dev/icons/
				color = 'blue', 									-- blue | red | amber | green | cyan | violet | neutral | or rgb(59, 130, 246) format
				items = { 											-- Default items, after a player edits the template in-game, their saved version is used as society template
					{ name = 'High Speed', amount = 550 },
					{ name = 'Parking on bridge', amount = 1200 },
					{ name = 'Jumping a red light', amount = 250 },
					{ name = 'Driving dangerously', amount = 750 },
					{ name = 'Reckless driving', amount = 1000 },
				}
			},
			{
				slug = 'criminal-charges',
				name = 'Criminal Charges',
				icon = 'shield-alert',
				color = 'red',
				items = {
					{ name = 'Assault', amount = 1500 },
					{ name = 'Theft', amount = 1000 },
				}
			},
		}
	},
	['ambulance'] = {
		authorPercentage = 0,
		templates = {
			{
				slug = 'medical',
				name = 'Medical',
				icon = 'heart-pulse',
				color = 'red',
				items = {
					{ name = 'Ambulance Ride', amount = 550 },
					{ name = 'First aid', amount = 250 },
					{ name = 'On-site treatment', amount = 400 },
					{ name = 'CPR / revive', amount = 750 },
					{ name = 'Hospital admission', amount = 1200 },
				}
			},
		}
	},
	['mechanic'] = {
		authorPercentage = 0,
		templates = {
			{
				slug = 'vehicle-repairs',
				name = 'Vehicle Repairs',
				icon = 'wrench',
				color = 'amber',
				items = {
					{ name = 'Engine repair', amount = 800 },
					{ name = 'Bodywork', amount = 600 },
					{ name = 'Tire change', amount = 250 },
				}
			},
		}
	},
}

Config.DefaultPermissionGroups = { 									-- After a society edits a group in the UI, that group is saved to the database and any changes here aren't applied on the UI
	[0] = { 											 			-- Any grade above the highest key uses that entry (5, 6, 7... = Full Access)
		badge = 'View Access',
		icon = 'user-round',
		accent = 'green',
		permissions = {
			'view_received', 'view_sent',
			'view_templates', 'view_overview',
		}
	},
	[1] = {
		badge = 'Limited Access',
		icon = 'users-round',
		accent = 'orange',
		permissions = {
			'view_received', 'view_sent',
			'view_templates', 'view_overview', 'create_invoices',
		}

	},
	[2] = {
		badge = 'Normal Access',
		icon = 'chevron-up',
		accent = 'violet',
		permissions = {
			'view_received', 'view_sent', 'create_invoices',
			'view_templates', 'view_overview', 'view_activity',
		}

	},
	[3] = {
		badge = 'High Access',
		icon = 'chevrons-up',
		accent = 'cyan',
		permissions = {
			'view_received', 'view_sent', 'create_invoices', 'cancel_invoices', 'print_invoices',
			'view_templates', 'create_templates', 'edit_templates',
			'view_overview', 'view_activity', 'pay_invoices',
		}
	},
	[4] = {
		badge = 'Full Access',
		icon = 'shield',
		accent = 'blue',
		permissions = {
			'view_received', 'view_sent', 'create_invoices', 'cancel_invoices', 'print_invoices',
			'view_templates', 'create_templates', 'edit_templates', 'delete_templates',
			'view_overview', 'view_activity', 'manage_permissions', 'pay_invoices', 'inspect_invoices',
		}
	},
}

Last updated