Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game.PlaceId == 6284583030 or game.PlaceId == 7722306047 then
- repeat wait() until game:isLoaded()
- repeat wait() until game:GetService("Players")
- repeat wait() until game:GetService("Players").LocalPlayer
- repeat wait() until game:GetService("Players").LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
- repeat wait() until game:GetService("Players").LocalPlayer.PlayerGui.Main.Enabled
- repeat wait() until game:GetService("Workspace"):FindFirstChild("__MAP")
- if (not getgenv().Settings.Webhooks or #getgenv().Settings.Webhooks == 0) or (getgenv().Settings.Webhooks[game.Players.LocalPlayer.UserId]) then
- function send(msg)
- Webhook = getgenv().Settings.Webhooks[game.Players.LocalPlayer.UserId] or getgenv().Settings.webhook
- request = http_request or request or HttpPost or syn.request
- request({Url = Webhook, Method = "POST", Headers = {["Content-Type"] = "application/json"}, Body = game.HttpService:JSONEncode(msg)})
- end
- local function timestamp(t)
- local data = os.date("!*t", t)
- return string.format("%04d-%02d-%02dT%02d:%02d:%02d.000Z", data.year, data.month, data.day, data.hour, data.min, data.sec)
- end
- local sendtemptable = {
- ["content"] = "Starting the web hooking of stats";
- ["embeds"] = nil;
- ["username"] = "Your stats!";
- ["avatar_url"] = "https://cdn.discordapp.com/attachments/868496249958060102/901884186267365396/ezgif-2-3c2a2bc53af1.gif"
- }
- send(sendtemptable)
- local TimeElapsed = 1
- local Colours = {
- ["Profile"] = 0x7771e8,
- ["Coins"] = 0xffee00,
- ["Fantasy Coins"] = 0xaaaab9,
- ["Tech Coins"] = 0x476084,
- ["Halloween Candy"] = 0xa345ff,
- ["Diamonds"] = 0x6af9fe
- }
- function SecondsToClock(seconds)
- local hours = math.floor(seconds / 3600 )
- seconds = seconds - hours * 3600
- local minutes = math.floor(seconds / 60)
- seconds = seconds - minutes * 60
- return string.format("%dh, %dm, %ds", hours, minutes, seconds)
- end
- function othersecondstoclockconverterforthingslol(seconds)
- local minutes = math.floor(seconds / 60)
- seconds = seconds - minutes * 60
- return string.format("%dm, %ds", minutes, seconds)
- end
- local GameLibrary = require(game:GetService("ReplicatedStorage"):WaitForChild("Framework"):WaitForChild("Library"))
- local SaveGot = GameLibrary.Save.Get()
- getgenv().CurrencyTracking = {
- ["CoinsFIRST"] = SaveGot.Coins;
- ["Fantasy CoinsFIRST"] = SaveGot['Fantasy Coins'];
- ["Tech CoinsFIRST"] = SaveGot['Tech Coins'];
- ["Halloween CandyFIRST"] = SaveGot['Halloween Candy'];
- ["DiamondsFIRST"] = SaveGot['Diamonds'];
- ["Coins"] = 0;
- ["Fantasy Coins"] = 0;
- ["Tech Coins"] = 0;
- ["Halloween Candy"] = 0;
- ["Diamonds"] = 0;
- ["CoinsLAST"] = SaveGot["Coins"];
- ["Fantasy CoinsLAST"] = SaveGot["Fantasy Coins"];
- ["Tech CoinsLAST"] = SaveGot["Tech Coins"];
- ["Halloween CandyLAST"] = SaveGot["Halloween Candy"];
- ["DiamondsLAST"] = SaveGot["Diamonds"];
- ["CoinsTOTAL"] = 0;
- ["Fantasy CoinsTOTAL"] = 0;
- ["Tech CoinsTOTAL"] = 0;
- ["Halloween CandyTOTAL"] = 0;
- ["DiamondsTOTAL"] = 0;
- }
- while wait(getgenv().Settings.Delay) do
- local SaveGot = GameLibrary.Save.Get()
- local BoostThing = ""
- if SaveGot.Boosts then
- local BoostNumThing = 1
- for i,v in pairs(SaveGot.Boosts) do
- BoostThing = BoostThing .. "`"..i.."` **".. SecondsToClock(v) .. "**\n"
- end
- end
- if BoostThing == "" then BoostThing = "⠀" end
- local OtherBoostThing = ""
- if SaveGot.BoostsInventory then
- local BoostNumThing = 1
- for i,v in pairs(SaveGot.BoostsInventory) do
- OtherBoostThing = OtherBoostThing .. "`"..i.."` **".. v .. "**\n"
- end
- end
- local SelectedEggThing = getgenv().Settings.EggCalculator or 'Cracked Egg'
- local SelectedModuleEggThing = require(game:GetService("ReplicatedStorage").Game.Eggs["Spawn Eggs"]["Cracked Egg"]["Cracked Egg"])
- for i,v in pairs(game:GetService("ReplicatedStorage").Game.Eggs:GetDescendants()) do
- if v.ClassName == 'ModuleScript' and v.Name == getgenv().Settings.EggCalculator then
- SelectedModuleEggThing = require(v)
- end
- end
- local MaxEggThing = 'ERROR lol'
- MaxEggThing = GameLibrary.Functions.Commas(math.floor(SaveGot[SelectedModuleEggThing.currency] / SelectedModuleEggThing.cost))
- local totalhatched = 0
- for i,v in pairs(SaveGot.EggsOpened) do
- totalhatched = totalhatched + v
- end
- function GetProfileFieldsThing()
- local ProfileFields = {
- content = nil,
- embeds = {
- {
- title = "Misc Statistics",
- color = Colours["Profile"],
- fields = {
- {name = "Username:", value = (getgenv().Settings.HideUsername == false and game.Players.LocalPlayer[getgenv().Settings.NameType]) or tostring("||" .. game.Players.LocalPlayer[getgenv().Settings.NameType] .. "||"), inline = true},
- {name = "Rank:", value = tostring("`"..SaveGot.Rank.."`"), inline = true},
- {name = "Session Time:", value = "`"..tonumber(TimeElapsed).." minutes`", inline = true},
- {name = tostring("Max " .. SelectedEggThing .. ":"), value = "`"..MaxEggThing.."`", inline = true},
- {name = tostring("Total " .. SelectedEggThing .. ":"), value = "`" .. GameLibrary.Functions.Commas(SaveGot.EggsOpened[SelectedEggThing]) .. "`", inline = true},
- {name = "Total Eggs Opened", value = "`"..GameLibrary.Functions.Commas(totalhatched).."`", inline = true},
- {name = "Boosts Enabled", value = BoostThing, inline = true},
- {name = "Boosts Left", value = OtherBoostThing, inline = true},
- },
- timestamp = timestamp(os.time()),
- thumbnail = {
- url = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username=" .. game.Players.LocalPlayer.Name
- }
- }
- },
- username = "Your stats!",
- avatar_url = "https://cdn.discordapp.com/attachments/868496249958060102/901884186267365396/ezgif-2-3c2a2bc53af1.gif"
- }
- return ProfileFields
- end
- function GetCurrencyFieldSThing(Currency)
- local AssetIdImage = string.format("https://www.roblox.com/asset-thumbnail/image?assetId=%d&width=420&height=420&format=png", string.gsub(game:GetService("Players").LocalPlayer.PlayerGui.Main.Right[Currency].Icon.Image, "rbxassetid://", ""))
- local CurencyFieldsThing = {
- content = nil,
- embeds = {
- {
- title = tostring(Currency .. " (" .. GameLibrary.Functions.Commas(SaveGot[Currency]) .. ")"),
- color = Colours[Currency],
- fields = {
- {
- name = "Earned in the last "..othersecondstoclockconverterforthingslol(getgenv().Settings.Delay)..":",
- value = GameLibrary.Functions.Commas(math.floor(SaveGot[Currency] - getgenv().CurrencyTracking[Currency..'LAST'])),
- inline = getgenv().Settings.CompactCurrency or true
- },
- {
- name = "Earned this session:",
- value = GameLibrary.Functions.Commas(math.floor(SaveGot[Currency] - getgenv().CurrencyTracking[tostring(Currency.."FIRST")])),
- inline = getgenv().Settings.CompactCurrency or true
- },
- {
- name = "Session average:",
- value = GameLibrary.Functions.Commas(math.floor((SaveGot[Currency] - getgenv().CurrencyTracking[tostring(Currency.."FIRST")]) / TimeElapsed)),
- inline = getgenv().Settings.CompactCurrency or true
- }
- },
- timestamp = timestamp(os.time()),
- thumbnail = {
- url = AssetIdImage
- }
- }
- },
- username = "Your stats!",
- avatar_url = "https://cdn.discordapp.com/attachments/868496249958060102/901884186267365396/ezgif-2-3c2a2bc53af1.gif"
- }
- return CurencyFieldsThing
- end
- for a,b in pairs(getgenv().Settings.TrackList) do
- if a == 'Profile' and b then
- send(GetProfileFieldsThing())
- elseif a ~= 'Profile' and b then
- send(GetCurrencyFieldSThing(a))
- end
- end
- getgenv().CurrencyTracking["CoinsLAST"] = SaveGot.Coins
- getgenv().CurrencyTracking["Fantasy CoinsLAST"] = SaveGot['Fantasy Coins']
- getgenv().CurrencyTracking["Tech CoinsLAST"] = SaveGot['Tech Coins']
- getgenv().CurrencyTracking["Halloween CandyLAST"] = SaveGot['Halloween Candy']
- getgenv().CurrencyTracking["DiamondsLAST"] = SaveGot['Diamonds']
- getgenv().CurrencyTracking["Coins"] = SaveGot.Coins - getgenv().CurrencyTracking["CoinsLAST"]
- getgenv().CurrencyTracking["Fantasy Coins"] = SaveGot['Fantasy Coins'] - getgenv().CurrencyTracking["Fantasy CoinsLAST"]
- getgenv().CurrencyTracking["Tech Coins"] = SaveGot['Tech Coins'] - getgenv().CurrencyTracking["Tech CoinsLAST"]
- getgenv().CurrencyTracking["Halloween Candy"] = SaveGot['Halloween Candy'] - getgenv().CurrencyTracking["Halloween CandyLAST"]
- getgenv().CurrencyTracking["Diamonds"] = SaveGot['Diamonds'] - getgenv().CurrencyTracking["DiamondsLAST"]
- getgenv().CurrencyTracking["CoinsTOTAL"] = getgenv().CurrencyTracking['CoinsTOTAL'] + getgenv().CurrencyTracking["Coins"]
- getgenv().CurrencyTracking["Fantasy CoinsTOTAL"] = getgenv().CurrencyTracking['Fantasy CoinsTOTAL'] + getgenv().CurrencyTracking["Fantasy Coins"]
- getgenv().CurrencyTracking["Tech CoinsTOTAL"] = getgenv().CurrencyTracking['Tech CoinsTOTAL'] + getgenv().CurrencyTracking["Tech Coins"]
- getgenv().CurrencyTracking["Halloween CandyTOTAL"] = getgenv().CurrencyTracking['Halloween CandyTOTAL'] + getgenv().CurrencyTracking["Halloween Candy"]
- getgenv().CurrencyTracking["DiamondsTOTAL"] = getgenv().CurrencyTracking['DiamondsTOTAL'] + getgenv().CurrencyTracking["Diamonds"]
- TimeElapsed = TimeElapsed + 1
- end
- end
- end
Add Comment
Please, Sign In to add comment