BanGUI - Easily punish players!

I have a list of commands and cool features that could make this panel better.

-Custom ranks | Like Moderator - Admin - Owner
-Command Logs
-Bring/To Command

2 Likes

I have a few questions about your suggestions. When you say custom ranks, do you mean ranks you can make with a command and then give access to only specific options? For command logs, are you suggesting that the logs would show activity from all admins or just for you?

2 Likes

“do you mean ranks you can make with a command and then give access to only specific options?” – Yup

“command logs, are you suggesting that the logs would show activity from all admins or just for you?” – All the commands that have been used on that server.

Oh okay. Thanks for specifying that.

1 Like

POLL RESULTS

According to the poll, time ban options will release in the next update! :partying_face:

Also, thank you to @WizardlyChap4514 for suggesting commands for the custom modules, I will resume that update too! :slight_smile:

3 Likes

NO UPDATE TODAY

I had an update planned to release today after I finished a few more things, (all the stuff from the previous polls), but due to me being extremely busy not only with personal stuff, but also with watching the bloxies, I will not be updating the module today as planned. Hopefully, the update will release tomorrow.

1 Like

NEW PLUGIN RELEASED!

Prior to today’s model update, I decided to release this plugin to allow you to update your BanGUI model without your settings getting reset. Install it here: BanGUI Update - Roblox

Please note, this plugin is still in testing.

The plugin will ask for script injection, it is using that to insert a TEMPORARY script to ServerScriptService, and will not inject anything permanent.

1 Like

Okay btw keep up the good work it helps ALOT of people.

1 Like

Cool GUI, but why not just use HD Admin?

Correct me if I’m wrong, but I think HD admin has only ban unban kick and alert, not a serverban. Plus, in my opinion, HD admin is downright confusing and the HD admin icon that goes into the topbar seems unprofessional to me, as a person who never uses free models anymore.

2 Likes

HD Admin is missing serverban, the icon at the top is removeable.
I think your plugin might be better for some games, hd admin is more resource intensive.

If you have not already added it, time ban would be a good feature :slight_smile:

Hello. I see you are really hardworking on this. Keep it up, it is really Great!

Sincerely

MasterDiagnose

Yes, time ban is one of the features coming in the next update.

1 Like

PLEASE NOTE

I have been informed that the plugin is sometimes creating the error: OnServerEvent can only be used on the server. The issue is coming from the script, inserted to ServerScriptService to insert the new model. Please do not run the updater yet, as the model will get deleted but not re-inserted. I am working on a fix to this issue.

2 Likes

ISSUE FIXED (MINOR UPDATE)

I have fixed the issue with the plugin, you must update your plugin for it to properly function.

2 Likes

Hello!
What would you say about player history feature?

What do you mean by a player history? Do you mean a list showing users who you have previously taken action on?

1 Like

I think you can achieve that by using Datastore and tables

So I looked at the BanGui and whilst it does work from my testing, some of the scripts need some improvements. I’d provide an rbxm for it, but it would ruin the teachings to learn from this, but once you do read this, you could download it and see all the full changes I did

Polished Ban Gui

Keybind for this one is P
PolishedBanGui.rbxm (16.0 KB)

The first thing I have to mention is the way you set it up so you can set admins to use it. The way it is right now via Attributes is space costly and can be done more effectively, the way I did it was placing IntValues in the Admins folder with the value of it being a UserId of a player you want to admin, and in the scripts that need to check the ids, just make a table and put every UserId in the folder in the, this effectively makes it so you can have as many admins as you want and since it’ll be done on Server start up, no one can cheat the system to have free admin

From what I could tell, you don’t need to have separate local scripts for each of the actions you can take on a user (Ban, Kick, etc), You can just look through all the action frames, if the child is a Textbutton, do universal code there instead of separate localscripts. The way I did it was this

local nameBox = script.Parent.Parent.playerName.Front.Input
local reasonBox = script.Parent.Parent.reason.Front.Input

local repStore = game:GetService("ReplicatedStorage")

for _,button in pairs(script.Parent:GetDescendants()) do
	if button.ClassName ~= "TextButton" then continue end
	
	local buttonType = string.gsub(button.Parent.Name, "Button", "") --Removes Button from frame name
	local text = button.Parent.Front.TextLabel
	
	button.MouseButton1Click:Connect(function()
		local name = nameBox.Text
		local reason = reasonBox.Text
		
		if name == "" or reason == "" then
			text.Text = "Missing arguments"
			wait(2)
			text.Text = buttonType:upper()
		else
			print("Sending to ".. repStore[buttonType].Name)
			repStore[buttonType]:FireServer(name,reason)
		end
	end)
end

This localscript was placed as a Child of FloatingButtons. What this does is simple

  • Loop through all the descendants and ignore non TextButtons
  • Get the type of button it is by removing Button from the name of its parent, BanButton becomes Ban with this for example, so we know what type of button this is
  • Connect an event so when the button is clicked, it gets the text of PlayerName and Reason, checks if either of them is empty and if they aren’t, fire the corresponding RemoteEvent relating to the type of button is it

I did have to change the names of some of the remoteevents to get this working, and removed the localscripts form the action buttons, but all in all, it did make it a bit less repetitive which is always nice

The final thing I fixed up was the Warn Tween you had going. It isn’t really performant to use a while true do loop in you case as you could just use GetPropertyChangedSignal on the Visible property and do nothing if it’s false instead of waiting for it to be true.

Also numerical for loops exist which would help reduce the amount of repetition for the count down till the warn gui goes away.

And the final argument of TweenSizeAndPosition is callback, which is basically a function to run when the tween has finished, it removes the second unneeded busy wait that waits for the separator to be a certain size and position.

At the end after those changes, that script became this:

local main = script.Parent.Parent.Parent

main:GetPropertyChangedSignal("Visible"):Connect(function()
	if not main.Visible then return end
	for i = -1, -11, -1 do
		wait(1)
		script.Parent:TweenPosition(
			UDim2.new(0,0,i,0),           -- Final position the tween should reach
			Enum.EasingDirection.In, -- Direction of the easing
			Enum.EasingStyle.Sine,   -- Kind of easing to apply
			0.125,                       -- Duration of the tween in seconds
			true                    -- Whether in-progress tweens are interrupted
		)
	end

	main.Separator:TweenSizeAndPosition(
		UDim2.new(0,0,0,2),
		UDim2.new(0.5,0,0.3,0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Quad,
		1,
		true,
		function(state)
			main.Visible = false
		end
	)
end)

That’s all I honestly have to say, everything else was okay from my perspective. There are a few things I would recommend

  • Adding checks to make sure you cannot give an action to yourself (can’t ban yourself for example)
  • Making it so you don’t have to be completely correct with the name down to the capitalization. Basically, try adding something that will still punish a player regardless if you forgot to capitalize something. Example, writing embathehybrid should still work as if you wrote EmbatTheHybrid
  • Perhaps, but I’m not sure if this would fit with your gui, maybe also add punish by UserId as well?
1 Like

Thank you for all of those tips, I will use them and probably update the current model to the polished one :wink:

What do you mean by this?

1 Like