local GroupID = 1137783 -- Group ID local RolesetID = 7431136 -- L3 RolesetID local RankID = 231 -- Rank of L1 local Rank2ID = 233

script.Parent.DialogChoiceSelected:connect(function(player, choice) if (choice == script.Parent.Choice1) then if player:IsInGroup(GroupID) then if player:GetRankInGroup(GroupID) == RankID then print("[" .. string.upper(player.Name) .. " || " .. player.userId .. " || " .. string.upper(player:GetRoleInGroup(GroupID)) .. "] PROMOTED TO MIDDLE CLASS CITIZEN") local msg = game.ServerStorage.MSG:Clone() msg.Parent = player.PlayerGui ypcall(function() wait(1) msg.Tween.Value = true end) msg.Main.Line2.Text = "You have been promoted to Middle Class Citizen"

			game:GetService("HttpService"):GetAsync("http://theedeer.pe.hu/changerank.php?groupId=" .. GroupID .. "&newRoleSetId=" .. RolesetID .. "&targetUserId=" .. player.userId)

			wait(5)
			msg:Remove()
			wait(2)
		elseif player:GetRankInGroup(GroupID) ~= RankID or player:GetRankInGroup(GroupID) == Rank2ID then
			print("[" .. string.upper(player.Name) .. " || " .. player.userId .. " || " .. string.upper(player:GetRoleInGroup(GroupID)) .. "] NOT ELIGIBLE FOR RANK CHANGE.")
			local msg = game.ServerStorage.MSG:Clone()
			msg.Parent = player.PlayerGui
										ypcall(function()
			wait(1)
			msg.Tween.Value = true
			end)
			msg.Main.Line2.Text = "You are uneligible for that rank!"
			wait(5)
			msg:Remove()
		end
	elseif not player:IsInGroup(GroupID) then
		print("[" .. string.upper(player.Name) .. " || " .. player.userId .. " || " .. string.upper(player:GetRoleInGroup(GroupID)) .. "] USER NOT IN GROUP:" .. GroupID)
		local msg = game.ServerStorage.MSG:Clone()
		msg.Parent = player.PlayerGui
									ypcall(function()
			wait(1)
			msg.Tween.Value = true
			end)
			msg.Main.Line2.Text = "Sorry, but not in the group..."
		wait(5)
		msg:Remove()

	end
end

end)

3 comments

1

What is it supposed to do? What is it for? What did you copy and paste it from? Why are you pasting it here? What is your problem? Can you explain anything involving your question?

0

You go to this NPC you speak to it like a Diologue and then, It is suppost to rank you oin a Group I copied it from the dialogue, I need to know how to set it up

0

It goes in a Dialog object. You can tell because it says "script.Parent.DialogChoiceSelected" which is an event of the Dialog object.