Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to unban our self from our serv ?

Hum how to explain that ? xD

i have this command for when we are not an admin my admin panel dont have to be there but actually he was still there so this is the script


function CheckAdmin(player)
	if player.Name == AdminData:GetAsync(player.UserId) then
		player:WaitForChild("PlayerGui"):WaitForChild("Admin").Enabled = true
		return true
	else
		local panel = player:WaitForChild("PlayerGui"):FindFirstChild("Admin")
		if panel then
			panel:Destroy()
		end
		return false
	end
end


i didn t putted my selv in the admin to try this but when i started the game i could use the pannel and i possibly put an automatic ban for exploiters/attempt of invoke admin pannel the problem is that this script work and i dont know how to unban my self xD

if u can help me for the two points thanks lot !

ps: i forgotted to precise that i have a ban checker script to lol i ll put here maybe all the script than can clarify all that


function CheckBan(player)
	
	local BanID = player.UserId
	
	local success, err = pcall(function()
		BanReason = BanData:GetAsync(BanID)
	end)
	if success then
		if BanReason then
			player:Kick(BanReason)
		end
	else
		error("Ne peut pas trouver un ban pour" .. player.Name .. ":" .. player.UserId .. " - " .. err)
	end
end

and maybe that can also help


game.Players.PlayerAdded:Connect(CheckAdmin)
game.Players.PlayerAdded:Connect(CheckBan)

2 comments

0

Did u try putting ur name back after u got banned?

0

i had actually tried but i dk how to unban my self so i m still banned

1 answer

just put a temporary script in and remove your ban, then add it back once done, or you can change the datastore name.

local DSS = game:GetService("DataStoreService")
local DS = DSS:GetDataStore("YOUR DATASTORE NAME") -- change name to your datastore

DS:SetAsync(UserId, false) -- change UserId to your USERID.

This discussion is preserved as it was. New answers, comments, and votes are closed.