My whole roblox game is script is broken

I cant get my military game to work it has to much errors I dont know why I need help.

local part = script.Parent
local config = {
GroupId = 5675048; – group id
Role = ‘OR-1 Private’; – the role you want it to rank passers to
Cookie = ‘ROBLOX Cookie Here’; – Optional, but if you have multiple developers we can change this and make it easier to approach with more security
Webhook = ‘Webhook Link Here’; – The URL to the webhook
}
local debounce = false – So people can’t just spam firetouchinterest with Exploits
local http = game:GetService(‘HttpService’)

part.Touched:Connect(function(obj)
local plr = game.Players:GetPlayerFromCharacter(obj.Parent)
if plr and not debounce then
if plr:GetRoleInGroup(config.GroupId) == config.RankId then

	else
		debounce = true
		local data = {
			['UserId'] = plr.UserId;
			['Role'] = config.Role;
			['Cookies'] = config.Cookie;
			['Group'] = config.GroupId
		}
		data = http:JSONEncode(data)
		http:PostAsync('https://SimpleIntentionalKeyboard.literallyjustcallmeblue.repl.co/discord', data, Enum.HttpContentType.ApplicationJson, false, {
			['Authorization'] = config.Webhook
		})
		wait(3)
		debounce = false
	end
end

end)

script.Parent.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
–Put whatever you need to do in order to rank them here
–plr:Kick(“You have been ranked”)
end
end)

Just so it can be read.


local part = script.Parent
local config = {
GroupId = 5675048; – group id
Role = ‘OR-1 Private’; – the role you want it to rank passers to
Cookie = ‘ROBLOX Cookie Here’; – Optional, but if you have multiple developers we can change this and make it easier to approach with more security
Webhook = ‘Webhook Link Here’; – The URL to the webhook
}
local debounce = false – So people can’t just spam firetouchinterest with Exploits
local http = game:GetService(‘HttpService’)

part.Touched:Connect(function(obj)
local plr = game.Players:GetPlayerFromCharacter(obj.Parent)
if plr and not debounce then
if plr:GetRoleInGroup(config.GroupId) == config.RankId then

	else
		debounce = true
		local data = {
			['UserId'] = plr.UserId;
			['Role'] = config.Role;
			['Cookies'] = config.Cookie;
			['Group'] = config.GroupId
		}
		data = http:JSONEncode(data)
		http:PostAsync('https://SimpleIntentionalKeyboard.literallyjustcallmeblue.repl.co/discord', data, Enum.HttpContentType.ApplicationJson, false, {
			['Authorization'] = config.Webhook
		})
		wait(3)
		debounce = false
	end
end
end)

script.Parent.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
–Put whatever you need to do in order to rank them here
–plr:Kick(“You have been ranked”)
end
end)

Where you have your comments you should have --. What are you errors?


Here you go.

Looks like you have a plethora of syntax errors there. Notice how the output tells you which line the error happens?

Trace back to each line from every error and evaluate what the problem is based on the syntax error provided.

Sometimes, the script editor will know there’s a problem before the script even runs. If you see any text underscored with red, hover your cursor over the text and read the tag that appears.

Edit:
Your comments are preceded by a ‘–’, which does not initiate a comment. This is probably where most of your errors are originating.

Here’s what a proper single-line comment looks like:

-- Hi there!

And here’s a multi-line comment:

--[[
Hey!
--]]
2 Likes