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

Perm ban someone ingame?

Asked by
DevNetx 250 Moderation Voter
9 years ago

How do I create a command that uses HTTPService or something to ban someone from my game, even when the server restarts?

1 answer

Log in to vote
0
Answered by 9 years ago

Well, the best way to do this is use DataStores, if using it In-Game, but if you want to do something where you go into roblox studio and manually edit it, thena server script. i think you could do a local script to, i will list that as well. ServerScript:

function playeradded(player)
while true do --this is to constantly kill if the person is a hacker
if player.Name == {"namehere", "namehere"} then
player.Character:Destroy()
wait(1)
end
end
end

local script:

local player = script.Parent.Parent
function killplayer()
if player.Name == {"namehere", "namehere"} then
player.Character:Destroy()
end
end

now, it gets complicated. Assuming you would be using the chat service, this is where we get into stringvalues in scripts and datastores, and the onchatted function. But that, is very complex, and whn i write a program in my test place, i'll move it over to another place so you can use it.

0
Thanks alot! DevNetx 250 — 9y
0
Did they work? rollercoaster57 65 — 9y
Ad

Answer this question