Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I finish off this kick command in my new admin script?

Asked by 4 years ago

Good evening,

I am currently creating an admin system, and I would like some guidance on where to go from if msg:lower() == Prefix.."kick ". Specifically, I would like to know how to make the kick command work on other players.

    if p.AdminLevel.AdminValue.Value == "Moderator" or p.Admin.AdminValue.Value == "Administrator" or p.Admin.AdminValue.Value == "Super Administrator" or p.Admin.AdminValue.Value == "Owner" or p.Admin.AdminValue.Value == "Game Creator" then
        p.Chatted:Connect(function(msg)
            if msg:lower() == Prefix.."kick "
        end)
    end
end)

0
So you can't kick other players, just yourself right? JailBreaker_13 350 — 4y
0
I know how to make it kick myself, but what I need help with is to make the command be able to kick other players (e.g. :kick (playername)) ChasingNachos 133 — 4y
0
Okay. I will try to figure it out, give me a minute. JailBreaker_13 350 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

Finally, I found it! This website here should help you do it.

It says "onOwnerChatted" as a function, but you just have to change that to all players and add "if" so only Mods, Admins, Super Admins, Owner, and Game Creator can kick.

Something like:

if message:sub(1, kickCommand:len()):lower() == kickCommand:lower() and p.AdminLevel.AdminValue.Value == "Moderator" or....

If you want more help let me know, but it seems like you are a pretty good scripter and know what your doing.

0
Much appreciated! ChasingNachos 133 — 4y
0
Np! JailBreaker_13 350 — 4y
Ad

Answer this question