Hi lol, I’m here to update this topic again just for fun. So I made a little change to the main module script because I… added an option to open or close the app.
local module = {}
module.App = {
["AppTitle"] = "Application1";
["ListId"] = "Application1",
["Open"] = false,
["Questions"] = {
[1] = {
["Question"] = "Who are you?",
["LeaveBlank"] = false
};
[2] = {
["Question"] = "Who are you? again",
["LeaveBlank"] = false
};
[3] = {
["Question"] = "lol",
["LeaveBlank"] = true
}
};
["Submitted"] = "You've submitted your application, please wait for us to read your applications"
}
return module
When the open value is set to false it will not allow the app to be used or clicked on.
https://gyazo.com/b000fd281d4642dc5e79b541ee1959b2
One of the other things I did was to make a datastore for your AppID. Yep… there’s an AppID now. So when a player creates a new application it will send it to a discord server, yes, I did remake the sender part. The AppID is basically a Pastebin code. I used a bot to trigger the better-pastebin api which uses node.js, Sadly, It did not work. The AppID can also be used to accept or to not accept the application. Now how will the player know once they get accepted? Well, if they are in the discord server and verified they will be pinged with there username. The other option is for them to join the application center two or one days later to check the status… Wait a min… I didn’t get to that part. Ah yes, I added a status checker that reads the pastetID
The test is the title of the app center.
Overall I changed mostly everything in this app center and redid the scripting in it.
Heres the changes to the scripts:
MainModule:
local module = {}
module.Config = {
["AppName"] = game.Lighting.AppName.Value;
["Emblem"] = game.Lighting.Logo.Value;
-- Format: script.App Example: script.App1, script.App2, script.App3(No comma if
--thats the last app.)
["App"] = {
script.App,
script.App2,
script.App3
}
}
return module
App:
local module = {}
module.App = {
["AppTitle"] = "Application1";
["ListId"] = "Application1",
["Open"] = false,
["Questions"] = {
[1] = {
["Question"] = "Who are you?",
["LeaveBlank"] = false
};
[2] = {
["Question"] = "Who are you? again",
["LeaveBlank"] = false
};
[3] = {
["Question"] = "lol",
["LeaveBlank"] = true
}
};
["Submitted"] = "You've submitted your application, please wait for us to read your applications"
}
return module
AppApi(Or the sender)
local ReplicatedStorageService = game:GetService("ReplicatedStorage")
----------------------------------CHANGE WEBHOOK TO YOUR WEBHOOK ON DISCORD------------------------------------------------------------------------------|
---------------------------------------------------------------------------------------------------------------------------------------------------------|
local WebHook = "No no no :)"
local GroupId = 5455842 -- Leave it at 0 if this app center is not in a group or for a group
---------------------------------------------------------------------------------------------------------------------------------------------------------|
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------DO NOT TOUCH BEBLOW-------------------------------------------------------------------------------------------------
local HttpService = game:GetService("HttpService")
local Chat = game:GetService("Chat")
local URL_PASTEBIN_NEW_PASTE = "https://pastebin.com/api/api_post.php"
local function Beautify(Table, User)
local String = ""
for i,v in pairs(Table.Questions) do
String = String .. "\n" .. v .. "\n Answer: " .. Chat:FilterStringAsync(Table.Responses[i], User, User)
end
print(String)
return String
end
ReplicatedStorageService:WaitForChild("AppSubmit").OnServerEvent:Connect(function(Player, AppData, ArgListID)
local dataFields = {
-- Pastebin API developer key from
-- https://pastebin.com/api#1
["api_dev_key"] = "deleted";
["api_option"] = "paste"; -- keep as "paste"
["api_paste_name"] = Player.Name.."'s Application Status"; -- paste name
["api_paste_code"] = "Pending"; -- paste content
["api_paste_format"] = "text"; -- paste format
["api_paste_expire_date"] = "N"; -- expire date
["api_paste_private"] = "0"; -- 0=public, 1=unlisted, 2=private
["api_user_key"] = "removed"; -- user key, if blank post as guest
}
-- The pastebin API uses a URL encoded string for post data
-- Other APIs might use JSON, XML or some other format
local data = ""
for k, v in pairs(dataFields) do
data = data .. ("&%s=%s"):format(
HttpService:UrlEncode(k),
HttpService:UrlEncode(v)
)
data = data:sub(2) -- Remove the first &
end
local response = HttpService:PostAsync(URL_PASTEBIN_NEW_PASTE, data, Enum.HttpContentType.ApplicationUrlEncoded, false)
print(data)
response = response:sub(22)
local data =
{
["content"] = "",
["embeds"] = {{
["title"] = "App ID: "..response.." Username: "..Player.Name,
["description"] = ("Rank in group: " .. Player:GetRoleInGroup(GroupId) .. " \n Profile link: https://www.roblox.com/users/" .. tostring(Player.UserId) .. "/profile/ \n Application: \n" .. Beautify(AppData, Player)),
["type"] = "rich",
["color"] = tonumber(0xffffff),["fields"] = {
{
["name"] = "CenterBlox",
["value"] = "If you cannot accept applications, Please let your group HR do it. Paste App ID into the main app site to approve or not approve. If you can accept say !link to get the link!",
["inline"] = true
},
}
}}
}
Player.leaderstats.YourAppCode.Value = response
HttpService:PostAsync(WebHook, HttpService:JSONEncode(data))
ReplicatedStorageService:WaitForChild("AppSubmit"):FireClient(Player, "Success")
end)
SOME ADDED SCRIPTS?!?!?!
Datastore:
game.Players.PlayerRemoving:connect(function(player)
local datastore = game:GetService("DataStoreService"):GetDataStore(player.Name.."Stats")
local statstorage = player:FindFirstChild("leaderstats"):GetChildren()
for i = 1, #statstorage do
datastore:SetAsync(statstorage[i].Name, statstorage[i].Value)
print("saved data number "..i)
end
print("Stats successfully saved")
end)
game.Players.PlayerAdded:connect(function(player)
local datastore = game:GetService("DataStoreService"):GetDataStore(player.Name.."Stats")
player:WaitForChild("leaderstats")
wait(1)
local Players = game:GetService("Players")
local HttpService = game:GetService("HttpService")
local stats = player:FindFirstChild("leaderstats"):GetChildren()
for i = 1, #stats do
stats[i].Value = datastore:GetAsync(stats[i].Name)
local paste = HttpService:GetAsync("http://pastebin.com/raw/="..player.leaderstats.YourAppCode.Value)
wait(2)
print("stat numba "..i.." has been found")
print(paste)
player.PlayerGui.Core.Elements.Background.Container.Home.Emblem.Semi2.Text = "Here to check on your application status? Your application status is: "..paste
if
player.PlayerGui.Core.Elements.Background.Container.Home.Emblem.Semi2.Text == "Here to check on your application status? Your application status is: Passed"
then
player.leaderstats.YourAppCode.Value = ""
end
while true do
wait(3)
if
player.leaderstats.YourAppCode.Value == ""
then
player.PlayerGui.Core.Elements.Background.Container.Home.Emblem.Semi2.Text = "You do not have any pending applications! Create one or see if you passed a application!"
print("I don't see any apps")
end
end
end
end)
leaderstats:
function onPlayerEntered(newPlayer)
wait(.5)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local score = Instance.new("StringValue")
score.Name = "YourAppCode"
score.Value = ""
score.Parent = stats
stats.Parent = newPlayer
end
game.Players.ChildAdded:connect(onPlayerEntered)
I hope you like it and I’ll make sure to keep on updating!