Need help using Glitch to make a role bot

My group is talls and smols - Roblox
Glitch Glitch :・゚✧
What i used before How to Create a Rank Management System using Glitch - #6 by fireboltofdeath

  1. What do you want to achieve? I want a working bot that allows me to click a button either GUI or a part and for it to change my role to either Talls or Smols but I have many variations of Talls and Smols example donut, worker and clothing designer .I want it to be able to detect what role you are in example your in clothing designer then switch you to the Talls or Smols version of clothing designer.

  2. What is the issue? I don’t know how to script in Roblox studio so that it checks which player has clicked the button and what role it has already and how it changes the role.

  3. What solutions have you tried so far? i checked what i used before but i still cant understand it.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

MAIN

local HttpService = game:GetService("HttpService")
local Server = require(script.Server)

SERVER

local Server = {}

local HttpService = game:GetService("HttpService")

local Configs = require(script.Parent.Configs)

local function Request(Function, RequestBody)

	--Before sending the request, add our auth_key to the body
	RequestBody["auth_key"] = Configs.AUTH_KEY

	local response = HttpService:RequestAsync(
		{
			-- The website to send the request to. Function is the extended part of the URL for specific functions.
			-- In this case, Function = 'GroupShout'
			-- Example: 
			--	"Configs.BaseUrl..Function" would be equal to: http://test-app.glitch.me/GroupShout

			Url = Configs.BaseUrl..Function, 

			-- The request method (all of ours will be POST)
			Method = "POST",

			-- We are sending JSON data in the body
			Headers = {
				["Content-Type"] = "application/json"
			},
			-- The body of the request containing the parameters for the request
			Body = HttpService:JSONEncode(RequestBody)
		}
	)

	if response.Success then
		print("Status code:", response.StatusCode, response.Body)
		print("Response body:\n", response.Body)

		return response.Body
	else
		print("The request failed:", response.StatusCode, response.Body)
		return response.Body
	end
end

Server.Promote = function(GroupId, UserId)
	assert(typeof(GroupId) == "number", "Error: GroupId must be an integer") -- Throw error if GroupId is not an integer
	assert(typeof(UserId) == "number", "Error: UserId must be an integer") -- Throw error if UserId is not an integer

	local Body = {
		Group = GroupId;
		Target = UserId;
	}

	-- pcall the function 'Request', with arguments 'Promote' and Body
	local Success, Result = pcall(function()
		return Request('Promote', Body)
	end)

	print(Result)
end

Server.Demote = function(GroupId, UserId)
	assert(typeof(GroupId) == "number", "Error: GroupId must be an integer") -- Throw error if GroupId is not an integer
	assert(typeof(UserId) == "number", "Error: UserId must be an integer") -- Throw error if UserId is not an integer

	local Body = {
		Group = GroupId;
		Target = UserId;
	}

	local Success, Result = pcall(function()
		return Request('Demote', Body)
	end)

	print(Result)
end

Server.SetRank = function(GroupId, UserId, RankId)
	assert(typeof(GroupId) == "number", "Error: GroupId must be an integer") -- Throw error if GroupId is not an integer
	assert(typeof(UserId) == "number", "Error: UserId must be an integer") -- Throw error if UserId is not an integer
	assert(typeof(RankId) == "number", "Error: RankId must be an integer") -- Throw error if RankId is not an integer

	local Body = {
		Group = GroupId;
		Target = UserId;
		Rank = RankId;
	}

	local Success, Result = pcall(function()
		return Request('SetRank', Body)
	end)

	print(Result)
end

Server.HandleJoinRequest = function(GroupId, PlayerUsername, Boolean)
	assert(typeof(GroupId) == "number", "Error: GroupId must be an integer") -- Throw error if GroupId is not an integer
	assert(typeof(PlayerUsername) == "string", "Error: PlayerUsername must be a string") -- Throw error if PlayerUsername is not a string
	assert(typeof(Boolean) == "boolean", "Error: Boolean must be a boolean value") -- Throw error if Boolean is not a boolean value

	local Body = {
		Group = GroupId;
		Username = PlayerUsername;
		Accept = Boolean; -- true or false
	}

	local Success, Result = pcall(function()
		return Request('HandleJoinRequest', Body)
	end)

	print(Result)
end

Server.GroupShout = function(GroupId, ShoutMessage)
	assert(typeof(GroupId) == "number", "Error: GroupId must be an integer") -- Throw error if GroupId is not an integer
	assert(typeof(ShoutMessage) == "string", "Error: ShoutMessage must be a string") -- Throw error if ShoutMessage is not a string

	local Body = {
		Group = GroupId;
		Message = ShoutMessage;
	}

	local Success, Result = pcall(function()
		return Request('GroupShout', Body)
	end)

	print(Result)
end

return Server

I also have config but that’s got sensitive info on it.
LAYOUT

Main
Configs

Configs script as a module script

Server

Server script as a module script.

please help in anyway you can

1 Like

Before you decide on using glitch, I have something to warn you about. For one, its not up all the time and secondly its very unreliable for free users. I tried and I couldn’t even get the Roblox API into it.

It looks like your making an application, I would recommend this service if so:
https://rocketapps.bloxtech.tech/

1 Like

Thank you @NotAid_n how do I use it?

1 Like

It’s very similar to another one (MyCenter). There aren’t any tutorials on it right now, but I can say that if you follow a MyCenter tutorial then you will find it is very similar. It is better than MyCenter sense it has more customization and config options. They are both by the same person, he left myCenter to make a better one.

Can I use this so they can answer in game?

1 Like

yes, it works perfectly, you can even tp them to your main game when they pass or fail then just click a button to grade it.

How would I do it so that they click a button gui or part which is labled Talls in game then it changes the role of that person to talls?

1 Like

But on my group it has different versions of the roles how would I do it so that from the same answer depending on which role you have already, it changes. e.g. if you are a tall worker and you want to be a smol worker then you click the button and it makes you a smol worker but if another person clicked the button and they were a tall donut they would be change to smol donut? @NotAid_n

I created four questioners and made it so that only the role which its already in can use it e.g. only donut can change to Smol donut or Smol donut not worker. But how do I get it so that they complete this in game? or cant I do this?

1 Like

i think i figured it out ill test it and say if it works.

Basically, there is a place with a module you download then just save it and it will show ingame. sorry for not clarifying.

You can create a bot that automatically ranks people. Look around a bit there are some hidden features. Even @ForeverHD uses RocketApps so you could probably figure it out

thanks i worked it out its a lot easier than glitch

1 Like

Yeah, glitch is very limited to cpu and you need premium. Or just use rocketapps sense its better!

Do you know how I would make my bot to chat on the group wall like every hour?