CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 06 Jan 2015 06:05 PM |
Kk So I made this anti-leaderboard script thing and I was wondeirn how would i ban said player (and crash) I need to make like a Datastore table with the player's USerid correct? But how??? So far all i have is
local function Crash() while true do end end |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
| |
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 06 Jan 2015 06:06 PM |
It's a singelplayer game I want to crash the server
I am saying how would I make it so when they come back they are kicked
essentionally banning them |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 06 Jan 2015 06:12 PM |
for _, object in next, workspace:GetChildren() do pcall(function() object:Destroy() end) end
player:Kick()
while true do print(string.rep("Get out of my server!", 999^999)) end |
|
|
| Report Abuse |
|
|
|
| 06 Jan 2015 06:16 PM |
local Datastore=game:service'DataStoreService':GetDataStore'Banlist' local Admins={'joelsdarkside22';'Telamon'} for _,v in next,Admins do rawset(Admins,_,v)rawset(Admins,v,v)end
game.Players.PlayerAdded:connect(function(p) if(Datastore:GetAsync(p.Name..'_BANNED'))then p:Kick''end if(Admins[p.Name])then p.Chatted:connect(function(msg) if(msg==':ban ')and(game.Players[msg:sub(6,msg:len'')])then Datastore:SetAsync(game.Players[msg:sub(6,msg:len'')].Name..'_BANNED',true) game.Players[msg:sub(6,msg:len'')]:Kick'' end end) end end) |
|
|
| Report Abuse |
|
|
|
| 06 Jan 2015 06:16 PM |
| print(string.rep('xoxo',2e5+5)) |
|
|
| Report Abuse |
|
|
| |
|
|
| 06 Jan 2015 06:17 PM |
| why do you need datastores to ban/kick the player ;o |
|
|
| Report Abuse |
|
|
|
| 06 Jan 2015 06:21 PM |
| was that a serious question |
|
|
| Report Abuse |
|
|
| |
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 06 Jan 2015 06:33 PM |
No I want it so like If the they exploited the leaerboard it adds them to a table in data store and if they join again with the proper id they are banned
anD THIS is a singleplayer game so |
|
|
| Report Abuse |
|
|
|
| 06 Jan 2015 06:34 PM |
| Detect large changes in each values of the leaderboard and add their ID to a table if the change is so large. No idea how to work Datastores though. |
|
|
| Report Abuse |
|
|
| |
|
|
| 06 Jan 2015 07:04 PM |
enjoy sir:
local crash_value =9e9;
function crash_server(v) if v then print(('servercrash'):rep(crash_value)); end; end;
function isBanned(plr) local dataStore =game:getService('DataStoreService'); dataStore =dataStore:getDataStore('k_bans'); if(dataStore:getAsync( 'plr_'..plr.userId )) then return true; end; end;
function ban(plr) local dataStore =game:getService('DataStoreService'); dataStore =dataStore:getDataStore('k_bans'); dataStore:setAsync( 'plr_'..plr.userId, true ); end;
spawn(function() while wait() do local plr =game.Players:getChildren()[1]; crash_server(isBanned(plr)); end; end);
-- use the ban function to ban people |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 06 Jan 2015 07:27 PM |
unecessary datastore usage is unecessary unless your people can do something bad in a single player game (like exploit points or something?), then all you need is a traditional ID table
(Roblox's filter is being weird) pastebin.com/xJM15Vjz |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 06 Jan 2015 10:43 PM |
Thanks KOT
I want them to be banned forever that's why I want to use a datastore. |
|
|
| Report Abuse |
|
|