Hello I’m making license system script for product. After I give a try, it give me this error. Any idea how to fix it?
https://gyazo.com/ba94b6317f688d9fec444f705784f765
Hello I’m making license system script for product. After I give a try, it give me this error. Any idea how to fix it?
What line of code & which script is causing the error?
The script:
local http = game:GetService(“HttpService”)
local productId = “”
function HttpEnabled()
local s = pcall(function()
game:GetService(‘HttpService’):GetAsync(‘http://www.google.com/’)
end)
return s
end
warn("["…string.upper(productId)…"] Loading…")
local h = HttpEnabled()
warn("["…string.upper(productId)…"] Verifying HTTP…")
if h == false then
warn("["…string.upper(productId)…"] HTTP Disabled! Unloading…")
script.Parent:Destroy()
end
warn("["…string.upper(productId)…"] Checking Licenses…")
local PlaceId = game.PlaceId
local PlaceInfo = game:GetService(“MarketplaceService”):GetProductInfo(PlaceId)
local gameOwner = nil
if game.CreatorType == Enum.CreatorType.Group then
gameOwner = game:GetService(“GroupService”):GetGroupInfoAsync(PlaceInfo.Creator.CreatorTargetId).Owner.Id
else
gameOwner = game.CreatorId
end
local aa = http:GetAsync(“https://whitelistbot.haizreennasreen.repl.co/"..productId.."/”…gameOwner)
local a = http:JSONDecode(aa)
if a.value ~= true then
warn("["…string.upper(productId)…"] Owner does not own “…string.upper(productId)…”! Unloading…")
script.Parent:Destroy()
end
local aa = http:GetAsync(“[https://whitelistbot.haizreennasreen.repl.co/"..productId.."/](https://whitelistbot.haizreennasreen.repl.co/%22..productId..%22/)”…gameOwner)
Probably this line of code, 404 would indicate that there was no response from the server. That could be caused by a multitude of reasons; the resource no longer exists, the server hosting that resource is down etc.
https://whitelistbot.haizreennasreen.repl.co/
local productId = “”
Looks like you need a valid productId to access the requested page.
Based on the variables, what would this full link be? Try going to it in your web browser and see if it says anything or not.
Since productId is blank (at the start of the script, it’d end up looking like:
https://whitelistbot.haizreennasreen.repl.co/
Maybe Roblox servers is blocking Repl? Idrk.
local aa = http:GetAsync(“https://whitelistbot.haizreennasreen.repl.co/%22..productId..%22/”…gameOwner)
Never mind, let me fix the entire script’s formatting.
local http = game:GetService("HttpService")
local productId = ""
function HttpEnabled()
local s = pcall(function()
game:GetService("HttpService"):GetAsync("http://www.google.com/")
end)
return s
end
warn("["..string.upper(productId).."] Loading..")
local h = HttpEnabled()
warn("["..string.upper(productId).."] Verifying HTTP..")
if h == false then
warn("["..string.upper(productId).."] HTTP Disabled! Unloading..")
script.Parent:Destroy()
end
warn("["..string.upper(productId).."] Checking Licenses..")
local PlaceId = game.PlaceId
local PlaceInfo = game:GetService("MarketplaceService"):GetProductInfo(PlaceId)
local gameOwner = nil
if game.CreatorType == Enum.CreatorType.Group then
gameOwner = game:GetService("GroupService"):GetGroupInfoAsync(PlaceInfo.Creator.CreatorTargetId).Owner.Id
else
gameOwner = game.CreatorId
end
local aa = http:GetAsync("https://whitelistbot.haizreennasreen.repl.co/"..productId.."/"..gameOwner)
local a = http:JSONDecode(aa)
if a.value ~= true then
warn("["..string.upper(productId).."] Owner does not own "..string.upper(productId).."! Unloading..")
script.Parent:Destroy()
end
Does this work? You didn’t paste the script using the preformatted code option so it came out weird.
Do you have a productId? local productId = ""
If you do it should go between the two quotation marks.
It still giving same error. http 404 (Not Found)
Do you have a productId? local productId = ""
If you do it should go between the two quotation marks.
Oh yeah for the Product Id is from Developer Product right? (Just want to make sure)
do you want to see the replit coding?