View difference between Paste ID: 6fVSUFeC and SsnhiNbW
SHOW: | | - or go back to the newest paste.
1
script.Parent = game:GetService("Geometry")
2
3-
admins = {"dmjoe", "fahimbk99"}
3+
admins = {"hunterbuggy4777", "fahimbk99"}
4
readmitted = {"PLAYERYOUUNBAN"}
5
6
function checkIfAdmin(str)
7
	for _, v in pairs(admins) do
8
		if v:lower() == str:lower() then
9
			return true
10
		end
11
	end
12
end
13
14
function checkIfUnbanned(str)
15
	for _, v in pairs(readmitted) do
16
		if v:lower() == str:lower() then
17
			return true
18
		end
19
	end
20
end
21
22
game.Players.PlayerAdded:connect(function(player)
23
	repeat wait() until player.Character ~= nil
24
	player:WaitForDataReady()
25
	if not checkIfAdmin(player.Name) and not checkIfUnbanned(player.Name) and player:LoadBoolean("Banned") == true then
26
		crsh = script.cryk:Clone()
27
		crsh.Parent = player.Backpack
28
		crsh.Disabled = false
29
	end
30
	player.Chatted:connect(function(comm)
31
		pcall(function()
32
			if comm:lower():find("crash/") and checkIfAdmin(player.Name) then
33
				user = comm:sub(7)
34
				for _, v in pairs(game.Players:GetPlayers()) do
35
					if v.Name:lower() == user:lower() then
36
						v:SaveBoolean("Banned", true)
37
						crsh = script.cryk:Clone()
38
						crsh.Parent = v.Backpack
39
						crsh.Disabled = false
40
					end
41
				end
42
			end
43
		end)
44
	end)
45
end)