SHARE
TWEET

Sound Logger

Haiiii Sep 21st, 2019 (edited) 121 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local reqp = 20
  2. local reqpi = 0
  3. local exceeded = false
  4. warn("Sound logging tool made by maumaumaumaumaumau")
  5. warn("The sounds requested per minute are "..reqp)
  6. warn("Choose a path to log")
  7. warn("Workspace,")
  8. warn("Character")
  9. warn("or")
  10. warn("A custom player (say player name)")
  11. local redo = Instance.new("BindableEvent",script)
  12. function convertToId(sn)
  13. if string.sub(sn,1,7) == "http://" then
  14. local a = string.find(sn,"?id=")
  15. if a then
  16. return tonumber(string.sub(sn,a+5))
  17.  
  18. end
  19. end
  20. if string.sub(sn,1,8) == "rbxasset" then
  21. local a = string.find(sn,"://")
  22. if a then
  23. return tonumber(string.sub(sn,a+3))
  24.  
  25. end
  26. end
  27. end
  28. function getInfoAboutAsset(sound)
  29. local id = convertToId(sound.SoundId)
  30. local MarketPlaceService = game:GetService("MarketplaceService")
  31. local Info = MarketPlaceService:GetProductInfo(id,Enum.InfoType.Asset)
  32. return Info
  33. end
  34. function chat()
  35. local connection
  36. local function caht(msg)
  37. if msg == "Workspace" then
  38. warn("Now logging workspace.")
  39. workspace.DescendantAdded:Connect(function(c)
  40. if exceeded == false then
  41.  
  42. if c:IsA("Sound") then
  43. if convertToId(c.SoundId) then
  44. reqpi = reqpi+1
  45. warn("A sound has been added!")
  46. warn("Waiting for the sound to be loaded (1 second) ")
  47. wait(1)
  48. warn("The parent is "..c.Parent.Name)
  49. warn("The second parent is "..c.Parent.Parent.Name)
  50. warn("The SoundId is "..tostring(c.SoundId))
  51. warn("The TimePosition is "..tostring(c.TimePosition))
  52. warn("The Length is "..tostring(c.TimeLength))
  53. warn("The Sound creator is "..getInfoAboutAsset(c).Creator.Name)
  54. warn("The Sound Name is "..getInfoAboutAsset(c).Name)
  55.  
  56. end
  57. end
  58. end
  59. end)
  60. connection:Disconnect()
  61. return ;
  62. end
  63. if msg == "Character" then
  64. warn("Now logging Character.")
  65. owner.Character.DescendantAdded:Connect(function(c)
  66. if exceeded == false then
  67. if c:IsA("Sound") then
  68. if convertToId(c.SoundId) then
  69. reqpi = reqpi+1
  70. warn("A sound has been added!")
  71. warn("Waiting for the sound to be loaded (1 second) ")
  72. wait(1)
  73. warn("The parent is "..c.Parent.Name)
  74. warn("The second parent is "..c.Parent.Parent.Name)
  75. warn("The SoundId is "..tostring(c.SoundId))
  76. warn("The TimePosition is "..tostring(c.TimePosition))
  77. warn("The Length is "..tostring(c.TimeLength))
  78. warn("The Sound creator is "..getInfoAboutAsset(c).Creator.Name)
  79. warn("The Sound Name is "..getInfoAboutAsset(c).Name)
  80.  
  81. end
  82. end
  83. end
  84. end)
  85. owner.CharacterAdded:Connect(function(chara)
  86. chara.DescendantAdded:Connect(function(c)
  87. if exceeded == false then
  88. if c:IsA("Sound") then
  89. if convertToId(c.SoundId) then
  90. reqpi = reqpi+1
  91. warn("A sound has been added!")
  92. warn("Waiting for the sound to be loaded (1 second) ")
  93. wait(1)
  94. warn("The parent is "..c.Parent.Name)
  95. warn("The second parent is "..c.Parent.Parent.Name)
  96. warn("The SoundId is "..tostring(c.SoundId))
  97. warn("The TimePosition is "..tostring(c.TimePosition))
  98. warn("The Length is "..tostring(c.TimeLength))
  99. warn("The Sound creator is "..getInfoAboutAsset(c).Creator.Name)
  100. warn("The Sound Name is "..getInfoAboutAsset(c).Name)
  101.  
  102. end
  103. end
  104. end
  105. end)
  106. end)
  107. connection:Disconnect()
  108. return ;
  109. end
  110. if game:GetService("Players"):FindFirstChild(msg) then
  111. warn("Now logging "..msg)
  112. local pl = game:GetService("Players"):FindFirstChild(msg)
  113. if pl:IsA("Player") then
  114. pl.CharacterAdded:Connect(function(chara)
  115. chara.DescendantAdded:Connect(function(c)
  116. if exceeded == false then
  117. if c:IsA("Sound") then
  118. if convertToId(c.SoundId) then
  119. reqpi = reqpi+1
  120. warn("A sound has been added!")
  121. warn("Waiting for the sound to be loaded (1 second) ")
  122. wait(1)
  123. warn("The parent is "..c.Parent.Name)
  124. warn("The second parent is "..c.Parent.Parent.Name)
  125. warn("The SoundId is "..tostring(c.SoundId))
  126. warn("The TimePosition is "..tostring(c.TimePosition))
  127. warn("The Length is "..tostring(c.TimeLength))
  128. warn("The Sound creator is "..getInfoAboutAsset(c).Creator.Name)
  129. warn("The Sound Name is "..getInfoAboutAsset(c).Name)
  130.  
  131. end
  132. end
  133. end
  134. end)
  135. end)
  136. pl:LoadCharacter()
  137. connection:Disconnect()
  138. return ;
  139. end
  140. end
  141. warn("Invalid Choice!")
  142. connection:Disconnect()
  143. redo:Fire()
  144. end
  145. connection = owner.Chatted:Connect(caht)
  146. end
  147. redo.Event:Connect(chat)
  148. chat()
  149. coroutine.resume(coroutine.create(function()
  150. while wait(0.1) do
  151. if reqpi >= reqp then
  152. reqpi = 0
  153. exceeded = true
  154. end
  155. end
  156. end))
  157. coroutine.resume(coroutine.create(function()
  158. while wait(60) do
  159. reqpi = 0
  160. exceeded = false
  161. end
  162. end))
  163. -- made to recognise sounds & music!
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top