I did not make this, this is trello. I would really like some help!

local plr = script.Parent.Parent.Parent.Parent.Parent
local module = require(game.ReplicatedStorage.Information)
local http = game:GetService("HttpService")
local deb = false
local boardid = ""

script.Parent.Parent.BackgroundColor3 = module.PrimaryColor
script.Parent.p1.TextLabel.TextStrokeColor3 = module.PrimaryColor
script.Parent.p2.TextLabel.TextStrokeColor3 = module.PrimaryColor
script.Parent.p3.TextLabel.TextStrokeColor3 = module.PrimaryColor
script.Parent.p3.TextLabel1.TextStrokeColor3 = module.PrimaryColor
script.Parent.p4.TextLabel.TextStrokeColor3 = module.PrimaryColor
script.Parent.p1.ImageLabel.Image = module.Logo
script.Parent.p2.ImageLabel.Image = module.Logo
script.Parent.p3.ImageLabel.Image = module.Logo
script.Parent.p4.ImageLabel.Image = module.Logo
script.Parent.p1.TextLabel.Text = "Good luck on your "..module.GroupName.."\
".." MR Application!"
for i,v in pairs(module.Questions) do
	local q = script.q:Clone()
	q.Parent = script.Parent.p2.ScrollingFrame
	q.Name = "q"..i
	q.TextLabel.Text = "Q"..i.. ": "..v
	q.TextLabel.TextStrokeColor3 = module.PrimaryColor
	q.BorderColor3 = module.PrimaryColor
	q.TextBox.BorderColor3 = module.PrimaryColor
	q.Position = UDim2.new(0,20,0,(100*i)-100)
	local r = script.r:Clone()
	r.Parent = script.Parent.p3.ScrollingFrame
	r.Name = "q"..i
	r.TextLabel.Text = "Q"..i.. ": "..v
	r.TextLabel.TextStrokeColor3 = module.PrimaryColor
	r.BorderColor3 = module.PrimaryColor
	r.TextBox.BorderColor3 = module.PrimaryColor
	r.Position = UDim2.new(0,20,0,(100*i)-100)
end
script.Parent.p2.ScrollingFrame.sub.Position = UDim2.new(.5,-75,0,25+(#module.Questions)*100)
script.Parent.p2.ScrollingFrame.CanvasSize = UDim2.new(0,0,0,(#module.Questions*100)+100)
script.Parent.p3.ScrollingFrame.CanvasSize = UDim2.new(0,0,0,(#module.Questions*100)+10)

script.Parent.p1.create.MouseButton1Down:connect(function()
	if deb == false then
		deb = true
		script.Parent.p1.check.Text = "Checking Group Rank..."
		script.Parent.p1.load.Visible = true
		repeat 
			script.Parent.p1.load.Rotation = script.Parent.p1.load.Rotation+10
			wait()
		until script.Parent.p1.load.Rotation == 1440
		script.Parent.p1.load.Rotation = 0
		if plr:GetRankInGroup(module.Group) >= module.Rank then
			script.Parent.p1.check.Text = "Checking for previous applications..."
			script.Parent.p1.load.Visible = true
			repeat 
				script.Parent.p1.load.Rotation = script.Parent.p1.load.Rotation+10
				wait()
			until script.Parent.p1.load.Rotation == 1440
			script.Parent.p1.load.Rotation = 0
			
			local get = http:GetAsync('https://api.trello.com/1/boards/'..module.Trello..'/lists?key='..module.Key..'&token='..module.Token,true)
			local tab=http:JSONDecode(get)
		
			for _,v in pairs(tab) do
				if v.name:match('^Applications%s?$') then
					boardid = v.id
					local musget = http:GetAsync('https://api.trello.com/1/lists/'..v.id..'/cards?key='..module.Key..'&token='..module.Token,true)
					local mustab = http:JSONDecode(musget)
					for _,m in pairs(mustab) do
						if m.name:match(plr.userId) then
							script.Parent.p1.check.Text = "Error: User has already applied."
							return
						end
					end	
				end
			end
			
			script.Parent.p1.Visible = false
			script.Parent.p1.load.Visible = false
			script.Parent.p1.check.Text = ""
			script.Parent.p2.Visible = true
			script.Parent.home.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
			script.Parent.write.Style = Enum.ButtonStyle.RobloxRoundDefaultButton
		else
			script.Parent.p1.check.Text = "Error: Group rank is not high enough."
		end
		deb = false
	end
end)

script.Parent.p2.ScrollingFrame.sub.MouseButton1Down:connect(function()
	for i=1,#module.Questions do
		script.Parent.p3.ScrollingFrame["q"..i].TextBox.Text = script.Parent.p2.ScrollingFrame["q"..i].TextBox.Text
	end
	script.Parent.p2.Visible = false
	script.Parent.p3.Visible = true
	script.Parent.write.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
	script.Parent.review.Style = Enum.ButtonStyle.RobloxRoundDefaultButton
end)

script.Parent.p3.ret.MouseButton1Down:connect(function()
	script.Parent.p3.Visible = false
	script.Parent.p2.Visible = true
	script.Parent.review.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
	script.Parent.write.Style = Enum.ButtonStyle.RobloxRoundDefaultButton
end)

script.Parent.p3.sub.MouseButton1Down:connect(function()
	local data = ""
	for i=1, #module.Questions do
		data = data .. "\
".. script.Parent.p3.ScrollingFrame["q"..i].TextLabel.Text .. ": ".. script.Parent.p3.ScrollingFrame["q"..i].TextBox.Text
	end
	print(boardid)

	local musget = http:PostAsync('https://api.trello.com/1/cards/?key='..(module.Key)..'&token='..(module.Token), http:JSONEncode({["name"]=(plr.Name .. " | ".. plr.userId), ["desc"] = data,["due"]=nil,["idList"]=boardid,["urlSource"]=nil}))
	script.Parent.p4.Visible = true
	script.Parent.p3.Visible = false
	
	script.Parent.p4.check.Text = "Checking Application Data..."
	repeat 
		script.Parent.p4.load.Rotation = script.Parent.p4.load.Rotation+10
		wait()
	until script.Parent.p4.load.Rotation == 1440
	script.Parent.p4.load.Rotation = 0
	script.Parent.p4.check.Text = "Finishing Encoding..."
	repeat 
		script.Parent.p4.load.Rotation = script.Parent.p4.load.Rotation+10
		wait()
	until script.Parent.p4.load.Rotation == 1440
	script.Parent.p4.load.Rotation = 0
	script.Parent.p4.check.Text = "Sending to Server..."
	repeat 
		script.Parent.p4.load.Rotation = script.Parent.p4.load.Rotation+10
		wait()
	until script.Parent.p4.load.Rotation == 1440
	script.Parent.p4.load.Rotation = 0
	script.Parent.p4.check.Text = "Sent!"
	wait (5)
	script.Parent.Parent:Destroy()
end)

2 comments

0

Yes http is on

0

If you didn't make it, it's not our problem.