Jump to content

GUI Border Function


Recommended Posts

A function that draws a border in a gui.

Made for the TuSKe GUI system.

function border(user: player, rows: number, borderItem: item):
	# user : The player to draw the border for.
	# rows : The number of rows the GUI has.
	# borderItem : The item to draw the border with.
	format gui slot (numbers from 0 to 8) of {_user} with {_borderItem}
	loop ({_rows} - 2) times:
		format gui slot (((loop-value) * 9), and ((loop-value) * 9) + 8) of {_user} with {_borderItem}
	format gui slot (numbers from ({_rows} - 1) * 9 to (({_rows} - 1) * 9) + 8) of {_user} with {_borderItem}


border(player, 5, gray stained glass pane named "&8")


Edited by jeelzzz
Added usage

Currently working on a vs code extension for editing server files

  • yes jeelzzz, i do support this vsc code extension - Reassembly
Link to comment
Share on other sites

Nice math, though you could probably compact it even further by putting it all into one line 😳

First Joined: July 2015
VIP: January 2020
Jr.Mod: 1st April 2020
Mod: 16th July 2020


~ Skript Developer
~ Discord: @nicholxs#0001
~ Previous names: Nichxlxs, Deterno, iHaveSkills, Retrical

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...