MrBlack2010

Project Lazarus GUI UPDATED

Apr 3rd, 2022 (edited)
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 15.90 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local RunService = game:GetService("RunService")
  3. local UserInputService = game:GetService("UserInputService")
  4. local Workspace = game:GetService("Workspace")
  5. local CoreGui = game:GetService("CoreGui")
  6.  
  7. hookfunction(gcinfo, function()
  8. return math.random(1500, 2500)
  9. end)
  10.  
  11. local repo = "https://raw.githubusercontent.com/wally-rblx/LinoriaLib/main/"
  12. local Library = loadstring(game:HttpGet(repo .. "Library.lua"))()
  13. local SaveManager = loadstring(game:HttpGet(repo .. "addons/SaveManager.lua"))()
  14. local ThemeManager = loadstring(game:HttpGet(repo .. "addons/ThemeManager.lua"))()
  15.  
  16. local protect_gui = syn and syn.protect_gui or function(obj: Instance) end
  17.  
  18. -- Constants:
  19. local WEAPON_NAMES = { "Weapon1", "Weapon2", "Weapon3" }
  20.  
  21. local LocalPlayer = Players.LocalPlayer
  22. local Camera = Workspace.CurrentCamera
  23.  
  24. local Map = Workspace:WaitForChild("Map")
  25. local ZombiesFolder = Workspace:WaitForChild("Baddies")
  26. local IgnoreFolder = Workspace:WaitForChild("Ignore")
  27. local InteractFolder = Workspace:WaitForChild("Interact")
  28. local CurrentRound = Workspace:WaitForChild("RoundNum")
  29.  
  30. local Circle = Drawing.new("Circle")
  31.  
  32. -- Variables:
  33. local aimTarget = nil
  34. local botTarget = nil
  35.  
  36. local aimbotting = false
  37.  
  38. local weaponScript = nil
  39. local inputBeganFunc = nil
  40.  
  41. local playerVisuals = {}
  42. local zombieVisuals = {}
  43. local crateVisuals = {}
  44.  
  45. local zombieMovers = {}
  46. local zombieIgnore = {}
  47.  
  48. -- Functions:
  49. local function isCharacterValid(character: Model)
  50. if character and character:IsA("Model") then
  51. local humanoid = character:FindFirstChildWhichIsA("Humanoid")
  52. if humanoid and humanoid.Health > 0 then
  53. local root = character.PrimaryPart or character:FindFirstChild("HumanoidRootPart")
  54. if root then
  55. return true
  56. end
  57. end
  58. end
  59. return false
  60. end
  61.  
  62. local function isPositionVisible(position: Vector3)
  63. local raycastParams = RaycastParams.new()
  64.  
  65. local ignore = { IgnoreFolder, ZombiesFolder }
  66. for i, v in ipairs(Players:GetPlayers()) do
  67. local character = v.Character
  68. if character then
  69. table.insert(ignore, character)
  70. end
  71. end
  72. raycastParams.FilterDescendantsInstances = ignore
  73. raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
  74.  
  75. -- Raycast to the position:
  76. local origin = Camera.CFrame.Position
  77. local direction = (position - origin)
  78. local result = Workspace:Raycast(Camera.CFrame.Position, direction, raycastParams)
  79. return result == nil
  80. end
  81.  
  82. local function getAimbotTarget(mouse: Vector2)
  83. local target = nil
  84. local distance = math.huge
  85. local visible = false
  86. for i, v in ipairs(ZombiesFolder:GetChildren()) do
  87. if isCharacterValid(v) and not zombieIgnore[v] then
  88. local root = v.HumanoidRootPart
  89. local position = Camera:WorldToViewportPoint(root.Position)
  90. if position.Z > 0 then
  91. position = Vector2.new(position.X, position.Y)
  92. local mouseDistance = (position - mouse).Magnitude
  93. if mouseDistance < Options.Aimbot_FOV.Value then
  94. local magnitude = (root.Position - Camera.CFrame.Position).Magnitude
  95. local canSee = isPositionVisible(root.Position)
  96. if magnitude < distance or (canSee and not visible) then
  97. target = v
  98. distance = magnitude
  99. visible = canSee
  100. end
  101. end
  102. end
  103. end
  104. end
  105. return target
  106. end
  107.  
  108. local function onMapChild(child: Instance)
  109. if child.Name == "IceBlock" then
  110. local weld: WeldConstraint = child:WaitForChild("WeldConstraint", 5)
  111. if weld and weld.Part1 then
  112. local zombie = weld.Part1.Parent
  113. if isCharacterValid(zombie) then
  114. zombieIgnore[zombie] = true
  115. end
  116. end
  117. end
  118. end
  119.  
  120. local function onZombieAdded(zombie: Model) -- Fires on Zombie added
  121. if zombieVisuals[zombie] then
  122. return
  123. end
  124. zombieIgnore[zombie] = nil
  125.  
  126. -- Constants:
  127. local highlight = Instance.new("Highlight")
  128. zombieVisuals[zombie] = highlight
  129.  
  130. -- Listeners:
  131. local function onDestroy()
  132. highlight:Destroy()
  133. zombieVisuals[zombie] = nil
  134. end
  135.  
  136. -- Listeners:
  137. zombie.Destroying:Connect(onDestroy)
  138.  
  139. -- Actions:
  140. highlight.Adornee = zombie
  141. highlight.Enabled = Toggles.Zombie_Chams.Value
  142. highlight.FillColor = Color3.new(0, 1, 0)
  143. highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  144. highlight.RobloxLocked = true
  145. protect_gui(highlight)
  146. highlight.Parent = CoreGui
  147. end
  148.  
  149. local function onInteractAdded(interact: Instance) -- Fires on Interact Item added
  150. if interact.Name ~= "MysteryBox" or crateVisuals[interact] then
  151. return
  152. end
  153.  
  154. -- Constants:
  155. local highlight = Instance.new("Highlight")
  156. crateVisuals[interact] = highlight
  157.  
  158. -- Listeners:
  159. local function onDestroy()
  160. highlight:Destroy()
  161. crateVisuals[interact] = nil
  162. end
  163.  
  164. -- Listeners:
  165. interact.Destroying:Connect(onDestroy)
  166.  
  167. -- Actions:
  168. highlight.Adornee = interact
  169. highlight.Enabled = Toggles.Zombie_Chams.Value
  170. highlight.FillColor = Color3.new(1, 1, 0)
  171. highlight.FillTransparency = 0.75
  172. highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  173. highlight.RobloxLocked = true
  174. protect_gui(highlight)
  175. highlight.Parent = CoreGui
  176. end
  177.  
  178. local function onPlayerAdded(player: Player) -- Fires on Player joined
  179. -- Constants:
  180. local highlight = Instance.new("Highlight")
  181. playerVisuals[player] = highlight
  182.  
  183. -- Listeners:
  184. local function onCharacterAdded(character: Model)
  185. highlight.Adornee = character
  186. end
  187.  
  188. -- Listeners:
  189. player.CharacterAdded:Connect(onCharacterAdded)
  190.  
  191. -- Actions:
  192. local character = player.Character
  193. if character then
  194. onCharacterAdded(character)
  195. end
  196.  
  197. highlight.Enabled = Toggles.Player_Chams.Value
  198. highlight.FillColor = Color3.new(0, 0.5, 1)
  199. highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  200. highlight.RobloxLocked = true
  201. protect_gui(highlight)
  202. highlight.Parent = CoreGui
  203. end
  204.  
  205. local function onPlayerRemoving(player: Player) -- Fires on Player left
  206. -- Destroys Highlight:
  207. local highlight = playerVisuals[player]
  208. if highlight then
  209. highlight:Destroy()
  210. end
  211.  
  212. -- Cleanup:
  213. playerVisuals[player] = nil
  214. end
  215.  
  216. local function onCharacterAdded(character: Model) -- Fires on Character added
  217. weaponScript = character:WaitForChild("WeaponScript")
  218.  
  219. -- Obtain Locals:
  220. inputBeganFunc = nil
  221. repeat
  222. task.wait(0.1)
  223. for i, v in ipairs(getgc()) do
  224. if type(v) == "function" then
  225. local script = getfenv(v).script
  226. if script and script == weaponScript then
  227. local constants = debug.getconstants(v)
  228. if table.find(constants, Enum.UserInputType.MouseButton1) then
  229. inputBeganFunc = v
  230. break
  231. end
  232. end
  233. end
  234. end
  235. until inputBeganFunc
  236. end
  237.  
  238. -- Interface:
  239. do
  240. Library:SetWatermark("Linoria Community (OminousVibes)")
  241. Library:Notify("Loading UI...")
  242.  
  243. local Window = Library:CreateWindow("Project Lazarus")
  244.  
  245. do -- Gameplay
  246. local Tab = Window:AddTab("Gameplay")
  247.  
  248. do -- Silent Aim
  249. local Container = Tab:AddLeftTabbox("Silent Aim")
  250.  
  251. local Aimbot = Container:AddTab("Silent Aim")
  252. Aimbot
  253. :AddToggle("Aimbot", { Text = "Enabled", Default = false })
  254. :AddKeyPicker("Aimbot", { Text = "Silent Aim", Default = "G" })
  255. Aimbot
  256. :AddToggle("Aimbot_Circle", { Text = "Show Circle", Default = false })
  257. :AddColorPicker("Aimbot_Circle", { Title = "Circle Color", Default = Color3.new(1, 1, 1) })
  258.  
  259. local Advanced = Container:AddTab("Advanced")
  260. Advanced:AddSlider(
  261. "Aimbot_FOV",
  262. { Text = "Circle Radius", Min = 25, Max = 500, Default = 100, Rounding = 0, Suffix = "px" }
  263. )
  264. Advanced:AddSlider(
  265. "Aimbot_Thicknesss",
  266. { Text = "Circle Thickness", Min = 0, Max = 10, Default = 1, Rounding = 1, Suffix = "px" }
  267. )
  268. end
  269.  
  270. do -- Modifications
  271. local Container = Tab:AddRightTabbox("Modifications")
  272.  
  273. local Guns = Container:AddTab("Guns")
  274. Guns:AddToggle("Gun_Clip", { Text = "Infinite Clip", Default = false })
  275. Guns:AddToggle("Gun_Ammo", { Text = "Infinite Ammo", Default = false })
  276. Guns:AddToggle("Gun_HK", { Text = "One Hit Kill", Default = false })
  277. Guns:AddToggle("Gun_Piercing", { Text = "High Penetration", Default = false })
  278.  
  279. local Char = Container:AddTab("Character")
  280. Char:AddToggle("Character_Speed", { Text = "Speed Hack", Default = false })
  281.  
  282. local Zomb = Container:AddTab("Zombies")
  283. Zomb:AddToggle("Zombie_Freeze", { Text = "Freeze Zombies", Default = false })
  284. end
  285.  
  286. do -- AFK Bot
  287. local Container = Tab:AddRightGroupbox("AFK Bot")
  288. Container:AddToggle("Bot_Enabled", { Text = "Enabled", Default = false })
  289. Container:AddSlider(
  290. "Bot_Radius",
  291. { Text = "Shoot Distance", Min = 10, Max = 100, Default = 25, Rounding = 0, Suffix = " studs" }
  292. )
  293. end
  294. end
  295.  
  296. do -- Visuals
  297. local Tab = Window:AddTab("Visuals")
  298.  
  299. do -- Visuals
  300. local Container = Tab:AddLeftTabbox("Visuals")
  301.  
  302. local Zombies = Container:AddTab("Humanoids")
  303. Zombies:AddToggle("Player_Chams", { Text = "Players", Default = true })
  304. Zombies:AddToggle("Zombie_Chams", { Text = "Zombies", Default = true })
  305.  
  306. local Others = Container:AddTab("Others")
  307. Others:AddToggle("Crate_Chams", { Text = "Mystery Box", Default = false })
  308. end
  309.  
  310. do -- World Render
  311. local Container = Tab:AddRightGroupbox("World Render")
  312. Container:AddLabel("Work in progress")
  313. end
  314. end
  315.  
  316. do -- Settings
  317. local Tab = Window:AddTab("Settings")
  318.  
  319. ThemeManager:SetLibrary(Library)
  320. SaveManager:SetLibrary(Library)
  321.  
  322. ThemeManager:SetFolder("OminousVibes")
  323. SaveManager:SetFolder("OminousVibes/project-lazarus")
  324.  
  325. SaveManager:IgnoreThemeSettings()
  326. SaveManager:SetIgnoreIndexes({ "MenuKeybind" })
  327.  
  328. SaveManager:BuildConfigSection(Tab)
  329. ThemeManager:ApplyToTab(Tab)
  330.  
  331. local Menu = Tab:AddLeftGroupbox("Menu")
  332. Menu:AddButton("Unload", function()
  333. Library:Unload()
  334. end)
  335. Menu:AddLabel("Menu bind"):AddKeyPicker("MenuKeybind", { Default = "End", NoUI = true, Text = "Menu keybind" })
  336.  
  337. Menu:AddToggle("Keybinds", { Text = "Show Keybinds Menu", Default = true }):OnChanged(function()
  338. Library.KeybindFrame.Visible = Toggles.Keybinds.Value
  339. end)
  340. Menu:AddToggle("Watermark", { Text = "Show Watermark", Default = true }):OnChanged(function()
  341. Library:SetWatermarkVisibility(Toggles.Watermark.Value)
  342. end)
  343. end
  344.  
  345. Library:Notify("UI Loaded")
  346. end
  347.  
  348. -- Listeners:
  349. RunService.RenderStepped:Connect(function(deltaTime)
  350. -- Aimbot:
  351. local mouseLocation = UserInputService:GetMouseLocation()
  352. if Toggles.Aimbot.Value and Options.Aimbot:GetState() then
  353. aimTarget = getAimbotTarget(mouseLocation)
  354. aimbotting = true
  355. else
  356. aimTarget = nil
  357. aimbotting = false
  358. end
  359. if Circle.Visible then
  360. Circle.Position = mouseLocation
  361. end
  362.  
  363. -- Gun Mods:
  364. local equipped = getrenv()._G.Equipped
  365. if equipped then
  366. if Toggles.Gun_Clip.Value then
  367. equipped.Ammo = equipped.MagSize
  368. end
  369. if Toggles.Gun_Ammo.Value then
  370. equipped.StoredAmmo = equipped.MaxAmmo
  371. end
  372. if Toggles.Gun_HK.Value then
  373. equipped.HeadShot = 100 + (CurrentRound.Value * 50)
  374. equipped.TorsoShot = 100 + (CurrentRound.Value * 50)
  375. equipped.LimbShot = 100 + (CurrentRound.Value * 50)
  376. end
  377. if Toggles.Gun_Piercing.Value then
  378. equipped.BulletPenetration = 250
  379. end
  380. end
  381.  
  382. -- Character Mods:
  383.  
  384. -- Zombie Mods:
  385. if Toggles.Zombie_Freeze.Value then
  386. for _, zombie in ipairs(ZombiesFolder:GetChildren()) do
  387. if isCharacterValid(zombie) then
  388. local root = zombie.PrimaryPart
  389. if root then
  390. local distance = (root.Position - Camera.CFrame.Position).Magnitude
  391. if distance < 30 and not zombieMovers[zombie] then
  392. local bodyMover = Instance.new("BodyPosition")
  393. zombieMovers[zombie] = bodyMover
  394. bodyMover.MaxForce = Vector3.one * math.huge
  395. bodyMover.P = 1e4
  396. bodyMover.Position = root.Position + Vector3.new(0, 4, 0)
  397. bodyMover.RobloxLocked = true
  398. bodyMover.Parent = root
  399. local connection
  400. connection = zombie.AncestryChanged:Connect(function()
  401. connection:Disconnect()
  402. bodyMover:Destroy()
  403. zombieMovers[zombie] = nil
  404. end)
  405. end
  406. end
  407. end
  408. end
  409. end
  410. end)
  411. Toggles.Bot_Enabled:OnChanged(function()
  412. if not Toggles.Bot_Enabled.Value then
  413. return
  414. end
  415.  
  416. -- Variables:
  417. local aiming = false
  418.  
  419. -- Bot Logic:
  420. while Toggles.Bot_Enabled.Value do
  421. local character = LocalPlayer.Character
  422. if weaponScript and inputBeganFunc then
  423. while Toggles.Bot_Enabled.Value and isCharacterValid(character) do
  424. local target = nil
  425. local distance = Options.Bot_Radius.Value or 25
  426. local zombies = ZombiesFolder:GetChildren()
  427. for i, v in ipairs(zombies) do
  428. if isCharacterValid(v) and not zombieIgnore[v] then
  429. local root: BasePart = v.HumanoidRootPart
  430. if isPositionVisible(root.Position) then
  431. local magnitude = (root.Position - Camera.CFrame.Position).Magnitude
  432. if magnitude < distance then
  433. target = v
  434. distance = magnitude
  435. end
  436. end
  437. end
  438. end
  439. botTarget = target
  440. if target then
  441. Camera.CFrame = Camera.CFrame:Lerp(
  442. CFrame.new(Camera.CFrame.Position, target.HumanoidRootPart.Position),
  443. 0.5
  444. )
  445. task.defer(getsenv(weaponScript).AimGun)
  446. aiming = true
  447.  
  448. local input = {
  449. UserInputType = Enum.UserInputType.MouseButton1,
  450. KeyCode = nil,
  451. UserInputState = Enum.UserInputState.Begin,
  452. }
  453. task.defer(inputBeganFunc, input, false)
  454. task.delay(0.05, function()
  455. input.UserInputState = Enum.UserInputState.End
  456. end)
  457. else
  458. if aiming then
  459. task.defer(getsenv(weaponScript).UnAimGun)
  460. aiming = false
  461. end
  462. task.defer(inputBeganFunc, {
  463. UserInputType = Enum.UserInputType.Keyboard,
  464. KeyCode = Enum.KeyCode.R,
  465. UserInputState = Enum.UserInputState.Begin,
  466. }, false)
  467. end
  468. RunService.RenderStepped:Wait()
  469. end
  470. end
  471. task.wait(0.1)
  472. end
  473. end)
  474.  
  475. Players.PlayerAdded:Connect(onPlayerAdded)
  476. Players.PlayerRemoving:Connect(onPlayerRemoving)
  477. LocalPlayer.CharacterAdded:Connect(onCharacterAdded)
  478. ZombiesFolder.ChildAdded:Connect(onZombieAdded)
  479. InteractFolder.ChildAdded:Connect(onInteractAdded)
  480. Workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
  481. local camera = Workspace.CurrentCamera
  482. if camera then
  483. Camera = camera
  484. end
  485. end)
  486. Workspace.ChildAdded:Connect(function(child)
  487. if child.Name == "Map" then
  488. child.ChildAdded:Connect(onMapChild)
  489. end
  490. end)
  491.  
  492. do -- UI Listeners
  493. -- Aimbot:
  494. Toggles.Aimbot:OnChanged(function()
  495. Circle.Visible = Toggles.Aimbot.Value and Toggles.Aimbot_Circle.Value
  496. end)
  497. Toggles.Aimbot_Circle:OnChanged(function()
  498. Circle.Visible = Toggles.Aimbot.Value and Toggles.Aimbot_Circle.Value
  499. end)
  500. Options.Aimbot_Circle:OnChanged(function()
  501. Circle.Color = Options.Aimbot_Circle.Value
  502. end)
  503. Options.Aimbot_FOV:OnChanged(function()
  504. Circle.Radius = Options.Aimbot_FOV.Value
  505. end)
  506. Options.Aimbot_Thicknesss:OnChanged(function()
  507. Circle.Thickness = Options.Aimbot_Thicknesss.Value
  508. end)
  509.  
  510. -- Zombie Mods:
  511. Toggles.Zombie_Freeze:OnChanged(function()
  512. if not Toggles.Zombie_Freeze.Value then
  513. for i, v in pairs(zombieMovers) do
  514. v:Destroy()
  515. end
  516. zombieMovers = {}
  517. end
  518. end)
  519.  
  520. -- Visual:
  521. Toggles.Player_Chams:OnChanged(function()
  522. for player, highlight in pairs(playerVisuals) do
  523. highlight.Enabled = Toggles.Player_Chams.Value
  524. end
  525. end)
  526. Toggles.Zombie_Chams:OnChanged(function()
  527. for zombie, highlight in pairs(zombieVisuals) do
  528. highlight.Enabled = Toggles.Zombie_Chams.Value
  529. end
  530. end)
  531. Toggles.Crate_Chams:OnChanged(function()
  532. for crate, highlight in pairs(crateVisuals) do
  533. highlight.Enabled = Toggles.Crate_Chams.Value
  534. end
  535. end)
  536. end
  537.  
  538. -- MetaHooks:
  539. local __index
  540. __index = hookmetamethod(game, "__index", function(self: Instance, index)
  541. if not checkcaller() then
  542. local script = getcallingscript()
  543. if script == weaponScript then
  544. if typeof(self) == "Instance" then
  545. local target = nil
  546. if Toggles.Bot_Enabled.Value then
  547. target = botTarget
  548. elseif aimbotting then
  549. target = aimTarget
  550. end
  551. if target then
  552. if index == "CFrame" then
  553. if self == Camera then
  554. local head = target:FindFirstChild("HeadBox")
  555. if head then
  556. local origin = __index(Camera, "CFrame").Position
  557. return CFrame.new(origin, head.Position)
  558. end
  559. end
  560. if __index(self, "Name") == "AimPart" and self:IsA("BasePart") then
  561. local head = target:FindFirstChild("HeadBox")
  562. if head then
  563. local origin = __index(Camera, "CFrame").Position
  564. return CFrame.new(origin + (head.Position - origin) / 2)
  565. end
  566. end
  567. end
  568. end
  569. end
  570. end
  571. end
  572. return __index(self, index)
  573. end)
  574.  
  575. -- Actions:
  576. Circle.Transparency = 0.9
  577. Circle.NumSides = 25
  578. Circle.Thickness = Options.Aimbot_Thicknesss.Value
  579. Circle.Color = Options.Aimbot_Circle.Value
  580.  
  581. for i, v in ipairs(Players:GetPlayers()) do
  582. if v ~= LocalPlayer then
  583. task.defer(onPlayerAdded, v)
  584. end
  585. end
  586. if LocalPlayer.Character then
  587. task.defer(onCharacterAdded, LocalPlayer.Character)
  588. end
  589. for i, v in ipairs(ZombiesFolder:GetChildren()) do
  590. task.defer(onZombieAdded, v)
  591. end
  592. for i, v in ipairs(InteractFolder:GetChildren()) do
  593. task.defer(onInteractAdded, v)
  594. end
  595.  
  596. return Library:Notify("[Project Lazarus] Loaded!")
Add Comment
Please, Sign In to add comment