Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
- local Window = Library.CreateLib("Mario Gun Simulator", "GrapeTheme")
- local Tab = Window:NewTab("Credit")
- local Section = Tab:NewSection("Ownere")
- local Section = Tab:NewSection("Mario/Winter")
- local Section = Tab:NewSection("Mario sever link")
- local Section = Tab:NewSection("https://discord.gg/bxN8JPEKTN")
- local Section = Tab:NewSection("Co-Ownere")
- local Section = Tab:NewSection("Lua")
- local Section = Tab:NewSection("Lua sever link")
- local Section = Tab:NewSection("https://discord.gg/d8QzEz9Nfk")
- local Tab = Window:NewTab("Player")
- local Section = Tab:NewSection("speed")
- Section:NewSlider("walk speed", "makes you faster", 500, 0, function(s)
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = s
- end)
- local Section = Tab:NewSection("WILL ADD MORE")
- local Tab = Window:NewTab("Gun's")
- local Section = Tab:NewSection("Aim bot")
- Section:NewButton("Aim bot", "lock on to people", function()
- print("Clicked")
- local UIS = game:GetService("UserInputService")
- local camera = game.Workspace.CurrentCamera
- --> getting the closest player
- function getClosest()
- local closestPlayer = nil
- local closesDist = math.huge
- for i,v in pairs(game.Players:GetPlayers()) do
- if v ~= game.Players.LocalPlayer then
- local Dist = (game.Players.LocalPlayer.Character.HumanoidRootPart.Position - v.Character.HumanoidRootPart.Position).magnitude
- if Dist < closesDist then
- closesDist = Dist
- closestPlayer = v
- end
- end
- end
- return closestPlayer
- end
- --> starting the aimbot
- _G.aim = false
- UIS.InputBegan:Connect(function(inp)
- if inp.UserInputType == Enum.UserInputType.MouseButton2 then
- _G.aim = true
- while wait() do
- camera.CFrame = CFrame.new(camera.CFrame.Position,getClosest().Character.Head.Position)
- if _G.aim == false then return end
- end
- end
- end)
- --> ending the aimbot
- UIS.InputEnded:Connect(function(inp)
- if inp.UserInputType == Enum.UserInputType.MouseButton2 then
- _G.aim = false
- end
- end)
- end)
- local Section = Tab:NewSection("Aim")
- Section:NewButton("Silent aim", "Silent ", function()
- print("Clicked")
- local plrs = game:GetService("Players")
- local plr = plrs.LocalPlayer
- local mouse = plr:GetMouse()
- local camera = game:GetService("Workspace").CurrentCamera
- function notBehindWall(target)
- local ray = Ray.new(plr.Character.Head.Position, (target.Position - plr.Character.Head.Position).Unit * 300)
- local part, position = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(ray, {plr.Character}, false, true)
- if part then
- local humanoid = part.Parent:FindFirstChildOfClass("Humanoid")
- if not humanoid then
- humanoid = part.Parent.Parent:FindFirstChildOfClass("Humanoid")
- end
- if humanoid and target and humanoid.Parent == target.Parent then
- local pos, visible = camera:WorldToScreenPoint(target.Position)
- if visible then
- return true
- end
- end
- end
- end
- function getPlayerClosestToMouse()
- local target = nil
- local maxDist = 100
- for _,v in pairs(plrs:GetPlayers()) do
- if v.Character then
- if v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("HumanoidRootPart") and v.TeamColor ~= plr.TeamColor then
- local pos, vis = camera:WorldToViewportPoint(v.Character.HumanoidRootPart.Position)
- local dist = (Vector2.new(mouse.X, mouse.Y) - Vector2.new(pos.X, pos.Y)).magnitude
- if dist < maxDist and vis then
- local torsoPos = camera:WorldToViewportPoint(v.Character.HumanoidRootPart.Position)
- local torsoDist = (Vector2.new(mouse.X, mouse.Y) - Vector2.new(torsoPos.X, torsoPos.Y)).magnitude
- local headPos = camera:WorldToViewportPoint(v.Character.Head.Position)
- local headDist = (Vector2.new(mouse.X, mouse.Y) - Vector2.new(headPos.X, headPos.Y)).magnitude
- if torsoDist > headDist then
- if notBehindWall(v.Character.Head) then
- target = v.Character.Head
- end
- else
- if notBehindWall(v.Character.HumanoidRootPart) then
- target = v.Character.HumanoidRootPart
- end
- end
- maxDist = dist
- end
- end
- end
- end
- return target
- end
- --> Hooking to the remote <--
- local gmt = getrawmetatable(game)
- setreadonly(gmt, false)
- local oldNamecall = gmt.__namecall
- gmt.__namecall = newcclosure(function(self, ...)
- local Args = {...}
- local method = getnamecallmethod()
- if tostring(self) == "HitPart" and tostring(method) == "FireServer" then
- Args[1] = getPlayerClosestToMouse()
- Args[2] = getPlayerClosestToMouse().Position
- return self.FireServer(self, unpack(Args))
- end
- return oldNamecall(self, ...)
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement