Advertisement
badgerscript

Audio Logger

Jan 31st, 2020
2,875
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. print[[
  2.  
  3.  
  4. Audio Logger
  5. -------------------
  6. Made by pigeon#1818
  7. -------------------
  8. Press P to start
  9. -------------------
  10. Press K to save
  11. ]]
  12.  
  13.  
  14.  
  15.  
  16. local function tableContains(tbl, element)
  17. for _, v in ipairs(tbl) do
  18. if (rawequal(v, element)) then
  19. return true;
  20. end
  21. end
  22. return false;
  23. end
  24.  
  25. s = {}
  26. function audioLogPlayers()
  27. for i,plr in pairs(game.Players:GetDescendants()) do
  28. if plr:IsA("Sound") then
  29. if string.len(plr.SoundId) <= 50 then
  30. local soundSplit = plr.SoundId:split("=")
  31. if tableContains(s,soundSplit[2]) ~= true and soundSplit[2] ~= nil then
  32. s[#s+1] = soundSplit[2]
  33. print(soundSplit[2])
  34. end
  35. end
  36. end
  37. end
  38. end
  39.  
  40. local playerMouse = game.Players.LocalPlayer:GetMouse()
  41. playerMouse.KeyDown:connect(function(key)
  42. if key:lower() == "p" then
  43. repeat wait()
  44. audioLogPlayers()
  45. until audioLogger == false
  46. elseif key:lower() == "k" then
  47. audioLogger = false
  48. local GetName = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId)
  49. local filename = GetName.Name.." audiolog"..math.random(1,10000)
  50. audioIds = game:GetService("HttpService"):JSONEncode(s)
  51. writefile(filename..".CMD-X", audioIds)
  52. end
  53. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement