Console:
Script:
local admins = {
"vq9o"
}
local key = "awfebgvwtqwq"
local website = "https://api.rampagestudios.org/lux/"
local service = game:GetService("HttpService")
local admin = function(player)
for i,v in pairs(admins) do
if player.Name == v or player.UserId == v then
return true
end
end
end
-- Scripting PHP in my other tab...a
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if message == "/ban" or message == "/unban" then
if admin(player) == true then
player.PlayerGui.InsertedObjects.Admin.Visible = not player.PlayerGui.InsertedObjects.Admin.Visible
else
player:Kick("Nice Try!")
end
end
end)
end)
game.ReplicatedStorage.Banish.OnServerEvent:Connect(function(player, userid, reason, action)
if action == "check" then
local data2 = {
["target"] = userid,
["reason"] = reason,
["action"] = action,
["authorization"] = key,
["admin"] = player.UserId
}
local data service:JSONEncode(data2)
local status = service:PostAsync("https://api.rampagestudios.org/lux/", data, Enum.HttpContentType.ApplicationJson, false)
local feedback = service:JSONDecode(status)
if feedback.status == 400 then
player:Kick("LUX Nightclub \n You have been banned by " + feedback.admin + " for " + feedback.reason + ". You have been banned indefiently.")
end
end
if action == "ban" or action == "unban" then
if admin(player) == true then
local data2 = {
["target"] = userid,
["reason"] = reason,
["action"] = action,
["authorization"] = key,
["admin"] = player.UserId
}
local data service:JSONEncode(data2)
local status = service:PostAsync("https://api.rampagestudios.org/lux/", data, Enum.HttpContentType.ApplicationJson, false)
local feedback = service:JSONDecode(status)
if feedback.status == 200 then
if action == "ban" then
player.PlayerGui.InsertedObjeccts.Admin.Status.Text = "jquery status: Player banned"
game.Players:GetPlayerByUserId(userid):Kick("LUX Nightclub \n You have been banned by " + player.Name + " for " + reason + ". You have been banned indefiently.")
end
if action == "unban" then
player.PlayerGui.InsertedObjeccts.Admin.Status.Text = "jquery status: Player unbanned"
end
end
if feedback.status == 100 then
if action == "ban" then
player.PlayerGui.InsertedObjeccts.Admin.Status.Text = "jquery status: Player already banned"
end
if action == "unban" then
player.PlayerGui.InsertedObjeccts.Admin.Status.Text = "jquery status: Player doesnt exist in LUX Systems"
end
end
if feedback.status == 400 then
player:Kick("LUX Nightclub \n You have been banned by " + feedback.admin + " for " + feedback.reason + ". You have been banned indefiently.")
end
if feedback.status == 300 then
local data2 = {
target = player.UserId,
reason = "Exploiting",
action = "ban",
authorization = key,
admin = 1
}
local data service:JSONEncode(data2)
service(website, data, Enum.HttpContentType.ApplicationJson)
end
end
else
local data2 = {
target = player.UserId,
reason = "Exploiting",
action = "ban",
authorization = key,
admin = 1
}
local data service:JSONEncode(data2)
service(website, data, Enum.HttpContentType.ApplicationJson)
end
end)
GUI:
script.Parent.Ban.MouseButton1Click:Connect(function()
script.Parent.Action.Text = "Action: Ban"
end)
script.Parent.Unban.MouseButton1Click:Connect(function()
script.Parent.Action.Text = "Action: Unban"
end)
script.Parent.Rap.MouseButton1Click:Connect(function()
script.Parent.Action.Text = "Action: Requesting Ban History"
end)
script.Parent.Confirm.MouseButton1Click:Connect(function()
if script.Parent.Action.Text == "Action: Ban" then
game.ReplicatedStorage.Banish:FireServer(game.Players:GetUserIdFromNameAsync(script.Parent.Target.Text), script.Parent.Reason.Text, "ban")
end
if script.Parent.Action.Text == "Action: Unban" then
game.ReplicatedStorage.Banish:FireServer(game.Players:GetUserIdFromNameAsync(script.Parent.Target.Text), script.Parent.Reason.Text, "unban")
end
if script.Parent.Action.Text == "Action: Requesting Ban History" then
script.Parent.Action.Text = "Error. sorry, u can request ban historys yet."
end
end)