Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while wait(1) do
- coroutine.resume(coroutine.create(function()
- local WebhookUrl = "https://ptb.discord.com/api/webhooks/803485387020435466/kA-lcEK78LK8eXsDg8H_4n7folUm3IF6bXmqa_emIwrp-su9751J8RNCxD0p8pBYtG26" --webhook here, the one already here doesn't exist so goodluck spamming it skids
- local HTTP = game:GetService("HttpService")
- local Servers = {}
- local TrinketSpawns = {}
- local artifacts = {}
- local debugmode = true
- local IsArtifact = false
- local IsPhoenixDown = false
- function tablelength(T)
- local count = 0
- for _ in pairs(T) do count = count + 1 end
- return count
- end
- function sendMessages()
- local time = os.date("*t")
- time = string.format("%02d:%02d:%02d", time.hour, time.min, time.sec) or "00:00:00"
- local JSONTable = {
- ['embeds'] = {
- {
- ['fields'] = {},
- ['description'] = "PlaceId: "..placeId.."\nJobId: "..jobId.."\nScript: "..server.."\n",
- ['title'] = "Artifacts found",
- ['footer'] = {
- ['text'] = time
- },
- ['color'] = 5384145
- }
- }
- }
- if IsArtifact then
- JSONTable["content"] = "@everyone"
- elseif IsPhoenixDown then
- JSONTable["content"] = "<@&452403942463373313>"
- end
- for loc,artis in next, artifacts do
- local arti = ""
- for _,a in next, artis do
- arti = arti..a.."\n"
- end
- table.insert(JSONTable['embeds'][1]['fields'], #JSONTable['embeds'][1]['fields']+1, {
- ["name"] = loc,
- ["value"] = arti
- })
- end
- return syn.request({
- Url = WebhookUrl,
- Method = "POST",
- Headers = {
- ["Content-Type"] = "application/json"
- },
- Body = HTTP:JSONEncode(JSONTable)
- })
- end
- for _,v in next, workspace:GetChildren() do
- if v:IsA("Folder") and v:FindFirstChild("Part") and v.Part:FindFirstChildOfClass("ClickDetector") then
- for i,x in next, v:GetChildren() do
- table.insert(TrinketSpawns, x)
- end
- end
- end
- local OverrideAreas = {
- ['The Snowfields'] = {
- ['Dragon Pit'] = {
- Size = Vector3.new(1, 1011, 345.5),
- Position = Vector3.new(4985.783, 686.794, 1518.925)
- }
- }
- }
- function getLocation(t)
- local Xt = t.Position.X;
- local Yt = t.Position.Y;
- local Zt = t.Position.Z;
- local current = nil;
- for _,v in next, workspace.AreaMarkers:GetChildren() do
- if Zt < (v.Position.Z + v.Size.X/2) and Zt > (v.Position.Z - v.Size.X/2) and Xt < (v.Position.X + v.Size.Z/2) and Xt > (v.Position.X - v.Size.Z/2) then
- if not current or math.abs(current.Position.Y - Yt) > math.abs(v.Position.Y - Yt) then
- current = v
- end
- end
- end
- if OverrideAreas[current and current.Name or ""] then
- for a,v in next, OverrideAreas[current.Name] do
- if Zt < (v.Position.Z + v.Size.Z/2) and Zt > (v.Position.Z - v.Size.Z/2) and Xt < (v.Position.X + v.Size.Y/2) and Xt > (v.Position.X - v.Size.Y/2) then
- current = a
- end
- end
- end
- return (type(current) == "string" and current) or (current and current.Name) or "???"
- end
- function getId(s)
- if s == "rbxasset://textures/particles/sparkles_main.dds" then return 0 end
- local i = 0;
- local id = 0;
- while i < 100 do
- i = i+1
- id = tonumber(string.split(s,"%20")[i]:gsub("%D+", "") or 0) or 0
- if id ~= 0 then
- break;
- end
- end
- return id
- end
- function CheckTrinketSpawn(t)
- local trinketPosition = t.Position
- for _,s in next, TrinketSpawns do
- if t.Position == s.Position and s.Size == Vector3.new(2,2,2) then
- return true
- end
- end
- return false
- end
- function CheckTrinket(v)
- local found = false;
- local artifact = "Unknown Artifact";
- if v:IsA("Part") then
- if v.Transparency == 1 and v:FindFirstChildOfClass("Attachment") and v:FindFirstChildOfClass("Attachment"):FindFirstChildOfClass("ParticleEmitter") and getId(v:FindFirstChildOfClass("Attachment"):FindFirstChildOfClass("ParticleEmitter").Texture) == 1536547385 and CheckTrinketSpawn(v) then
- artifact = "Phoenix Down"
- IsPhoenixDown = true
- found = true
- elseif v.Transparency == 1 and v:FindFirstChildOfClass("ParticleEmitter") and getId(v:FindFirstChildOfClass("ParticleEmitter").Texture) == 20443483 and v:FindFirstChildOfClass("PointLight") and v:FindFirstChildOfClass("PointLight").Brightness == 3 and CheckTrinketSpawn(v) then
- artifact = "Ice Essence"
- found = true
- elseif v.Transparency == 0 and v.Material == Enum.Material.Neon and v:FindFirstChildOfClass("SpecialMesh") and v:FindFirstChildOfClass("SpecialMesh").MeshType == Enum.MeshType.Sphere and v:FindFirstChildOfClass("PointLight") and v:FindFirstChildOfClass("PointLight").Brightness == 3 and v:FindFirstChildOfClass("PointLight").Range == 5 and CheckTrinketSpawn(v) then
- artifact = "FairFrozen"
- found = true
- elseif v.Transparency ~= 0 and v.Material == Enum.Material.Glass and v:FindFirstChildOfClass("SpecialMesh") and getId(v:FindFirstChildOfClass("SpecialMesh").MeshId) == 2877143560 and v.BrickColor == BrickColor.new("Hot pink") and CheckTrinketSpawn(v) then
- artifact = "Rift Gem"
- found = true
- end
- elseif v:IsA("UnionOperation") then
- if v.Transparency == 0 and v.BrickColor == BrickColor.new("Black") and v.Material == Enum.Material.Neon and v:FindFirstChildOfClass("PointLight") and v:FindFirstChildOfClass("PointLight").Brightness == 3 and CheckTrinketSpawn(v) then
- artifact = "Nightstone"
- found = true
- elseif v.Transparency == 0 and v.BrickColor == BrickColor.new("Persimmon") and v.Material == Enum.Material.Neon and v:FindFirstChildOfClass("PointLight") and v:FindFirstChildOfClass("PointLight").Brightness == 3 and CheckTrinketSpawn(v) then
- artifact = "Philosopher's stone"
- found = true
- elseif v.Material == Enum.Material.Neon and v.Transparency == 0 and v:FindFirstChildOfClass("PointLight") and v:FindFirstChildOfClass("PointLight").Color == Color3.new(255,255,255) and CheckTrinketSpawn(v) then
- artifact = "Amulet of the White King"
- found = true
- elseif v.Material == Enum.Material.DiamondPlate and v.Transparency == 0 and v:FindFirstChildOfClass("PointLight") and v:FindFirstChildOfClass("PointLight").Brightness == 0.5 and CheckTrinketSpawn(v) then
- artifact = "Scroom Key"
- found = true
- end
- elseif v:IsA("MeshPart") then
- if v:FindFirstChildOfClass("ParticleEmitter") and getId(v.MeshId) == 2520762076 and CheckTrinketSpawn(v) then
- artifact = "Howler Friend"
- found = true
- end
- end
- if found then
- local location = getLocation(v)
- IsArtifact = (not (artifact == "Phoenix Down" or artifact == "Ice Essence"))
- if not artifacts[location] then
- artifacts[location] = {}
- table.insert(artifacts[location], 1, artifact)
- else
- table.insert(artifacts[location], #artifacts[location]+1, artifact)
- end
- sendMessage(webhook, artifact, "Location: "..location.."\n".."JobId: "..jobId.."\n".."placeId: "..placeId.."\n".."Script: "..server, pog)
- end
- end
- for _,v in next, workspace:GetDescendants() do
- CheckTrinket(v)
- end
- end))
- if wait()/2 < 50 then
- break
- end
- end
Add Comment
Please, Sign In to add comment