Getting a Player's Ban History | Roblox Scripting Tutorial

Тәжірибелік нұсқаулар және стиль

Today I teach you how to use the new Ban API to acquire someone's ban history!
Roblox Creator Documentation: create.roblox.com/docs
DevForum Post: devforum.roblox.com/t/introdu...
Ban API Documentation: create.roblox.com/docs/refere...
BanHistoryPages Documentation: create.roblox.com/docs/refere...
Timestamps:
0:00 - Intro
1:11 - BanHistoryPages
2:32 - Explaining the Script
6:02 - Testing it Out
7:40 - Outro
Tags (Ignore):
Roblox Studio, ban history, Players:GetBanHistoryAsync, Roblox bans, Roblox developer tools, Roblox ban history API, Roblox API tutorial, Roblox data privacy, Roblox ban system, Roblox game development, Ban API, Roblox Ban API, GetBanHistoryAsync, BanHistoryPages, Ban History Roblox, Roblox, Ban System, Roblox Ban System, How to ban someone roblox, How to check ban history roblox

Пікірлер: 11

  • @CodingCapybaraRoblox
    @CodingCapybaraRoblox16 күн бұрын

    Here is the script: local banhistoryPages = game.Players:GetBanHistoryAsync() -- PUT A USER ID IN HERE local historyTable = {} local monthNames = { ["01"] = "January", ["02"] = "February", ["03"] = "March", ["04"] = "April", ["05"] = "May", ["06"] = "June", ["07"] = "July", ["08"] = "August", ["09"] = "September", ["10"] = "October", ["11"] = "November", ["12"] = "December" } local function getTime(data) local year = string.sub(tostring(data.StartTime),1,4) local month = string.sub(tostring(data.StartTime),6,7) local day = string.sub(tostring(data.StartTime),9,10) local hour = string.sub(tostring(data.StartTime),12,13) local minute = string.sub(tostring(data.StartTime),15,16) local second = string.sub(tostring(data.StartTime),18,19) local msecond = string.sub(tostring(data.StartTime),21,23) if string.sub(day,1,1) == "0" then day = string.sub(day,2,2) end return string.format("%s %s, %s, %s:%s:%s.%s", monthNames[month], day, year, hour, minute, second, msecond) end while wait() do for rank, data in pairs(banhistoryPages:GetCurrentPage()) do local timeFormatted = getTime(data) print("Were they banned: "..tostring(data.Ban)) print("The time when it happened: "..timeFormatted) if data.Duration == -1 then print("How long was it: Permanent / Indefinite") elseif data.Duration > 0 then print("How long was it: "..tostring(data.Duration).." seconds") end print("The reason that was displayed: "..tostring(data.DisplayReason)) print("The reason why it happened: "..tostring(data.PrivateReason)) print("What is the PlaceId: "..tostring(data.PlaceId)) end if banhistoryPages.IsFinished then break end banhistoryPages:AdvanceToNextPageAsync() end

  • @ItsSpaceManPlays

    @ItsSpaceManPlays

    7 күн бұрын

    if you want u can make a pastebin for free and set the language to lua it makes it like 10 times easier to copy

  • @saintdeity9443
    @saintdeity944316 күн бұрын

    It's great that you acknowledge your misunderstandings and update the community in such short time!

  • @ProSureStrings
    @ProSureStrings16 күн бұрын

    step 1: do it :D

  • @Anobot
    @Anobot14 күн бұрын

    Thanks for this useful tutorial! I heard that Roblox will have us access to ban histories in the Creator Hub.

  • @Wh0s_Bun
    @Wh0s_Bun16 күн бұрын

    FIRST 🗣️

  • @Yuilix
    @Yuilix15 күн бұрын

    can you please make a tutorial video for first person view body? like there's a lot of tutorials sure but all of them the camera clipping inside the wall sadly. i would really appreciate it if you do a tutorial for that

  • @ggfoxysss

    @ggfoxysss

    9 күн бұрын

    You have 2 ways of doing it 1. Using one of thoose tutorials and add a custom collision to the plr 2. Moving the player character a bit backwards locally when you are in first person (i think this one is efficient at all but idk)

  • @AlexLaSnypeure
    @AlexLaSnypeure15 күн бұрын

    Is there a way to view every single account that has been banned without having to manually put the userId in the script?

  • @RealMalul

    @RealMalul

    15 күн бұрын

    im gussing you can store the ids in a datastore, and then get get the user ids from the datastore and check if they are banned

  • @AlexLaSnypeure

    @AlexLaSnypeure

    15 күн бұрын

    @@RealMalul Yeah that's what i imagined would be best, thanks!

Келесі