Elisonpp

Mm2-2

Aug 3rd, 2025 (edited)
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.40 KB | None | 0 0
  1. -- Rayfield Setup
  2. local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
  3.  
  4. local Window = Rayfield:CreateWindow({
  5. Name = "MM2 - darkness hub - By darker9899",
  6. Icon = 0,
  7. LoadingTitle = "Loading...",
  8. LoadingSubtitle = "by darker9899",
  9. ShowText = "Rayfield",
  10. Theme = "Default",
  11. ToggleUIKeybind = "K",
  12. DisableRayfieldPrompts = false,
  13. DisableBuildWarnings = false,
  14. ConfigurationSaving = {
  15. Enabled = true,
  16. FolderName = nil,
  17. FileName = "Big Hub"
  18. },
  19. Discord = {
  20. Enabled = false,
  21. Invite = "noinvitelink",
  22. RememberJoins = true
  23. },
  24. KeySystem = false,
  25. KeySettings = {
  26. Title = "Untitled",
  27. Subtitle = "Key System",
  28. Note = "No method of obtaining the key is provided",
  29. FileName = "Key",
  30. SaveKey = true,
  31. GrabKeyFromSite = false,
  32. Key = {"JKB"}
  33. }
  34. })
  35.  
  36. -- Services
  37. local Players = game:GetService("Players")
  38. local RunService = game:GetService("RunService")
  39. local Workspace = game:GetService("Workspace")
  40. local TweenService = game:GetService("TweenService")
  41. local UserInputService = game:GetService("UserInputService")
  42. local TeleportService = game:GetService("TeleportService")
  43. local Lighting = game:GetService("Lighting")
  44. local Terrain = Workspace:FindFirstChildOfClass("Terrain")
  45. local LocalPlayer = Players.LocalPlayer
  46.  
  47. local TabSheriff = Window:CreateTab("Sheriff", 4483362458)
  48. local autoShootEnabled = true
  49. local autoShootV2Enabled = false
  50. local shootMode = "Curve"
  51. local prioritizePing = true
  52. local antiflingEnabled = false
  53.  
  54. TabSheriff:CreateToggle({
  55. Name = "Auto Shoot",
  56. CurrentValue = true,
  57. Flag = "AutoShootToggle",
  58. Callback = function(Value)
  59. autoShootEnabled = Value
  60. end,
  61. })
  62.  
  63. -- Novo toggle Auto Shoot V2
  64. TabSheriff:CreateToggle({
  65. Name = "Auto Shoot V2 (Smart Vision)",
  66. CurrentValue = false,
  67. Flag = "AutoShootV2Toggle",
  68. Callback = function(Value)
  69. autoShootV2Enabled = Value
  70. end,
  71. })
  72.  
  73. TabSheriff:CreateDropdown({
  74. Name = "Choose Shoot Mode",
  75. Options = {"Curve", "Static", "Instantly"},
  76. CurrentOption = "Curve",
  77. Flag = "ShootModeDropdown",
  78. Callback = function(Option)
  79. shootMode = Option
  80. end,
  81. })
  82.  
  83. TabSheriff:CreateToggle({
  84. Name = "Prioritize Ping",
  85. CurrentValue = true,
  86. Flag = "PrioritizePingToggle",
  87. Callback = function(Value)
  88. prioritizePing = Value
  89. end,
  90. })
  91.  
  92. TabSheriff:CreateToggle({
  93. Name = "Anti Fling (Pass through Players)",
  94. CurrentValue = false,
  95. Flag = "AntiFlingToggle",
  96. Callback = function(Value)
  97. antiflingEnabled = Value
  98. if antiflingEnabled and LocalPlayer.Character then
  99. -- Desabilita colisão entre seu personagem e os personagens dos outros players
  100. for _, otherPlayer in pairs(Players:GetPlayers()) do
  101. if otherPlayer ~= LocalPlayer and otherPlayer.Character then
  102. for _, myPart in pairs(LocalPlayer.Character:GetChildren()) do
  103. if myPart:IsA("BasePart") then
  104. for _, otherPart in pairs(otherPlayer.Character:GetChildren()) do
  105. if otherPart:IsA("BasePart") then
  106. myPart:SetNetworkOwner(nil) -- Garante que o servidor controla física pra evitar lag estranho
  107. myPart.CanCollide = true -- Seu personagem continua colidindo (com mapa)
  108. otherPart.CanCollide = true
  109. -- Desativa colisão entre partes seu personagem e as partes do outro player
  110. pcall(function()
  111. myPart:GetPropertyChangedSignal("CanCollide"):Wait()
  112. end)
  113. -- Remove colisão específica
  114. game:GetService("PhysicsService"):SetPartCollisionGroup(myPart, "NoCollidePlayers")
  115. game:GetService("PhysicsService"):SetPartCollisionGroup(otherPart, "NoCollidePlayers")
  116. end
  117. end
  118. end
  119. end
  120. end
  121. end
  122. else
  123. -- Reativa colisão normal quando desligar toggle
  124. if LocalPlayer.Character then
  125. for _, part in pairs(LocalPlayer.Character:GetChildren()) do
  126. if part:IsA("BasePart") then
  127. part.CanCollide = true
  128. game:GetService("PhysicsService"):SetPartCollisionGroup(part, "Default")
  129. end
  130. end
  131. end
  132. end
  133. end,
  134. })
  135.  
  136. -- Função para verificar se um jogador é assassino
  137. local function isMurdererPlayer(player)
  138. if not player or not player.Character then return false end
  139. local hasKnife = player.Character:FindFirstChild("Knife") or (player.Backpack and player.Backpack:FindFirstChild("Knife"))
  140. return hasKnife ~= nil
  141. end
  142.  
  143. -- Função para verificar se o assassino está visível e na direção certa
  144. local function isMurdererVisible(murdererCharacter)
  145. local myCharacter = LocalPlayer.Character
  146. if not myCharacter or not myCharacter:FindFirstChild("HumanoidRootPart") then return false end
  147. if not murdererCharacter or not murdererCharacter:FindFirstChild("HumanoidRootPart") then return false end
  148.  
  149. local myRoot = myCharacter.HumanoidRootPart
  150. local murdererRoot = murdererCharacter.HumanoidRootPart
  151. local humanoid = myCharacter:FindFirstChildOfClass("Humanoid")
  152.  
  153. -- Calcula direção para o assassino
  154. local directionToMurderer = (murdererRoot.Position - myRoot.Position).Unit
  155. local myLookDirection = myRoot.CFrame.LookVector
  156.  
  157. -- Verifica se está na frente, atrás, esquerda ou direita (não muito específico)
  158. local dotProduct = myLookDirection:Dot(directionToMurderer)
  159. local isInGeneralDirection = dotProduct > -0.7 -- Permite um campo de visão bem amplo
  160.  
  161. -- Raycast para verificar se há obstáculos
  162. local raycastParams = RaycastParams.new()
  163. raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
  164. raycastParams.FilterDescendantsInstances = {myCharacter, murdererCharacter}
  165.  
  166. local raycastResult = Workspace:Raycast(myRoot.Position, murdererRoot.Position - myRoot.Position, raycastParams)
  167.  
  168. -- Se não há obstáculos ou se o obstáculo é muito longe, considera visível
  169. local isVisible = not raycastResult or (raycastResult.Distance > (murdererRoot.Position - myRoot.Position).Magnitude * 0.9)
  170.  
  171. return isInGeneralDirection and isVisible
  172. end
  173.  
  174. -- Shoot button GUI
  175. local gui = Instance.new("ScreenGui", LocalPlayer:WaitForChild("PlayerGui"))
  176. gui.Name = "ShootGui"
  177. gui.ResetOnSpawn = false
  178.  
  179. local button = Instance.new("TextButton", gui)
  180. button.Size = UDim2.new(0, 100, 0, 100)
  181. button.Position = UDim2.new(0.5, -60, 0.8, 0)
  182. button.BackgroundColor3 = Color3.fromRGB(180, 40, 40)
  183. button.TextColor3 = Color3.new(1, 1, 1)
  184. button.Font = Enum.Font.SourceSansBold
  185. button.TextSize = 14
  186. button.Text = "SHOOT"
  187.  
  188. -- Drag logic for the button
  189. local dragging, dragStart, startPos, dragInput
  190. button.InputBegan:Connect(function(input)
  191. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  192. dragging = true
  193. dragStart = input.Position
  194. startPos = button.Position
  195. input.Changed:Connect(function()
  196. if input.UserInputState == Enum.UserInputState.End then
  197. dragging = false
  198. end
  199. end)
  200. end
  201. end)
  202.  
  203. button.InputChanged:Connect(function(input)
  204. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  205. dragInput = input
  206. end
  207. end)
  208.  
  209. UserInputService.InputChanged:Connect(function(input)
  210. if input == dragInput and dragging then
  211. local delta = input.Position - dragStart
  212. button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  213. end
  214. end)
  215.  
  216. local function getPingTime()
  217. if not prioritizePing then return 0 end
  218. return 0.125
  219. end
  220.  
  221. local function shoot()
  222. TweenService:Create(button, TweenInfo.new(0.1), {Size = UDim2.new(0, 100, 0, 90)}):Play()
  223. task.wait(0.1)
  224. TweenService:Create(button, TweenInfo.new(0.1), {Size = UDim2.new(0, 100, 0, 100)}):Play()
  225.  
  226. local char = LocalPlayer.Character
  227. local backpack = LocalPlayer:FindFirstChild("Backpack")
  228. local gun = backpack and backpack:FindFirstChild("Gun") or char and char:FindFirstChild("Gun")
  229. if not gun then return end
  230.  
  231. char:FindFirstChild("Humanoid"):EquipTool(gun)
  232. task.wait(0.1)
  233.  
  234. for _, player in pairs(Players:GetPlayers()) do
  235. if player ~= LocalPlayer and player.Character then
  236. local hasKnife = player.Character:FindFirstChild("Knife") or (player.Backpack and player.Backpack:FindFirstChild("Knife"))
  237. if hasKnife then
  238. local root = player.Character:FindFirstChild("HumanoidRootPart")
  239. if not root then continue end
  240.  
  241. local pos = root.Position
  242. local vel = root.Velocity
  243. local predicted = pos
  244.  
  245. if shootMode == "Curve" then
  246. predicted = pos + vel * getPingTime()
  247. elseif shootMode == "Static" then
  248. predicted = pos
  249. elseif shootMode == "Instantly" then
  250. predicted = pos
  251. char:FindFirstChild("Humanoid"):EquipTool(gun)
  252. end
  253.  
  254. pcall(function()
  255. local gunRemote = workspace:WaitForChild(LocalPlayer.Name):WaitForChild("Gun")
  256. :WaitForChild("KnifeLocal"):WaitForChild("CreateBeam"):WaitForChild("RemoteFunction")
  257. gunRemote:InvokeServer(1, predicted, "AH2")
  258. end)
  259. break
  260.  
  261. end
  262.  
  263. end
  264.  
  265. end
  266.  
  267. end
  268.  
  269. -- Função Auto Shoot V2 (inteligente)
  270. local function autoShootV2()
  271. local char = LocalPlayer.Character
  272. local backpack = LocalPlayer:FindFirstChild("Backpack")
  273. local gun = backpack and backpack:FindFirstChild("Gun") or char and char:FindFirstChild("Gun")
  274. if not gun then return end
  275.  
  276. -- Encontra o assassino
  277. for _, player in pairs(Players:GetPlayers()) do
  278. if player ~= LocalPlayer and isMurdererPlayer(player) and player.Character then
  279. -- Verifica se o assassino está visível
  280. if isMurdererVisible(player.Character) then
  281. local root = player.Character:FindFirstChild("HumanoidRootPart")
  282. if root then
  283. char:FindFirstChild("Humanoid"):EquipTool(gun)
  284. task.wait(0.1)
  285.  
  286. local pos = root.Position
  287. local vel = root.Velocity
  288. local predicted = pos
  289.  
  290. if shootMode == "Curve" then
  291. predicted = pos + vel * getPingTime()
  292. elseif shootMode == "Static" then
  293. predicted = pos
  294. end
  295.  
  296. pcall(function()
  297. local gunRemote = workspace:WaitForChild(LocalPlayer.Name):WaitForChild("Gun")
  298. :WaitForChild("KnifeLocal"):WaitForChild("CreateBeam"):WaitForChild("RemoteFunction")
  299. gunRemote:InvokeServer(1, predicted, "AH2")
  300. end)
  301. break
  302. end
  303. end
  304. end
  305. end
  306. end
  307.  
  308. button.MouseButton1Click:Connect(shoot)
  309.  
  310. -- Loop do Auto Shoot original
  311. task.spawn(function()
  312. while true do
  313. if autoShootEnabled then
  314. pcall(shoot)
  315. task.wait(0.5)
  316. else
  317. task.wait(1)
  318. end
  319. end
  320. end)
  321.  
  322. -- Loop do Auto Shoot V2 (inteligente)
  323. task.spawn(function()
  324. while true do
  325. if autoShootV2Enabled then
  326. pcall(autoShootV2)
  327. task.wait(0.3) -- Verifica mais frequentemente
  328. else
  329. task.wait(1)
  330. end
  331. end
  332. end)
  333.  
  334. local TabMovement = Window:CreateTab("Movement", 4483362458)
  335. local GlitchSpeed = 33
  336. local NormalSpeed = 16
  337. local ToggleEnabled = false
  338. local IsJumping = false
  339.  
  340. local function SetSpeed(speed)
  341. local char = LocalPlayer.Character
  342. if char and char:FindFirstChildOfClass("Humanoid") then
  343. char:FindFirstChildOfClass("Humanoid").WalkSpeed = speed
  344. end
  345. end
  346.  
  347. local function SetupHumanoid(humanoid)
  348. if not humanoid then return end
  349. humanoid.StateChanged:Connect(function(_, newState)
  350. if not ToggleEnabled then return end
  351. if newState == Enum.HumanoidStateType.Jumping or newState == Enum.HumanoidStateType.Freefall then
  352. IsJumping = true
  353. elseif newState == Enum.HumanoidStateType.Landed or newState == Enum.HumanoidStateType.Running then
  354. IsJumping = false
  355. SetSpeed(NormalSpeed)
  356. end
  357. end)
  358. end
  359.  
  360. LocalPlayer.CharacterAdded:Connect(function(char)
  361. local humanoid = char:WaitForChild("Humanoid", 5)
  362. SetupHumanoid(humanoid)
  363. SetSpeed(NormalSpeed)
  364. end)
  365.  
  366. if LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid") then
  367. SetupHumanoid(LocalPlayer.Character:FindFirstChild("Humanoid"))
  368. SetSpeed(NormalSpeed)
  369. end
  370.  
  371. RunService.Heartbeat:Connect(function()
  372. if not ToggleEnabled then return end
  373. local char = LocalPlayer.Character
  374. if char and char:FindFirstChildOfClass("Humanoid") and IsJumping then
  375. local moving = char.Humanoid.MoveDirection.Magnitude > 0
  376. if moving then
  377. SetSpeed(GlitchSpeed)
  378. end
  379. end
  380. end)
  381.  
  382. TabMovement:CreateToggle({
  383. Name = "Glitch Speed (Mobile)",
  384. CurrentValue = false,
  385. Flag = "GlitchSpeedToggle",
  386. Callback = function(Value)
  387. ToggleEnabled = Value
  388. SetSpeed(NormalSpeed)
  389. end,
  390. })
  391.  
  392. local TabESP = Window:CreateTab("Esp", 4483362458)
  393. local ESP_Ativo = false
  394.  
  395. local function RemoverTodosHighlights()
  396. for _, player in pairs(Players:GetPlayers()) do
  397. if player.Character and player.Character:FindFirstChild("OutlineESP") then
  398. player.Character.OutlineESP:Destroy()
  399. end
  400. end
  401. end
  402.  
  403. local function UpdateHighlight(player)
  404. if player.Character then
  405. local highlight = player.Character:FindFirstChild("OutlineESP")
  406. if not highlight then
  407. highlight = Instance.new("Highlight")
  408. highlight.Name = "OutlineESP"
  409. highlight.Adornee = player.Character
  410. highlight.FillTransparency = 1
  411. highlight.OutlineTransparency = 0
  412. highlight.Parent = player.Character
  413. end
  414.  
  415. local tool = player.Character:FindFirstChildOfClass("Tool") or (player:FindFirstChild("Backpack") and player.Backpack:FindFirstChildOfClass("Tool"))
  416. if tool then
  417. local name = tool.Name:lower()
  418. if name:find("gun") then
  419. highlight.OutlineColor = Color3.fromRGB(0, 170, 255)
  420. elseif name:find("knife") then
  421. highlight.OutlineColor = Color3.fromRGB(255, 0, 0)
  422. else
  423. highlight.OutlineColor = Color3.fromRGB(0, 255, 0)
  424. end
  425. else
  426. highlight.OutlineColor = Color3.fromRGB(0, 255, 0)
  427. end
  428. end
  429.  
  430. end
  431.  
  432. TabESP:CreateToggle({
  433. Name = "Outline ESP",
  434. CurrentValue = false,
  435. Flag = "ToggleESP",
  436. Callback = function(Value)
  437. ESP_Ativo = Value
  438. if not ESP_Ativo then RemoverTodosHighlights() end
  439. end,
  440. })
  441.  
  442. task.spawn(function()
  443. while true do
  444. if ESP_Ativo then
  445. for _, player in pairs(Players:GetPlayers()) do
  446. if player ~= LocalPlayer then
  447. UpdateHighlight(player)
  448. end
  449. end
  450. end
  451. task.wait(0.1)
  452. end
  453. end)
  454.  
  455. Players.PlayerAdded:Connect(function(player)
  456. player.CharacterAdded:Connect(function()
  457. task.wait(1)
  458. if ESP_Ativo then UpdateHighlight(player) end
  459. end)
  460. end)
  461.  
  462. for _, player in pairs(Players:GetPlayers()) do
  463. if player ~= LocalPlayer then
  464. player.CharacterAdded:Connect(function()
  465. task.wait(1)
  466. if ESP_Ativo then UpdateHighlight(player) end
  467. end)
  468. end
  469. end
  470.  
  471. local TabAuto = Window:CreateTab("Auto", 4483362458)
  472. local autofarmEnabled = false
  473. local autoBringCoins = false
  474. local walkSpeed = 60
  475. local safeY = 5
  476. local coinCount = 0
  477.  
  478. local maps = {
  479. "ResearchFacility", "Factory", "Milbase", "Workplace", "Hotel", "Hotel2",
  480. "House2", "Mansion2", "Office3", "Bank2", "BioLab"
  481. }
  482.  
  483. TabAuto:CreateToggle({
  484. Name = "Auto Farm Coins",
  485. CurrentValue = false,
  486. Flag = "AutoFarmCoins",
  487. Callback = function(Value)
  488. autofarmEnabled = Value
  489. end,
  490. })
  491.  
  492. TabAuto:CreateToggle({
  493. Name = "Auto Bring Coins",
  494. CurrentValue = false,
  495. Flag = "AutoBringCoins",
  496. Callback = function(Value)
  497. autoBringCoins = Value
  498. end,
  499. })
  500.  
  501. local function getCurrentMap()
  502. for _, name in ipairs(maps) do
  503. local map = Workspace:FindFirstChild(name)
  504. if map and map:FindFirstChild("CoinContainer") then
  505. return map
  506. end
  507. end
  508. return nil
  509. end
  510.  
  511. local function getAllCoins(map)
  512. local coins = {}
  513. local container = map:FindFirstChild("CoinContainer")
  514. if container then
  515. for _, obj in pairs(container:GetDescendants()) do
  516. if obj:IsA("BasePart") and obj.Name == "MainCoin" then
  517. table.insert(coins, obj)
  518. end
  519. end
  520. end
  521. return coins
  522. end
  523.  
  524. local function walkTo(position)
  525. local hrp = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  526. if not hrp then return end
  527.  
  528. local distance = (position - hrp.Position).Magnitude
  529. local direction = (position - hrp.Position).Unit
  530. local endTime = tick() + (distance / walkSpeed)
  531.  
  532. while tick() < endTime and autofarmEnabled do
  533. if not LocalPlayer.Character or not LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then break end
  534. LocalPlayer.Character.HumanoidRootPart.Velocity = direction * walkSpeed
  535. RunService.RenderStepped:Wait()
  536. end
  537.  
  538. LocalPlayer.Character.HumanoidRootPart.Velocity = Vector3.zero
  539.  
  540. end
  541.  
  542. local function teleportToSafeSpot(map)
  543. local root = LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  544. if not root then return end
  545. local part = map:FindFirstChild("Floor") or map:FindFirstChildWhichIsA("BasePart")
  546. if part then
  547. root.CFrame = part.CFrame + Vector3.new(0, 10, 0)
  548. else
  549. root.CFrame = CFrame.new(0, 10, 0)
  550. end
  551. end
  552.  
  553. RunService.Stepped:Connect(function()
  554. if autofarmEnabled and LocalPlayer.Character then
  555. for _, part in pairs(LocalPlayer.Character:GetDescendants()) do
  556. if part:IsA("BasePart") then
  557. part.CanCollide = false
  558. end
  559. end
  560. end
  561. end)
  562.  
  563. task.spawn(function()
  564. while true do
  565. if autofarmEnabled and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
  566. local humanoid = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
  567. if humanoid and humanoid.Health <= 0 then
  568. repeat task.wait(1) until LocalPlayer.Character:FindFirstChildOfClass("Humanoid") and LocalPlayer.Character:FindFirstChildOfClass("Humanoid").Health > 0
  569. task.wait(2)
  570. end
  571.  
  572. local map = getCurrentMap()
  573. if map then
  574. local hrp = LocalPlayer.Character.HumanoidRootPart
  575.  
  576. if autoBringCoins then
  577. local coins = getAllCoins(map)
  578. for _, coin in ipairs(coins) do
  579. pcall(function()
  580. if coin and coin:IsA("BasePart") then
  581. coin.CFrame = hrp.CFrame + Vector3.new(0, 2, 0)
  582. end
  583. end)
  584. end
  585. end
  586.  
  587. if hrp.Position.Y < safeY then
  588. teleportToSafeSpot(map)
  589. task.wait(1)
  590. end
  591.  
  592. if autofarmEnabled then
  593. local coins = getAllCoins(map)
  594. table.sort(coins, function(a, b)
  595. return (a.Position - hrp.Position).Magnitude < (b.Position - hrp.Position).Magnitude
  596. end)
  597.  
  598. for _, coin in ipairs(coins) do
  599. if autofarmEnabled and coin and coin:IsDescendantOf(game) then
  600. local distance = (coin.Position - hrp.Position).Magnitude
  601. if distance <= 40 then
  602. pcall(function()
  603. walkTo(coin.Position + Vector3.new(0, 2.5, 0))
  604. task.wait(0.15)
  605. coinCount += 1
  606. end)
  607. end
  608. end
  609. end
  610. end
  611.  
  612. end
  613.  
  614. end
  615. task.wait(0.3)
  616.  
  617. end
  618.  
  619. end)
  620.  
  621. local AutoGetGun = { Enabled = false, CollectDistance = 5000 }
  622.  
  623. local function isMurderer()
  624. for _, t in pairs(LocalPlayer.Character:GetChildren()) do
  625. if t:IsA("Tool") and t.Name == "Knife" then return true end
  626. end
  627. return false
  628. end
  629.  
  630. local function getNearestGun()
  631. local root = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  632. if not root then return end
  633.  
  634. local closest, dist = nil, AutoGetGun.CollectDistance
  635. for _, item in ipairs(Workspace:GetDescendants()) do
  636. if item.Name == "GunDrop" then
  637. local success, pos = pcall(function() return item:GetPivot().Position end)
  638. if success and (root.Position - pos).Magnitude < dist then
  639. closest = item
  640. dist = (root.Position - pos).Magnitude
  641. end
  642. end
  643. end
  644. return closest
  645.  
  646. end
  647.  
  648. local function autoGetGunLoop()
  649. while AutoGetGun.Enabled do
  650. if not isMurderer() then
  651. local gun = getNearestGun()
  652. local root = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  653. if gun and gun:IsA("BasePart") and root then
  654. local original = root.CFrame
  655. root.CFrame = CFrame.new(gun.Position + Vector3.new(0, 2, 0))
  656. task.wait()
  657. root.CFrame = original
  658. end
  659. end
  660. task.wait(3)
  661. end
  662. end
  663.  
  664. TabAuto:CreateToggle({
  665. Name = "Auto Get Gun",
  666. CurrentValue = false,
  667. Flag = "AutoGetGunToggle",
  668. Callback = function(Value)
  669. AutoGetGun.Enabled = Value
  670. if Value then task.spawn(autoGetGunLoop) end
  671. end,
  672. })
  673.  
  674. local TabAntiLag = Window:CreateTab("AntiLag", 4483362458)
  675.  
  676. local antiLagSettings = {
  677. { Name = "Disable Global Shadows", Action = function() Lighting.GlobalShadows = false end },
  678. { Name = "Increase Fog Range", Action = function() Lighting.FogEnd = 1000000 end },
  679. { Name = "Reduce Brightness", Action = function() Lighting.Brightness = 0 end },
  680. { Name = "Lock Time of Day", Action = function() Lighting.ClockTime = 14 end },
  681. { Name = "Remove Particles", Action = function()
  682. for _, v in pairs(Workspace:GetDescendants()) do
  683. if v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Fire") or v:IsA("Smoke") then
  684. v.Enabled = false
  685. end
  686. end
  687. end },
  688. { Name = "Disable Reflections", Action = function() Lighting.ReflectionIntensity = 0 end },
  689. { Name = "Disable Blur", Action = function()
  690. local blur = Lighting:FindFirstChildOfClass("BlurEffect")
  691. if blur then
  692. blur.Enabled = false
  693. end
  694. end },
  695. { Name = "Disable Depth of Field", Action = function()
  696. local dof = Lighting:FindFirstChildOfClass("DepthOfFieldEffect")
  697. if dof then
  698. dof.Enabled = false
  699. end
  700. end },
  701. { Name = "Disable Bloom", Action = function()
  702. local bloom = Lighting:FindFirstChildOfClass("BloomEffect")
  703. if bloom then
  704. bloom.Enabled = false
  705. end
  706. end },
  707. { Name = "Remove Local Shadows", Action = function()
  708. for _, part in pairs(Workspace:GetDescendants()) do
  709. if part:IsA("BasePart") then
  710. part.CastShadow = false
  711. end
  712. end
  713. end },
  714. { Name = "Disable Terrain Effects", Action = function()
  715. if Terrain then
  716. Terrain.WaterWaveSize = 0
  717. Terrain.WaterWaveSpeed = 0
  718. Terrain.WaterReflectance = 0
  719. Terrain.WaterTransparency = 0
  720. end
  721. end },
  722. { Name = "Remove Decals", Action = function()
  723. for _, decal in pairs(Workspace:GetDescendants()) do
  724. if decal:IsA("Decal") then
  725. decal.Transparency = 1
  726. end
  727. end
  728. end },
  729. { Name = "Disable Dynamic Lights", Action = function()
  730. for _, light in pairs(Workspace:GetDescendants()) do
  731. if light:IsA("PointLight") or light:IsA("SpotLight") or light:IsA("SurfaceLight") then
  732. light.Enabled = false
  733. end
  734. end
  735. end },
  736. { Name = "Mute Sounds", Action = function()
  737. for _, sound in pairs(Workspace:GetDescendants()) do
  738. if sound:IsA("Sound") then
  739. sound.Volume = 0
  740. end
  741. end
  742. end },
  743. { Name = "Remove Local Particle Effects", Action = function()
  744. for _, particle in pairs(LocalPlayer.Character:GetDescendants()) do
  745. if particle:IsA("ParticleEmitter") or particle:IsA("Trail") then
  746. particle.Enabled = false
  747. end
  748. end
  749. end },
  750. }
  751.  
  752. local toggles = {}
  753.  
  754. for i, setting in ipairs(antiLagSettings) do
  755. toggles[i] = TabAntiLag:CreateToggle({
  756. Name = setting.Name,
  757. CurrentValue = false,
  758. Callback = function(value)
  759. if value then
  760. setting.Action()
  761. else
  762. -- You can implement a revert action here if needed
  763. end
  764. end
  765. })
  766. end
  767.  
  768. -- Reapply enabled optimizations every 10 seconds
  769. task.spawn(function()
  770. while true do
  771. for i, toggle in pairs(toggles) do
  772. if toggle and toggle:Get() then
  773. antiLagSettings[i].Action()
  774. end
  775. end
  776. task.wait(10)
  777. end
  778. end)
  779.  
  780. local TabMore = Window:CreateTab("More", 4483362458)
  781.  
  782. TabMore:CreateButton({
  783. Name = "Rejoin Server",
  784. Callback = function()
  785. TeleportService:Teleport(game.PlaceId, LocalPlayer)
  786. end,
  787. })
  788.  
  789. TabMore:CreateButton({
  790. Name = "Reset Character",
  791. Callback = function()
  792. LocalPlayer.Character:BreakJoints()
  793. end,
  794. })
  795.  
  796. TabMore:CreateButton({
  797. Name = "invisible script",
  798. Callback = function()
  799. loadstring(game:HttpGet("https://rawscripts.net/raw/Universal-Script-Invisible-script-20557"))()
  800. end,
  801. })
  802.  
  803. TabMore:CreateButton({
  804. Name = "Copy Discord (support)",
  805. Callback = function()
  806. setclipboard("https://discord.gg/VbS54ZfE")
  807. Rayfield:Notify({
  808. Title = "copied!",
  809. Content = "Discord link has been copied to your clipboard.",
  810. Duration = 4
  811. })
  812. end,
  813. })
  814.  
  815. TabMore:CreateParagraph({
  816. Title = "Créditos",
  817. Content = "Script made by darker9899"
  818. })
Advertisement
Add Comment
Please, Sign In to add comment