Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Library = loadstring(game:HttpGet("https://gitee.com/yxexdddd/vision/raw/master/LinoriaLib/Library.lua"))()
- Library:Notify("[vision] adonis bypassed!", 8)
- Library:Notify("[vision] 📼/devlogs\n[+] walkspeed🌴\n[+] mouse aim🎯\n[+] aim part🎯\n[+] camera aim🎯\n[+] sticky aim🎯\n[+] prediction🎯", 20)
- local sound = Instance.new("Sound", workspace) do
- sound.SoundId = "rbxassetid://4590662766"
- sound.Volume = 1
- sound.PlayOnRemove = true
- sound:Destroy()
- end
- local SilentAimSettings = {
- Enabled = false,
- ClassName = "vision",
- ToggleKey = "RightAlt",
- TeamCheck = false,
- VisibleCheck = false,
- TargetPart = "HumanoidRootPart",
- SilentAimMethod = "Raycast",
- FOVRadius = 130,
- FOVVisible = false,
- ShowSilentAimTarget = false,
- MouseHitPrediction = false,
- MouseHitPredictionAmount = 0.165,
- HitChance = 100
- }
- getgenv().SilentAimSettings = Settings
- local MainFileName = "vision"
- local SelectedFile, FileToSave = "", ""
- local Camera = workspace.CurrentCamera
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local GuiService = game:GetService("GuiService")
- local UserInputService = game:GetService("UserInputService")
- local HttpService = game:GetService("HttpService")
- local LocalPlayer = Players.LocalPlayer
- local Mouse = LocalPlayer:GetMouse()
- local GetChildren = game.GetChildren
- local GetPlayers = Players.GetPlayers
- local WorldToScreen = Camera.WorldToScreenPoint
- local WorldToViewportPoint = Camera.WorldToViewportPoint
- local GetPartsObscuringTarget = Camera.GetPartsObscuringTarget
- local FindFirstChild = game.FindFirstChild
- local RenderStepped = RunService.RenderStepped
- local GuiInset = GuiService.GetGuiInset
- local GetMouseLocation = UserInputService.GetMouseLocation
- local resume = coroutine.resume
- local create = coroutine.create
- local ValidTargetParts = {"Head", "HumanoidRootPart"}
- local PredictionAmount = 0.165
- local ExpectedArguments = {
- FindPartOnRayWithIgnoreList = {
- ArgCountRequired = 3,
- Args = {
- "Instance", "Ray", "table", "boolean", "boolean"
- }
- },
- FindPartOnRayWithWhitelist = {
- ArgCountRequired = 3,
- Args = {
- "Instance", "Ray", "table", "boolean"
- }
- },
- FindPartOnRay = {
- ArgCountRequired = 2,
- Args = {
- "Instance", "Ray", "Instance", "boolean", "boolean"
- }
- },
- Raycast = {
- ArgCountRequired = 3,
- Args = {
- "Instance", "Vector3", "Vector3", "RaycastParams"
- }
- }
- }
- function CalculateChance(Percentage)
- -- // Floor the percentage
- Percentage = math.floor(Percentage)
- -- // Get the chance
- local chance = math.floor(Random.new().NextNumber(Random.new(), 0, 1) * 100) / 100
- -- // Return
- return chance <= Percentage / 100
- end
- --[[file handling]] do
- if not isfolder(MainFileName) then
- makefolder(MainFileName);
- end
- if not isfolder(string.format("%s/%s", MainFileName, tostring(game.PlaceId))) then
- makefolder(string.format("%s/%s", MainFileName, tostring(game.PlaceId)))
- end
- end
- local Files = listfiles(string.format("%s/%s", "vision", tostring(game.PlaceId)))
- -- functions
- local function GetFiles() -- credits to the linoria lib for this function, listfiles returns the files full path and its annoying
- local out = {}
- for i = 1, #Files do
- local file = Files[i]
- if file:sub(-4) == '.lua' then
- -- i hate this but it has to be done ...
- local pos = file:find('.lua', 1, true)
- local start = pos
- local char = file:sub(pos, pos)
- while char ~= '/' and char ~= '\\' and char ~= '' do
- pos = pos - 1
- char = file:sub(pos, pos)
- end
- if char == '/' or char == '\\' then
- table.insert(out, file:sub(pos + 1, start - 1))
- end
- end
- end
- return out
- end
- local function UpdateFile(FileName)
- assert(FileName or FileName == "string", "oopsies");
- writefile(string.format("%s/%s/%s.lua", MainFileName, tostring(game.PlaceId), FileName), HttpService:JSONEncode(SilentAimSettings))
- end
- local function LoadFile(FileName)
- assert(FileName or FileName == "string", "oopsies");
- local File = string.format("%s/%s/%s.lua", MainFileName, tostring(game.PlaceId), FileName)
- local ConfigData = HttpService:JSONDecode(readfile(File))
- for Index, Value in next, ConfigData do
- SilentAimSettings[Index] = Value
- end
- end
- local function getPositionOnScreen(Vector)
- local Vec3, OnScreen = WorldToScreen(Camera, Vector)
- return Vector2.new(Vec3.X, Vec3.Y), OnScreen
- end
- local function ValidateArguments(Args, RayMethod)
- local Matches = 0
- if #Args < RayMethod.ArgCountRequired then
- return false
- end
- for Pos, Argument in next, Args do
- if typeof(Argument) == RayMethod.Args[Pos] then
- Matches = Matches + 1
- end
- end
- return Matches >= RayMethod.ArgCountRequired
- end
- local function getDirection(Origin, Position)
- return (Position - Origin).Unit * 1000
- end
- local function getMousePosition()
- return GetMouseLocation(UserInputService)
- end
- local function IsPlayerVisible(Player)
- local PlayerCharacter = Player.Character
- local LocalPlayerCharacter = LocalPlayer.Character
- if not (PlayerCharacter or LocalPlayerCharacter) then return end
- local PlayerRoot = FindFirstChild(PlayerCharacter, Options.TargetPart.Value) or FindFirstChild(PlayerCharacter, "HumanoidRootPart")
- if not PlayerRoot then return end
- local CastPoints, IgnoreList = {PlayerRoot.Position, LocalPlayerCharacter, PlayerCharacter}, {LocalPlayerCharacter, PlayerCharacter}
- local ObscuringObjects = #GetPartsObscuringTarget(Camera, CastPoints, IgnoreList)
- return ((ObscuringObjects == 0 and true) or (ObscuringObjects > 0 and false))
- end
- local function getClosestPlayer()
- if not Options.TargetPart.Value then return end
- local Closest
- local DistanceToMouse
- for _, Player in next, GetPlayers(Players) do
- if Player == LocalPlayer then continue end
- if Toggles.TeamCheck.Value and Player.Team == LocalPlayer.Team then continue end
- local Character = Player.Character
- if not Character then continue end
- if Toggles.VisibleCheck.Value and not IsPlayerVisible(Player) then continue end
- local HumanoidRootPart = FindFirstChild(Character, "HumanoidRootPart")
- local Humanoid = FindFirstChild(Character, "Humanoid")
- if not HumanoidRootPart or not Humanoid or Humanoid and Humanoid.Health <= 0 then continue end
- local ScreenPosition, OnScreen = getPositionOnScreen(HumanoidRootPart.Position)
- if not OnScreen then continue end
- local Distance = (getMousePosition() - ScreenPosition).Magnitude
- if Distance <= (DistanceToMouse or Options.Radius.Value or 2000) then
- Closest = ((Options.TargetPart.Value == "Random" and Character[ValidTargetParts[math.random(1, #ValidTargetParts)]]) or Character[Options.TargetPart.Value])
- DistanceToMouse = Distance
- end
- end
- return Closest
- end
- getgenv().azureConnections = {}
- do
- function azureConnections:DisconnectAll()
- for _, connection in next, azureConnections do
- if connection then connection:Disconnect() end
- end
- if draw.currDrawings then
- for _, drawing in next, draw.currDrawings do
- drawing:Remove()
- end
- end
- end
- end
- local LPH_JIT_ULTRA = LPH_JIT_ULTRA or function(...) return ... end
- getgenv().serv = {}
- function serv:get(serv)
- local suc, res = pcall(function()
- return game:GetService(serv)
- end)
- if suc then
- return game:GetService(serv)
- elseif suc == false then
- print("invalid service")
- return print(res)
- end
- end
- getgenv().event = {
- names = {}
- }
- function event:new(eventName): listener
- local listener = {}
- function listener:bindConnection(connection, identifier, callback): bind_connection
- local connection = connection:Connect(callback)
- azureConnections[identifier] = connection
- table.insert(azureConnections, connection)
- return connection
- end
- function listener:unbindConnection(identifier): unbind_connection
- if azureConnections[identifier] then
- local function unBind(connection)
- return connection:Disconnect()
- end
- unBind(azureConnections[identifier])
- end
- end
- return listener
- end
- local Players = serv:get("Players")
- local runservice = serv:get("RunService")
- local workspace = serv:get("Workspace")
- local userinputservice = serv:get("UserInputService")
- local lighting = serv:get("Lighting")
- local stats = serv:get("Stats")
- local camera = workspace.CurrentCamera
- local localplayer = Players.LocalPlayer
- local mouse = localplayer:GetMouse()
- local cameraupdate = event.new("cameraUpdate")
- cameraupdate:bindConnection(runservice.Heartbeat, "asdionionj", LPH_JIT_ULTRA(function()
- camera = workspace.CurrentCamera
- end))
- getgenv().aimbot = {}
- function aimbot.isAlive(plr): alive
- if plr then
- return plr and plr.Character and plr.Character.Parent ~= nil and plr.Character:FindFirstChild("HumanoidRootPart") and plr.Character:FindFirstChild("Head") and plr.Character:FindFirstChild("Humanoid")
- end
- end
- getgenv().character = {}
- function character.isAlive(): alive
- local character = localplayer.Character
- if not character then return false end
- local humanoid = character.Humanoid
- return humanoid.Health > 0
- end
- function character.getPosition(): vec
- if character.isAlive() then
- local character = localplayer.Character
- local characterposition = character.PrimaryPart.Position
- return Vector3.new(characterposition.X, characterposition.Y, characterposition.Z)
- end
- end
- function character.getHealth(): health
- if character.isAlive() then
- local character = localplayer.Character
- local characterHealth = character.Humanoid.Health
- return characterHealth
- else
- return 0
- end
- end
- function character.getMaxHealth(): max_health
- if character.isAlive() then
- local character = localplayer.Character
- local characterMaxHealth = character.Humanoid.MaxHealth
- return characterMaxHealth
- end
- end
- function character.setBaseWalkSpeed(speed)
- if character.isAlive() then
- local character = localplayer.Character
- local humanoid = character.Humanoid
- humanoid.WalkSpeed = speed
- end
- end
- getgenv().draw = {
- currDrawings = {}
- }
- function draw.new(object, properties): new_drawing
- local object = Drawing.new(object)
- for i, v in next, properties do
- object[i] = v
- end
- table.insert(draw.currDrawings, object)
- return object
- end
- getgenv().esp = {
- players = {},
- enabled = false,
- fading = false,
- espfadespeed = 5,
- box = false,
- boxcolor = Color3.fromRGB(255,255,255),
- boxoutline = Color3.fromRGB(0,0,0),
- boxtransparency = 0,
- boxoutlinetransparency = 0,
- health = false,
- healthcolor = Color3.fromRGB(0,255,0),
- healthoutline = Color3.fromRGB(0,0,0),
- healthtransparency = 0,
- healthoutlinetransparency = 0,
- chams = false,
- chamscolor = Color3.fromRGB(255,255,255),
- chamsoutline = Color3.fromRGB(0,0,0),
- chamstransparencyinline = 0.5,
- chamstransparencyoutline = 0.5,
- name = false,
- useDisplayName = false,
- namecolor = Color3.fromRGB(255,255,255),
- nameoutline = Color3.fromRGB(0,0,0),
- nametransparency = 0,
- nameFontSize = 13,
- healthbartext = false,
- healthbartextcolor = Color3.fromRGB(255,255,255),
- healthbartextoutline = Color3.fromRGB(0,0,0),
- healthbartexttransparency = 0,
- healthFontSize = 12,
- renderdistance = 1000
- }
- spawn(function()
- while task.wait() do
- for i, v in next, Players:GetPlayers() do
- if v ~= localplayer and aimbot.isAlive(v) then
- local drawingInstances = esp.players[v]
- if not drawingInstances then continue end
- if esp.enabled then
- local character = v.Character
- local _, onscreen = camera:WorldToScreenPoint(character.HumanoidRootPart.Position)
- local distfromchar = (camera.CFrame.Position - v.Character.HumanoidRootPart.Position).Magnitude
- if esp.renderdistance < distfromchar then
- drawingInstances.Box.Visible = false
- drawingInstances.BoxOutline.Visible = false
- drawingInstances.Health.Visible = false
- drawingInstances.HealthOutline.Visible = false
- drawingInstances.Cham.Parent = nil
- drawingInstances.Name.Visible = false
- drawingInstances.HealthText.Visible = false
- else
- if onscreen then
- local charhum2D = camera:WorldToViewportPoint(character.HumanoidRootPart.Position)
- local charSize = (camera:WorldToViewportPoint(character.HumanoidRootPart.Position - Vector3.new(0, 3, 0)).Y - camera:WorldToViewportPoint(character.HumanoidRootPart.Position + Vector3.new(0, 2.6, 0)).Y) / 2
- local boxSize = Vector2.new(math.floor(charSize * 1.1), math.floor(charSize * 1.9))
- local boxPosition = Vector2.new(math.floor(charhum2D.X - charSize * 1.1 / 2), math.floor(charhum2D.Y - charSize * 1.6 / 2))
- if esp.box then
- drawingInstances.Box.Size = boxSize
- drawingInstances.Box.Position = boxPosition
- drawingInstances.Box.Visible = true
- drawingInstances.Box.Color = esp.boxcolor
- drawingInstances.BoxOutline.Size = boxSize
- drawingInstances.BoxOutline.Position = boxPosition
- drawingInstances.BoxOutline.Visible = true
- drawingInstances.BoxOutline.Color = esp.boxoutline
- if esp.fading then
- drawingInstances.Box.Transparency = 1 - (math.sin(tick() * esp.espfadespeed) + 1) / 2
- drawingInstances.BoxOutline.Transparency = 1 - (math.sin(tick() * esp.espfadespeed) + 1) / 2
- else
- drawingInstances.Box.Transparency = 1 - esp.boxtransparency
- drawingInstances.BoxOutline.Transparency = 1 - esp.boxoutlinetransparency
- end
- else
- drawingInstances.Box.Visible = false
- drawingInstances.BoxOutline.Visible = false
- end
- if esp.health then
- drawingInstances.Health.From = Vector2.new((boxPosition.X - 5), boxPosition.Y + boxSize.Y)
- drawingInstances.Health.To = Vector2.new(drawingInstances.Health.From.X, drawingInstances.Health.From.Y - (character.Humanoid.Health / character.Humanoid.MaxHealth) * boxSize.Y)
- drawingInstances.Health.Color = esp.healthcolor
- drawingInstances.Health.Visible = true
- drawingInstances.HealthOutline.From = Vector2.new(drawingInstances.Health.From.X, boxPosition.Y + boxSize.Y + 1)
- drawingInstances.HealthOutline.To = Vector2.new(drawingInstances.Health.From.X, (drawingInstances.Health.From.Y - 1 * boxSize.Y) -1)
- drawingInstances.HealthOutline.Color = esp.healthoutline
- drawingInstances.HealthOutline.Visible = true
- if esp.fading then
- drawingInstances.Health.Transparency = 1 - (math.sin(tick() * esp.espfadespeed) + 1) / 2
- drawingInstances.HealthOutline.Transparency = 1 - (math.sin(tick() * esp.espfadespeed) + 1) / 2
- else
- drawingInstances.Health.Transparency = 1 - esp.healthtransparency
- drawingInstances.HealthOutline.Transparency = 1 - esp.healthoutlinetransparency
- end
- if esp.healthbartext then
- drawingInstances.HealthText.Visible = true
- drawingInstances.HealthText.Text = string.format("%s", math.round(character.Humanoid.Health) .. "")
- drawingInstances.HealthText.Position = Vector2.new(drawingInstances.Health.From.X - 15, drawingInstances.Health.From.Y - (character.Humanoid.Health / character.Humanoid.MaxHealth) * boxSize.Y)
- drawingInstances.HealthText.Color = esp.healthbartextcolor
- drawingInstances.HealthText.OutlineColor = esp.healthbartextoutline
- drawingInstances.HealthText.Font = Drawing.Fonts.Plex
- if esp.fading then
- drawingInstances.HealthText.Transparency = 1 - (math.sin(tick() * esp.espfadespeed) + 1) / 2
- else
- drawingInstances.HealthText.Transparency = 1 - esp.healthbartexttransparency
- end
- else
- drawingInstances.HealthText.Visible = false
- end
- else
- drawingInstances.Health.Visible = false
- drawingInstances.HealthOutline.Visible = false
- drawingInstances.HealthText.Visible = false
- end
- if esp.chams then
- drawingInstances.Cham.Parent = character
- drawingInstances.Cham.FillColor = esp.chamscolor
- drawingInstances.Cham.OutlineColor = esp.chamsoutline
- if esp.fading then
- drawingInstances.Cham.FillTransparency = (math.sin(tick() * esp.espfadespeed) + 1) / 2
- drawingInstances.Cham.OutlineTransparency = (math.sin(tick() * esp.espfadespeed) + 1) / 2
- else
- drawingInstances.Cham.FillTransparency = esp.chamstransparencyinline
- drawingInstances.Cham.OutlineTransparency = esp.chamstransparencyoutline
- end
- else
- drawingInstances.Cham.Parent = nil
- end
- if esp.name then
- drawingInstances.Name.Visible = true
- drawingInstances.Name.Text = esp.useDisplayName and character.Humanoid.DisplayName or v.Name
- drawingInstances.Name.Position = Vector2.new(boxSize.X / 2 + boxPosition.X, boxPosition.Y - 16)
- drawingInstances.Name.Color = esp.namecolor
- drawingInstances.Name.OutlineColor = esp.nameoutline
- drawingInstances.Name.Font = Drawing.Fonts.Plex
- if esp.fading then
- drawingInstances.Name.Transparency = 1 - (math.sin(tick() * esp.espfadespeed) + 1) / 2
- else
- drawingInstances.Name.Transparency = 1 - esp.nametransparency
- end
- else
- drawingInstances.Name.Visible = false
- end
- else
- drawingInstances.Box.Visible = false
- drawingInstances.BoxOutline.Visible = false
- drawingInstances.Health.Visible = false
- drawingInstances.HealthOutline.Visible = false
- drawingInstances.Cham.Parent = nil
- drawingInstances.Name.Visible = false
- drawingInstances.HealthText.Visible = false
- end
- end
- else
- drawingInstances.Box.Visible = false
- drawingInstances.BoxOutline.Visible = false
- drawingInstances.Health.Visible = false
- drawingInstances.HealthOutline.Visible = false
- drawingInstances.Cham.Parent = nil
- drawingInstances.Name.Visible = false
- drawingInstances.HealthText.Visible = false
- end
- end
- end
- end
- end)
- Players.PlayerAdded:Connect(function(player)
- esp.players[player] = {
- Box = draw.new("Square", {Visible = false, Filled = false, ZIndex = 999, Thickness = 1, Transparency = 1}),
- BoxOutline = draw.new("Square", {Visible = false, Filled = false, ZIndex = 1, Color = Color3.fromRGB(0,0,0), Thickness = 3, Transparency = 1}),
- Health = draw.new("Line", {Visible = false, ZIndex = 999, Thickness = 1, Color = Color3.fromRGB(0,255,0), Transparency = 1}),
- HealthOutline = draw.new("Line", {Visible = false, ZIndex = 0, Thickness = 3, Color = Color3.fromRGB(0,0,0), Transparency = 1}),
- Cham = Instance.new("Highlight"),
- Name = draw.new("Text", {Visible = false, Size = 13, Center = true, Outline = true, Font = Drawing.Fonts.Plex, Color = Color3.fromRGB(255,255,255),Transparency = 1}),
- HealthText = draw.new("Text", {Visible = false, Size = 13, Center = true, Outline = true, Font = Drawing.Fonts.Plex, Color = Color3.fromRGB(255,255,255), Transparency = 1})
- }
- end)
- Players.PlayerRemoving:Connect(function(player)
- if esp.players[player] then
- for i, v in pairs(esp.players[player]) do
- if v then
- if v == "Cham" then
- v.Parent = nil
- else
- v:Remove()
- end
- end
- end
- esp.players[player] = nil
- end
- end)
- for i, v in next, Players:GetPlayers() do
- if v ~= localplayer then
- esp.players[v] = {
- Box = draw.new("Square", {Visible = false, Filled = false, ZIndex = 999, Thickness = 1}),
- BoxOutline = draw.new("Square", {Visible = false, Filled = false, ZIndex = 1, Color = Color3.fromRGB(0,0,0), Thickness = 3}),
- Health = draw.new("Line", {Visible = false, ZIndex = 999, Thickness = 1, Color = Color3.fromRGB(0,255,0)}),
- HealthOutline = draw.new("Line", {Visible = false, ZIndex = 0, Thickness = 3, Color = Color3.fromRGB(0,0,0)}),
- Cham = Instance.new("Highlight"),
- Name = draw.new("Text", {Visible = false, Size = 11, Center = true, Outline = true, Font = Drawing.Fonts.Plex, Color = Color3.fromRGB(255,255,255)}),
- HealthText = draw.new("Text", {Visible = false, Size = 11, Center = true, Outline = true, Font = Drawing.Fonts.Plex, Color = Color3.fromRGB(255,255,255)})
- }
- end
- end
- function get__players1()
- local array = {}
- for i, v in next, players:GetPlayers() do
- if v ~= localplayer then
- if aimbot.isAlive(v) then
- table.insert(array, string.format("%s", v.Name))
- end
- end
- end
- return array
- end
- --//Library
- local esp__events = event.new("esp__events")
- local ThemeManager = loadstring(game:HttpGet("https://gitee.com/yxexdddd/vision/raw/master/LinoriaLib/ThemeManager.lua"))()
- local SaveManager = loadstring(game:HttpGet("https://gitee.com/yxexdddd/vision/raw/master/LinoriaLib/SaveManager.lua"))()
- local Window = Library:CreateWindow({
- Title = 'vision🌴',
- Center = true,
- AutoShow = true,
- TabPadding = 4,
- MenuFadeTime = 0.2
- })
- --//Tabs
- local Tabs = {
- Maintab = Window:AddTab('main'),
- esptab = Window:AddTab('visuals/misc'),
- ['UI Settings'] = Window:AddTab('ui settings'),
- }
- local MainBOX = Tabs.Maintab:AddRightGroupbox('silent aim') do
- MainBOX:AddToggle("aim_Enabled", {Text = "enabled"}):AddKeyPicker("aim_Enabled_KeyPicker", {Default = "None", SyncToggleState = false, Mode = "Toggle", Text = "silent aim", NoUI = false});
- Options.aim_Enabled_KeyPicker:OnClick(function()
- SilentAimSettings.Enabled = not SilentAimSettings.Enabled
- Toggles.aim_Enabled.Value = SilentAimSettings.Enabled
- Toggles.aim_Enabled:SetValue(SilentAimSettings.Enabled)
- end)
- MainBOX:AddToggle("TeamCheck", {Text = "team check", Default = SilentAimSettings.TeamCheck}):OnChanged(function()
- SilentAimSettings.TeamCheck = Toggles.TeamCheck.Value
- end)
- MainBOX:AddToggle("VisibleCheck", {Text = "visible check", Default = SilentAimSettings.VisibleCheck}):OnChanged(function()
- SilentAimSettings.VisibleCheck = Toggles.VisibleCheck.Value
- end)
- MainBOX:AddDropdown("TargetPart", {AllowNull = true, Text = "silent part", Default = SilentAimSettings.TargetPart, Values = {"Head", "HumanoidRootPart", "Random"}}):OnChanged(function()
- SilentAimSettings.TargetPart = Options.TargetPart.Value
- end)
- MainBOX:AddDropdown("Method", {AllowNull = true, Text = "silent method", Default = SilentAimSettings.SilentAimMethod, Values = {
- "Raycast","FindPartOnRay",
- "FindPartOnRayWithWhitelist",
- "FindPartOnRayWithIgnoreList",
- }}):OnChanged(function()
- SilentAimSettings.SilentAimMethod = Options.Method.Value
- end)
- MainBOX:AddSlider('HitChance', {
- Text = 'hit chance',
- Default = 100,
- Min = 0,
- Max = 100,
- Rounding = 1,
- Compact = false,
- })
- Options.HitChance:OnChanged(function()
- SilentAimSettings.HitChance = Options.HitChance.Value
- end)
- end
- --//Aimbot Tab
- local aimBOX = Tabs.Maintab:AddLeftGroupbox('aim assist')
- local Players = game:GetService("Players")
- local UserInputService = game:GetService("UserInputService")
- local RunService = game:GetService("RunService")
- local LocalPlayer = Players.LocalPlayer
- local Camera = workspace.CurrentCamera
- local Mouse = LocalPlayer:GetMouse()
- local ALL_KEYS = {
- "MB1", "MB2", "MB3", "MB4", "MB5",
- "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P",
- "A", "S", "D", "F", "G", "H", "J", "K", "L",
- "Z", "X", "C", "V", "B", "N", "M",
- "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12",
- "LeftShift", "RightShift", "LeftControl", "RightControl",
- "LeftAlt", "RightAlt", "Space", "Enter", "Backspace", "Tab", "CapsLock",
- "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Zero",
- "Up", "Down", "Left", "Right"
- }
- local AimAssist = {
- LockedPlayer = nil,
- TempTarget = nil,
- AimKey = "MB2",
- Mode = "Camera",
- HitPart = "Head",
- Settings = {
- Enabled = false,
- FOV = 100,
- Smoothness = 0.3,
- StickyMode = false,
- Predict = {
- Enabled = false,
- MinSpeed = 0,
- X_Factor = 0,
- Y_Factor = 0,
- Z_Factor = 0,
- MaxDistance = 50,
- DistanceScaling = false
- }
- }
- }
- aimBOX:AddToggle("aa_enabled", {
- Text = "aim assist",
- Default = false,
- Callback = function(state)
- AimAssist.Settings.Enabled = state
- if not state then
- AimAssist.LockedPlayer = nil
- AimAssist.TempTarget = nil
- end
- end
- }):AddKeyPicker("aim_key", {
- Default = AimAssist.AimKey,
- Mode = "Hold",
- Text = "aim assist",
- Keys = ALL_KEYS
- })
- aimBOX:AddToggle("aa_sticky", {
- Text = "sticky aim",
- Default = false,
- Callback = function(state)
- AimAssist.Settings.StickyMode = state
- if not state then
- AimAssist.LockedPlayer = nil
- else
- AimAssist.LockedPlayer = nil
- end
- end
- })
- aimBOX:AddSlider("aa_fov", {
- Text = "aim fov",
- Default = AimAssist.Settings.FOV,
- Min = 10,
- Max = 500,
- Rounding = 0,
- Callback = function(value)
- AimAssist.Settings.FOV = value
- end
- })
- aimBOX:AddSlider("aa_smoothness", {
- Text = "smoothness",
- Default = AimAssist.Settings.Smoothness,
- Min = 0.05,
- Max = 2,
- Rounding = 2,
- Callback = function(value)
- AimAssist.Settings.Smoothness = value
- end
- })
- aimBOX:AddDropdown("aa_mode", {
- Text = "aim mode",
- Default = AimAssist.Mode,
- Values = {"Camera", "Mouse"},
- Callback = function(value)
- AimAssist.Mode = value
- end
- })
- aimBOX:AddDropdown("hit_part", {
- Text = "aim part",
- Default = AimAssist.HitPart,
- Values = {"Head", "Neck", "UpperTorso", "HumanoidRootPart", "LeftFoot", "RightFoot"},
- Callback = function(value)
- AimAssist.HitPart = value
- end
- })
- --//aimbot prediction
- local PredictGroup = Tabs.Maintab:AddLeftGroupbox("prediction settings")
- PredictGroup:AddToggle("predict_enabled", {
- Text = "enable prediction",
- Default = false,
- Callback = function(state)
- AimAssist.Settings.Predict.Enabled = state
- end
- })
- PredictGroup:AddSlider("predict_minspeed", {
- Text = "min speed",
- Default = AimAssist.Settings.Predict.MinSpeed,
- Min = 0,
- Max = 10,
- Rounding = 1,
- Callback = function(value)
- AimAssist.Settings.Predict.MinSpeed = value
- end
- })
- PredictGroup:AddSlider("predict_x", {
- Text = "x-axis predict",
- Default = AimAssist.Settings.Predict.X_Factor,
- Min = -0.5,
- Max = 0.5,
- Rounding = 2,
- Callback = function(value)
- AimAssist.Settings.Predict.X_Factor = value
- end
- })
- PredictGroup:AddSlider("predict_y", {
- Text = "y-axis predict",
- Default = AimAssist.Settings.Predict.Y_Factor,
- Min = -0.5,
- Max = 0.5,
- Rounding = 2,
- Callback = function(value)
- AimAssist.Settings.Predict.Y_Factor = value
- end
- })
- PredictGroup:AddSlider("predict_z", {
- Text = "z-axis predict",
- Default = AimAssist.Settings.Predict.Z_Factor,
- Min = -0.5,
- Max = 0.5,
- Rounding = 2,
- Callback = function(value)
- AimAssist.Settings.Predict.Z_Factor = value
- end
- })
- PredictGroup:AddToggle("predict_distance", {
- Text = "distance scaling",
- Default = false,
- Callback = function(state)
- AimAssist.Settings.Predict.DistanceScaling = state
- end
- })
- local function GetValidTargetPosition(target)
- if not target or not target.Character then return nil end
- local part = target.Character:FindFirstChild(AimAssist.HitPart) or
- target.Character:FindFirstChild("Head") or
- target.Character:FindFirstChild("UpperTorso") or
- target.Character:FindFirstChild("HumanoidRootPart")
- return part and part.Position
- end
- local function CalculatePrediction(target)
- if not AimAssist.Settings.Predict.Enabled then
- return Vector3.new(0, 0, 0)
- end
- local rootPart = target.Character:FindFirstChild("HumanoidRootPart")
- if not rootPart then return Vector3.new(0, 0, 0) end
- local velocity = rootPart.AssemblyLinearVelocity
- local speed = velocity.Magnitude
- if speed > AimAssist.Settings.Predict.MinSpeed then
- local distanceFactor = 1.0
- if AimAssist.Settings.Predict.DistanceScaling then
- local distance = (rootPart.Position - Camera.CFrame.Position).Magnitude
- distanceFactor = math.clamp(distance / AimAssist.Settings.Predict.MaxDistance, 0.2, 1)
- end
- return Vector3.new(
- velocity.X * AimAssist.Settings.Predict.X_Factor * distanceFactor,
- velocity.Y * AimAssist.Settings.Predict.Y_Factor * distanceFactor,
- velocity.Z * AimAssist.Settings.Predict.Z_Factor * distanceFactor
- )
- end
- return Vector3.new(0, 0, 0)
- end
- local function IsKeyPressed()
- if not Options or not Options.aim_key then return false end
- local key = Options.aim_key.Value
- if key == "MB1" then
- return UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1)
- elseif key == "MB2" then
- return UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton2)
- elseif key == "MB3" then
- return UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton3)
- elseif key == "MB4" then
- return UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton4)
- elseif key == "MB5" then
- return UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton5)
- else
- local keyCode = Enum.KeyCode[key]
- return keyCode and UserInputService:IsKeyDown(keyCode)
- end
- end
- local function UpdateTarget()
- if not AimAssist.Settings.StickyMode then
- AimAssist.LockedPlayer = nil
- local closestPlayer, minDist = nil, AimAssist.Settings.FOV
- local mousePos = UserInputService:GetMouseLocation()
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= LocalPlayer and player.Character then
- local head = player.Character:FindFirstChild("Head")
- if head then
- local screenPos = Camera:WorldToViewportPoint(head.Position)
- if screenPos.Z > 0 then
- local dist = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
- if dist < minDist then
- closestPlayer = player
- minDist = dist
- end
- end
- end
- end
- end
- AimAssist.TempTarget = closestPlayer
- return
- end
- if not AimAssist.LockedPlayer or not AimAssist.LockedPlayer.Character then
- local closestPlayer, minDist = nil, AimAssist.Settings.FOV
- local mousePos = UserInputService:GetMouseLocation()
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= LocalPlayer and player.Character then
- local head = player.Character:FindFirstChild("Head")
- if head then
- local screenPos = Camera:WorldToViewportPoint(head.Position)
- if screenPos.Z > 0 then
- local dist = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
- if dist < minDist then
- closestPlayer = player
- minDist = dist
- end
- end
- end
- end
- end
- AimAssist.LockedPlayer = closestPlayer
- end
- end
- local function CameraAim()
- UpdateTarget()
- local target = AimAssist.Settings.StickyMode and AimAssist.LockedPlayer or AimAssist.TempTarget
- if target then
- local basePos = GetValidTargetPosition(target)
- if basePos then
- local aimPos = basePos + CalculatePrediction(target)
- Camera.CFrame = CFrame.new(Camera.CFrame.Position, aimPos):Lerp(
- Camera.CFrame, AimAssist.Settings.Smoothness
- )
- end
- end
- end
- local function MouseAim()
- UpdateTarget()
- local target = AimAssist.Settings.StickyMode and AimAssist.LockedPlayer or AimAssist.TempTarget
- if not target or not target.Character then return end
- local basePos = GetValidTargetPosition(target)
- if not basePos then return end
- local aimPos = basePos + CalculatePrediction(target)
- local screenPos, onScreen = Camera:WorldToViewportPoint(aimPos)
- if onScreen and screenPos.Z > 0 then
- local mousePos = UserInputService:GetMouseLocation()
- local delta = (Vector2.new(screenPos.X, screenPos.Y) - mousePos)
- local smoothFactor = math.clamp(AimAssist.Settings.Smoothness * 0.1, 0.01, 0.2)
- mousemoverel(
- math.clamp(delta.X * smoothFactor, -12, 12),
- math.clamp(delta.Y * smoothFactor, -12, 12)
- )
- end
- end
- RunService.RenderStepped:Connect(function()
- if not AimAssist.Settings.Enabled or not IsKeyPressed() then
- AimAssist.TempTarget = nil
- if not AimAssist.Settings.StickyMode then
- AimAssist.LockedPlayer = nil
- end
- return
- end
- if AimAssist.Mode == "Camera" then
- CameraAim()
- else
- MouseAim()
- end
- end)
- print(string.format([[
- [Aim Assist Ultimate Loaded]
- Mode: %s | Key: %s | Part: %s
- Sticky: %s | Predict: %s
- FOV: %d° | Smooth: %.2f
- ]],
- AimAssist.Mode,
- AimAssist.AimKey,
- AimAssist.HitPart,
- AimAssist.Settings.StickyMode and "ON" or "OFF",
- AimAssist.Settings.Predict.Enabled and "ON" or "OFF",
- AimAssist.Settings.FOV,
- AimAssist.Settings.Smoothness
- ))
- local fov_circle = Drawing.new("Circle")
- fov_circle.Thickness = 1
- fov_circle.NumSides = 100
- fov_circle.Radius = 100
- fov_circle.Filled = false
- fov_circle.Visible = true
- fov_circle.ZIndex = 999
- fov_circle.Transparency = 1
- fov_circle.Color = Color3.fromRGB(255, 255, 255)
- local fov_circle_outline_outer = Drawing.new("Circle")
- fov_circle_outline_outer.Thickness = 1
- fov_circle_outline_outer.NumSides = 100
- fov_circle_outline_outer.Radius = fov_circle.Radius + 2
- fov_circle_outline_outer.Filled = false
- fov_circle_outline_outer.Visible = true
- fov_circle_outline_outer.ZIndex = 998
- fov_circle_outline_outer.Transparency = 0.8
- fov_circle_outline_outer.Color = Color3.fromRGB(0, 0, 0)
- local fov_circle_outline_inner = Drawing.new("Circle")
- fov_circle_outline_inner.Thickness = 1
- fov_circle_outline_inner.NumSides = 100
- fov_circle_outline_inner.Radius = fov_circle.Radius - 1
- fov_circle_outline_inner.Filled = false
- fov_circle_outline_inner.Visible = true
- fov_circle_outline_inner.ZIndex = 1000
- fov_circle_outline_inner.Transparency = 0.8
- fov_circle_outline_inner.Color = Color3.fromRGB(0, 0, 0)
- local FieldOfViewBOX = Tabs.Maintab:AddRightGroupbox('fov visible') do
- FieldOfViewBOX:AddToggle("Visible", {Text = "show fov"}):AddColorPicker("Color", {Default = Color3.fromRGB(146, 193, 255)}):OnChanged(function()
- fov_circle.Visible = Toggles.Visible.Value
- SilentAimSettings.FOVVisible = Toggles.Visible.Value
- end)
- FieldOfViewBOX:AddSlider("Radius", {
- Text = "fov size",
- Min = 0,
- Max = 360,
- Default = 100,
- Rounding = 0
- }):OnChanged(function(value)
- fov_circle.Radius = value
- SilentAimSettings.FOVRadius = value
- fov_circle_outline_outer.Radius = fov_circle.Radius + 2
- fov_circle_outline_inner.Radius = fov_circle.Radius - 1
- end)
- end
- resume(create(function()
- RenderStepped:Connect(function()
- if Toggles.aim_Enabled.Value then
- if getClosestPlayer() then
- local Root = getClosestPlayer().Parent.PrimaryPart or getClosestPlayer()
- local RootToViewportPoint, IsOnScreen = WorldToViewportPoint(Camera, Root.Position)
- end
- end
- if Toggles.Visible.Value then
- local mousePos = getMousePosition()
- fov_circle.Visible = true
- fov_circle_outline_outer.Visible = true
- fov_circle_outline_inner.Visible = true
- fov_circle.Color = Options.Color.Value
- fov_circle.Position = mousePos
- fov_circle_outline_outer.Position = mousePos
- fov_circle_outline_inner.Position = mousePos
- else
- fov_circle.Visible = false
- fov_circle_outline_outer.Visible = false
- fov_circle_outline_inner.Visible = false
- end
- end)
- end))
- --//Visuals Tab
- local espGroupBox = Tabs.esptab:AddLeftGroupbox('players')
- espGroupBox:AddToggle('esp', {
- Text = 'enable',
- Default = false,
- Tooltip = false,
- Callback = function(Value)
- getgenv().esp.renderdistance = 1000
- getgenv().esp.enabled = Value
- end
- })
- --//Box
- espGroupBox:AddToggle('box', {
- Text = 'box',
- Default = false,
- Tooltip = false,
- Callback = function(Value)
- getgenv().esp.box = Value
- end
- }):AddColorPicker("boxcolor", {
- Title = "Box Color",
- Default = Color3.fromRGB(255, 255, 255),
- Callback = function(Value)
- getgenv().esp.boxcolor = Value
- end
- }):AddColorPicker("boxoutline_color", {
- Title = "Box Outline",
- Default = Color3.fromRGB(0, 0, 0),
- Callback = function(Value)
- getgenv().esp.boxoutline = Value
- end
- })
- --//Name
- espGroupBox:AddToggle('name', {
- Text = 'name',
- Default = false,
- Tooltip = false,
- Callback = function(Value)
- getgenv().esp.name = Value
- end
- }):AddColorPicker("boxcolor", {
- Title = "Name Color",
- Default = Color3.fromRGB(255, 255, 255),
- Callback = function(Value)
- getgenv().esp.namecolor = Value
- end
- }):AddColorPicker("boxoutline_color", {
- Title = "Name Outline",
- Default = Color3.fromRGB(0, 0, 0),
- Callback = function(Value)
- getgenv().esp.nameoutline = Value
- end
- })
- --//Chams
- espGroupBox:AddToggle('chams', {
- Text = 'chams',
- Default = false,
- Tooltip = false,
- Callback = function(Value)
- getgenv().esp.chams = Value
- end
- }):AddColorPicker("boxcolor", {
- Title = "Chams Color",
- Default = Color3.fromRGB(255, 255, 255),
- Callback = function(Value)
- getgenv().esp.chamscolor = Value
- end
- }):AddColorPicker("boxoutline_color", {
- Title = "Chams Outline",
- Default = Color3.fromRGB(0, 0, 0),
- Callback = function(Value)
- getgenv().esp.chamsoutline = Value
- end
- })
- --//Health bar
- espGroupBox:AddToggle('health_bar', {
- Text = 'health bar',
- Default = false,
- Tooltip = false,
- Callback = function(Value)
- getgenv().esp.health = Value
- end
- }):AddColorPicker("boxcolor", {
- Title = "Health bar Color",
- Default = Color3.fromRGB(0,255,0),
- Callback = function(Value)
- getgenv().esp.healthcolor = Value
- end
- }):AddColorPicker("boxoutline_color", {
- Title = "Health bar Outline",
- Default = Color3.fromRGB(0,0,0),
- Callback = function(Value)
- getgenv().esp.healthoutline = Value
- end
- })
- --//Health bar text
- espGroupBox:AddToggle('health_bar_text', {
- Text = 'health bar text',
- Default = false,
- Tooltip = false,
- Callback = function(Value)
- getgenv().esp.healthbartext = Value
- end
- }):AddColorPicker("boxcolor", {
- Title = "Health text Color",
- Default = Color3.fromRGB(0,255,0),
- Callback = function(Value)
- getgenv().esp.healthbartextcolor = Value
- end
- }):AddColorPicker("boxoutline_color", {
- Title = "Health text Outline",
- Default = Color3.fromRGB(0,0,0),
- Callback = function(Value)
- getgenv().esp.healthbartextoutline = Value
- end
- })
- --//esp settings
- local espGroupBox2 = Tabs.esptab:AddLeftGroupbox('esp settings')
- espGroupBox2:AddToggle('use_displayname', {
- Text = 'display name',
- Default = false,
- Tooltip = false,
- Callback = function(Value)
- getgenv().esp.useDisplayName = Value
- end
- })
- espGroupBox2:AddSlider('name_font_size', {
- Text = 'name font size',
- Default = 12,
- Min = 8,
- Max = 20,
- Rounding = 1,
- Compact = false,
- Callback = function(Value)
- getgenv().esp.nameFontSize = Value
- for player, drawingInstances in pairs(esp.players) do
- if drawingInstances and drawingInstances.Name then
- drawingInstances.Name.Size = Value
- end
- end
- end
- })
- espGroupBox2:AddSlider('name_font_size', {
- Text = 'health font size',
- Default = 12,
- Min = 8,
- Max = 20,
- Rounding = 1,
- Compact = false,
- Callback = function(Value)
- getgenv().esp.healthFontSize = Value
- for player, drawingInstances in pairs(esp.players) do
- if drawingInstances and drawingInstances.HealthText then
- drawingInstances.HealthText.Size = Value
- end
- end
- end
- })
- --//esp distance
- espGroupBox2:AddSlider('esp_distance', {
- Text = 'distance',
- Default = 1000,
- Min = 100,
- Max = 10000,
- Rounding = 1,
- Compact = false,
- Callback = function(Value)
- getgenv().esp.renderdistance = Value
- end
- })
- --//aspect Ratio
- local flags = {
- aspect_ratio = { toggle = false },
- ratio_x = { value = 100 },
- ratio_y = { value = 100 }
- }
- local original_newindex
- original_newindex = hookmetamethod(game, "__newindex", function(self, index, value)
- if not checkcaller() and self == camera then
- if index == "CFrame" and flags.aspect_ratio.toggle then
- local scale_x = flags.ratio_x.value / 100
- local scale_y = flags.ratio_y.value / 100
- local stretch_matrix = CFrame.new(
- 0, 0, 0,
- scale_x, 0, 0,
- 0, scale_y, 0,
- 0, 0, 1
- )
- return original_newindex(self, index, value * stretch_matrix)
- end
- end
- return original_newindex(self, index, value)
- end)
- local worldGroupBox2 = Tabs.esptab:AddRightGroupbox('camera')
- worldGroupBox2:AddSlider('aspect_ratio_x', {
- Text = 'aspect ratio x',
- Default = 100,
- Min = 1,
- Max = 100,
- Rounding = 1,
- Compact = false,
- Callback = function(Value)
- flags.ratio_x.value = Value
- end
- })
- worldGroupBox2:AddSlider('aspect_ratio_y', {
- Text = 'aspect ratio Y',
- Default = 100,
- Min = 1,
- Max = 100,
- Rounding = 1,
- Compact = false,
- Callback = function(Value)
- flags.ratio_y.value = Value
- end
- })
- worldGroupBox2:AddToggle('aspect_ratio_toggle', {
- Text = 'aspect Ratio',
- Default = false,
- Tooltip = 'Toggle aspect ratio scaling',
- Callback = function(Value)
- flags.aspect_ratio.toggle = Value
- end
- })
- --//Walk speed
- local miscGroupBox2 = Tabs.esptab:AddRightGroupbox('walkspeed')
- local Player = game:GetService("Players").LocalPlayer
- local defaultWalkSpeed = 16
- getgenv().WalkSpeedSettings = {
- Enabled = false,
- Value = 100
- }
- if Player.Character and Player.Character:FindFirstChild("Humanoid") then
- defaultWalkSpeed = Player.Character.Humanoid.WalkSpeed
- end
- local function updateWalkSpeed()
- if Player.Character and Player.Character:FindFirstChild("Humanoid") then
- Player.Character.Humanoid.WalkSpeed =
- getgenv().WalkSpeedSettings.Enabled and getgenv().WalkSpeedSettings.Value or defaultWalkSpeed
- end
- end
- -- 4. 创建主Toggle
- local WalkSpeedToggle = miscGroupBox2:AddToggle("walkspeed_toggle", {
- Text = "enable(only 'V')",
- Default = false,
- Callback = function(Value)
- getgenv().WalkSpeedSettings.Enabled = Value
- updateWalkSpeed()
- end
- })
- -- 5. 添加按键绑定(关键修复部分)
- local KeyPicker = WalkSpeedToggle:AddKeyPicker("walkspeed_key", {
- Default = "V",
- Mode = "Toggle", -- 切换模式
- Text = "walk speed",
- NoUI = false
- })
- -- 6. 确保按键能切换状态(兼容所有库的写法)
- local function handleKeyPress()
- local newState = not getgenv().WalkSpeedSettings.Enabled
- getgenv().WalkSpeedSettings.Enabled = newState
- -- 更新Toggle显示
- if WalkSpeedToggle.SetValue then
- pcall(function() WalkSpeedToggle:SetValue(newState) end)
- elseif WalkSpeedToggle.SetState then
- pcall(function() WalkSpeedToggle:SetState(newState) end)
- end
- updateWalkSpeed()
- end
- if KeyPicker.OnClick then
- KeyPicker:OnClick(handleKeyPress)
- elseif KeyPicker.SetCallback then
- KeyPicker:SetCallback(handleKeyPress)
- else
- game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
- if not gameProcessed and input.KeyCode == Enum.KeyCode.V then
- handleKeyPress()
- end
- end)
- end
- miscGroupBox2:AddSlider('walkspeed_value', {
- Text = 'walkspeed',
- Default = 100,
- Min = 16,
- Max = 500,
- Rounding = 1,
- Callback = function(Value)
- getgenv().WalkSpeedSettings.Value = Value
- if getgenv().WalkSpeedSettings.Enabled then
- updateWalkSpeed()
- end
- end
- })
- local function setupWalkSpeed()
- if Player.Character and Player.Character:FindFirstChild("Humanoid") then
- Player.Character.Humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function()
- if getgenv().WalkSpeedSettings.Enabled then
- Player.Character.Humanoid.WalkSpeed = getgenv().WalkSpeedSettings.Value
- end
- end)
- updateWalkSpeed()
- end
- end
- setupWalkSpeed()
- Player.CharacterAdded:Connect(function(character)
- character:WaitForChild("Humanoid")
- setupWalkSpeed()
- end)
- local oldNamecall
- oldNamecall = hookmetamethod(game, "__namecall", newcclosure(function(...)
- local Method = getnamecallmethod()
- local Arguments = {...}
- local self = Arguments[1]
- local chance = CalculateChance(SilentAimSettings.HitChance)
- if Toggles.aim_Enabled.Value and self == workspace and not checkcaller() and chance == true then
- if Method == "FindPartOnRayWithIgnoreList" and Options.Method.Value == Method then
- if ValidateArguments(Arguments, ExpectedArguments.FindPartOnRayWithIgnoreList) then
- local A_Ray = Arguments[2]
- local HitPart = getClosestPlayer()
- if HitPart then
- local Origin = A_Ray.Origin
- local Direction = getDirection(Origin, HitPart.Position)
- Arguments[2] = Ray.new(Origin, Direction)
- return oldNamecall(unpack(Arguments))
- end
- end
- elseif Method == "FindPartOnRayWithWhitelist" and Options.Method.Value == Method then
- if ValidateArguments(Arguments, ExpectedArguments.FindPartOnRayWithWhitelist) then
- local A_Ray = Arguments[2]
- local HitPart = getClosestPlayer()
- if HitPart then
- local Origin = A_Ray.Origin
- local Direction = getDirection(Origin, HitPart.Position)
- Arguments[2] = Ray.new(Origin, Direction)
- return oldNamecall(unpack(Arguments))
- end
- end
- elseif (Method == "FindPartOnRay" or Method == "findPartOnRay") and Options.Method.Value:lower() == Method:lower() then
- if ValidateArguments(Arguments, ExpectedArguments.FindPartOnRay) then
- local A_Ray = Arguments[2]
- local HitPart = getClosestPlayer()
- if HitPart then
- local Origin = A_Ray.Origin
- local Direction = getDirection(Origin, HitPart.Position)
- Arguments[2] = Ray.new(Origin, Direction)
- return oldNamecall(unpack(Arguments))
- end
- end
- elseif Method == "Raycast" and Options.Method.Value == Method then
- if ValidateArguments(Arguments, ExpectedArguments.Raycast) then
- local A_Origin = Arguments[2]
- local HitPart = getClosestPlayer()
- if HitPart then
- Arguments[3] = getDirection(A_Origin, HitPart.Position)
- return oldNamecall(unpack(Arguments))
- end
- end
- end
- end
- return oldNamecall(...)
- end))
- local oldIndex = nil
- oldIndex = hookmetamethod(game, "__index", newcclosure(function(self, Index)
- if self == Mouse and not checkcaller() and Toggles.aim_Enabled.Value and Options.Method.Value == "Mouse.Hit/Target" and getClosestPlayer() then
- local HitPart = getClosestPlayer()
- if Index == "Target" or Index == "target" then
- return HitPart
- elseif Index == "Hit" or Index == "hit" then
- return ((Toggles.Prediction.Value and (HitPart.CFrame + (HitPart.Velocity * PredictionAmount))) or (not Toggles.Prediction.Value and HitPart.CFrame))
- elseif Index == "X" or Index == "x" then
- return self.X
- elseif Index == "Y" or Index == "y" then
- return self.Y
- elseif Index == "UnitRay" then
- return Ray.new(self.Origin, (self.Hit - self.Origin).Unit)
- end
- end
- return oldIndex(self, Index)
- end))
- Library:SetWatermarkVisibility(true)
- local FrameTimer = tick()
- local FrameCounter = 0;
- local FPS = 60;
- local WatermarkConnection = game:GetService('RunService').RenderStepped:Connect(function()
- FrameCounter += 1;
- if (tick() - FrameTimer) >= 1 then
- FPS = FrameCounter;
- FrameTimer = tick();
- FrameCounter = 0;
- end;
- Library:SetWatermark(('vision | %s fps | %s ms'):format(
- math.floor(FPS),
- math.floor(game:GetService('Stats').Network.ServerStatsItem['Data Ping']:GetValue())
- ));
- end);
- Library.KeybindFrame.Visible = true; -- todo: add a function for this
- Library:OnUnload(function()
- WatermarkConnection:Disconnect()
- local TeleportService = game:GetService("TeleportService")
- local localPlayer = Players.LocalPlayer
- local function rejoinServer()
- local placeId = game.PlaceId
- local jobId = game.JobId
- local success, err = pcall(function()
- TeleportService:TeleportToPlaceInstance(placeId, jobId, localPlayer)
- end)
- if not success then
- warn("", err)
- TeleportService:Teleport(placeId, localPlayer)
- end
- end
- rejoinServer()
- Library.Unloaded = true
- end)
- local MenuGroup2 = Tabs['UI Settings']:AddRightGroupbox('Menu')
- MenuGroup2:AddToggle("KeybindMenuOpen", { Default = false, Text = "Open Keybind Menu", Callback = function(value) Library.KeybindFrame.Visible = value end})
- MenuGroup2:AddButton('Unload(rejoin)', function() Library:Unload() end)
- MenuGroup2:AddLabel('Menu bind'):AddKeyPicker('MenuKeybind', { Default = 'End', NoUI = true, Text = 'Menu keybind' })
- Library.ToggleKeybind = Options.MenuKeybind -- Allows you to have a custom keybind for the menu
- ThemeManager:SetLibrary(Library)
- SaveManager:SetLibrary(Library)
- SaveManager:IgnoreThemeSettings()
- SaveManager:SetIgnoreIndexes({ 'MenuKeybind' })
- ThemeManager:SetFolder('vison')
- SaveManager:SetFolder('vision/specific-game')
- SaveManager:BuildConfigSection(Tabs['UI Settings'])
- ThemeManager:ApplyToTab(Tabs['UI Settings'])
- SaveManager:LoadAutoloadConfig()
Add Comment
Please, Sign In to add comment