Jump to content
jeelzzz

GUI Border Function

Recommended Posts

Posted (edited)

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}

Usage:

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

Enjoy!

Edited by jeelzzz
Added usage

IGN - jeelzzz
Discord - jeelzzz#3792

Share this post


Link to post
Share on other sites

Nice Skript.


 

Active Minehut Player since 2016

Advanced at Skript - Know a lot about running a server 

If you need help with anything contact me @ KJPAKA#0001

 

Share this post


Link to post
Share on other sites

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


First Joined: Mid-Late 2015
VIP: January 2020
Jr.Mod: 1st April 2020

Info:
~ Skript Developer
~ Discord: @nicholxs#3557
~ Previous names: Deterno, iHaveSkills, Retrical

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now



×
×
  • Create New...