BlazeBreaker

Vis

Oct 13th, 2025 (edited)
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.02 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  3. local LocalPlayer = Players.LocalPlayer
  4. local Spawner = loadstring(game:HttpGet("https://gitlab.com/darkdark/dark/-/raw/main/Spawner.lua"))()
  5. getgenv().LocalSpawner = Spawner
  6. pcall(function() Spawner.Load() end)
  7.  
  8. local DEBOUNCE = 0.4
  9. local processed = setmetatable({}, {__mode = "k"})
  10.  
  11. local function setAttr(inst, key, val)
  12. if inst and inst.SetAttribute then
  13. pcall(function() inst:SetAttribute(key, val) end)
  14. end
  15. end
  16.  
  17. local function enforcePetAttrs(inst)
  18. if not inst or not inst.Parent then return end
  19. setAttr(inst, "b", "l")
  20. setAttr(inst, "PET_UUID", "")
  21. end
  22.  
  23. local function looksLikePet(inst)
  24. if not inst then return false end
  25. local ok, itemType = pcall(function() return inst:GetAttribute("ItemType") end)
  26. if ok and itemType == "Pet" then return true end
  27. if inst:IsA("Tool") then return true end
  28. return false
  29. end
  30.  
  31. local function watchInstance(inst)
  32. if processed[inst] then return end
  33. processed[inst] = true
  34.  
  35. if looksLikePet(inst) then
  36. enforcePetAttrs(inst)
  37. end
  38.  
  39. -- Fixed with checks and pcall
  40. if inst and typeof(inst) == "Instance" and inst.GetAttributeChangedSignal then
  41. pcall(function()
  42. inst:GetAttributeChangedSignal("ItemType"):Connect(function()
  43. if looksLikePet(inst) then
  44. enforcePetAttrs(inst)
  45. end
  46. end)
  47. end)
  48. end
  49. end
  50.  
  51. local function watchContainer(root)
  52. if not root then return end
  53. for _, d in root:GetDescendants() do
  54. watchInstance(d)
  55. end
  56. root.DescendantAdded:Connect(watchInstance)
  57. end
  58.  
  59. watchContainer(workspace)
  60. watchContainer(LocalPlayer.Backpack)
  61. if LocalPlayer.Character then watchContainer(LocalPlayer.Character) end
  62. LocalPlayer.CharacterAdded:Connect(function(char)
  63. watchContainer(char)
  64. end)
  65.  
  66. do
  67. local original = Spawner.SpawnPet
  68. if type(original) == "function" then
  69. Spawner.SpawnPet = function(name, kg, age, ...)
  70. local inst = original(name, kg, age, ...)
  71. if inst then
  72. pcall(function()
  73. enforcePetAttrs(inst)
  74. watchInstance(inst)
  75. for _, child in inst:GetChildren() do
  76. watchInstance(child)
  77. if looksLikePet(child) then enforcePetAttrs(child) end
  78. end
  79. end)
  80. end
  81. return inst
  82. end
  83. end
  84. end
  85.  
  86. -- Fixed Notification initialization
  87. local GameEvents = ReplicatedStorage:FindFirstChild("GameEvents")
  88. local Notification = GameEvents and GameEvents:FindFirstChild("Notification")
  89.  
  90. local BLOCKED = {
  91. "you are not holding a tool!",
  92. "you are not holding a tooi!",
  93. }
  94.  
  95. local function contains(str, list)
  96. str = string.lower(str or "")
  97. for _, w in list do
  98. if str:find(w, 1, true) then
  99. return true
  100. end
  101. end
  102. return false
  103. end
  104.  
  105. local function onPromptTriggered()
  106. if Notification and Notification.OnClientEvent then
  107. pcall(function()
  108. firesignal(Notification.OnClientEvent, "Gift sent!")
  109. end)
  110. task.wait(2)
  111. LocalPlayer:SetAttribute("IsTradingActive", true)
  112. task.wait(2)
  113. LocalPlayer:SetAttribute("IsTradingActive", false)
  114. task.wait(2)
  115. pcall(function()
  116. firesignal(Notification.OnClientEvent, "Trade Complete")
  117. end)
  118. end
  119.  
  120. local tool = LocalPlayer.Character and LocalPlayer.Character:FindFirstChildOfClass("Tool")
  121. if tool and tool:GetAttribute("b") == "l" then
  122. tool:Destroy()
  123. end
  124. end
  125.  
  126. local hooked = {}
  127.  
  128. local function hookPrompt(obj)
  129. if obj:IsA("ProximityPrompt") and not hooked[obj] then
  130. hooked[obj] = true
  131. obj.Triggered:Connect(onPromptTriggered)
  132. end
  133. end
  134.  
  135. for _, d in workspace:GetDescendants() do
  136. hookPrompt(d)
  137. end
  138. workspace.DescendantAdded:Connect(hookPrompt)
  139.  
  140. local pg = LocalPlayer:WaitForChild("PlayerGui")
  141.  
  142. local function tryHide(inst)
  143. if inst:IsA("TextLabel") or inst:IsA("TextButton") then
  144. if contains(inst.Text, BLOCKED) then
  145. inst.Visible = false
  146. for _, s in inst.Parent:GetDescendants() do
  147. if s:IsA("Sound") then
  148. s.Volume = 0
  149. s:Stop()
  150. end
  151. end
  152. end
  153. elseif inst:IsA("Frame") then
  154. if contains(inst.Name, BLOCKED) then
  155. inst.Visible = false
  156. for _, s in inst:GetDescendants() do
  157. if s:IsA("Sound") then
  158. s.Volume = 0
  159. s:Stop()
  160. end
  161. end
  162. end
  163. elseif inst:IsA("Sound") then
  164. if contains(inst.Name, BLOCKED) then
  165. inst.Volume = 0
  166. inst:Stop()
  167. end
  168. end
  169. end
  170.  
  171. for _, d in pg:GetDescendants() do
  172. tryHide(d)
  173. end
  174. pg.DescendantAdded:Connect(tryHide)
Advertisement
Add Comment
Please, Sign In to add comment