Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Load OrionLib
- local OrionLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/shlexware/Orion/main/source"))()
- -- Create the GUI Window
- local Window = OrionLib:MakeWindow({
- Name = "Viper.gg SOA",
- HidePremium = false,
- SaveConfig = true,
- ConfigFolder = "OrionTest"
- })
- -- Create Tabs
- local MainTab = Window:MakeTab({Name = "Main", Icon = "rbxassetid://4483345998", PremiumOnly = false})
- local PlayerTab = Window:MakeTab({Name = "Player", Icon = "rbxassetid://4483345998", PremiumOnly = false})
- local SettingsTab = Window:MakeTab({Name = "Settings", Icon = "rbxassetid://4483345998", PremiumOnly = false})
- -- Add Sections
- local ESPSection = MainTab:AddSection({Name = "ESP"})
- local FarmSection = MainTab:AddSection({Name = "Auto-Farm"})
- local MovementSection = PlayerTab:AddSection({Name = "Movement"})
- local MiscSection = SettingsTab:AddSection({Name = "Miscellaneous"})
- -- Add Basic Toggles and Sliders for Testing
- ESPSection:AddToggle({
- Name = "Toggle ESP",
- Default = false,
- Callback = function(state)
- if state then
- print("ESP Enabled")
- else
- print("ESP Disabled")
- end
- end
- })
- FarmSection:AddToggle({
- Name = "Auto-Farm",
- Default = false,
- Callback = function(state)
- if state then
- print("Auto-Farm Enabled")
- else
- print("Auto-Farm Disabled")
- end
- end
- })
- MovementSection:AddSlider({
- Name = "Walk Speed",
- Min = 16,
- Max = 100,
- Default = 16,
- Color = Color3.fromRGB(255, 255, 255),
- Increment = 1,
- ValueName = "Speed",
- Callback = function(value)
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = value
- print("Walk Speed Set To:", value)
- end
- })
- MiscSection:AddButton({
- Name = "Reset Walk Speed",
- Callback = function()
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
- print("Walk Speed Reset to Default")
- end
- })
- -- Initialize OrionLib
- OrionLib:Init()
- -- Variables
- local ESPEnabled = false
- local ESPObjects = {}
- -- Function to Create ESP for a Player
- local function createESP(player)
- -- Make sure the player has a character
- local function setupCharacter(character)
- if not character:FindFirstChild("HumanoidRootPart") or not character:FindFirstChild("Humanoid") then
- -- Wait for essential parts to load
- character:WaitForChild("HumanoidRootPart")
- character:WaitForChild("Humanoid")
- end
- -- ESP Object
- local ESP = {}
- -- Box Outline
- ESP.Box = Drawing.new("Square")
- ESP.Box.Color = Color3.fromRGB(255, 0, 0) -- Red for enemies
- ESP.Box.Thickness = 2
- ESP.Box.Transparency = 1
- ESP.Box.Filled = false
- -- Player Name
- ESP.Name = Drawing.new("Text")
- ESP.Name.Text = player.Name
- ESP.Name.Color = Color3.fromRGB(255, 255, 255)
- ESP.Name.Size = 14
- ESP.Name.Outline = true
- -- Health Text
- ESP.Health = Drawing.new("Text")
- ESP.Health.Color = Color3.fromRGB(0, 255, 0) -- Green
- ESP.Health.Size = 12
- ESP.Health.Outline = true
- -- Distance Text
- ESP.Distance = Drawing.new("Text")
- ESP.Distance.Color = Color3.fromRGB(255, 255, 0) -- Yellow
- ESP.Distance.Size = 12
- ESP.Distance.Outline = true
- -- Add ESP to the table
- ESPObjects[player] = ESP
- -- Update ESP on RenderStepped
- local updateConnection
- updateConnection = game:GetService("RunService").RenderStepped:Connect(function()
- -- Remove ESP if the player is no longer valid
- if not ESPEnabled or not player.Character or not player.Character:FindFirstChild("HumanoidRootPart") or not player.Character:FindFirstChild("Humanoid") or player.Character.Humanoid.Health <= 0 then
- if ESPObjects[player] then
- ESPObjects[player].Box:Remove()
- ESPObjects[player].Name:Remove()
- ESPObjects[player].Health:Remove()
- ESPObjects[player].Distance:Remove()
- ESPObjects[player] = nil
- end
- updateConnection:Disconnect() -- Disconnect the update loop
- return
- end
- -- Update ESP positions and visibility
- local rootPart = character:FindFirstChild("HumanoidRootPart")
- local humanoid = character:FindFirstChild("Humanoid")
- local screenPos, onScreen = workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position)
- if onScreen then
- -- Update Box Position and Size
- local size = (workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position + Vector3.new(3, 3, 0)) - workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position - Vector3.new(3, 3, 0))).X
- ESP.Box.Size = Vector2.new(size, size * 2)
- ESP.Box.Position = Vector2.new(screenPos.X - size / 2, screenPos.Y - size)
- -- Update Text Positions with spacing
- ESP.Name.Position = Vector2.new(screenPos.X, screenPos.Y - size - 20) -- Name is at the top
- ESP.Health.Position = Vector2.new(screenPos.X, screenPos.Y - size - 5) -- Health is below Name
- ESP.Distance.Position = Vector2.new(screenPos.X, screenPos.Y + size + 5) -- Distance is below the Box
- -- Update Text Values
- ESP.Health.Text = "Health: " .. math.floor(humanoid.Health)
- ESP.Distance.Text = "Distance: " .. math.floor((rootPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude) .. " studs"
- -- Show ESP
- ESP.Box.Visible = true
- ESP.Name.Visible = true
- ESP.Health.Visible = true
- ESP.Distance.Visible = true
- else
- -- Hide ESP
- ESP.Box.Visible = false
- ESP.Name.Visible = false
- ESP.Health.Visible = false
- ESP.Distance.Visible = false
- end
- end)
- end
- -- Handle case where player already has a character
- if player.Character then
- setupCharacter(player.Character)
- end
- -- Listen for the player's character being added
- player.CharacterAdded:Connect(setupCharacter)
- end
- -- Function to Clear ESP for All Players
- local function clearESP()
- for _, esp in pairs(ESPObjects) do
- if esp.Box then esp.Box:Remove() end
- if esp.Name then esp.Name:Remove() end
- if esp.Health then esp.Health:Remove() end
- if esp.Distance then esp.Distance:Remove() end
- end
- ESPObjects = {}
- end
- -- Function to Toggle ESP
- local function toggleESP(state)
- ESPEnabled = state
- if ESPEnabled then
- -- Create ESP for existing players
- for _, player in pairs(game:GetService("Players"):GetPlayers()) do
- if player ~= game.Players.LocalPlayer then
- createESP(player)
- end
- end
- -- Listen for new players
- game:GetService("Players").PlayerAdded:Connect(function(player)
- createESP(player)
- end)
- -- Handle players leaving
- game:GetService("Players").PlayerRemoving:Connect(function(player)
- if ESPObjects[player] then
- ESPObjects[player].Box:Remove()
- ESPObjects[player].Name:Remove()
- ESPObjects[player].Health:Remove()
- ESPObjects[player].Distance:Remove()
- ESPObjects[player] = nil
- end
- end)
- else
- clearESP()
- end
- end
- -- GUI Integration
- ESPSection:AddToggle({
- Name = "Enable ESP",
- Default = false,
- Callback = function(state)
- toggleESP(state)
- end
- })
- -- Variables
- local AimbotEnabled = false
- local FOV = 100 -- Default FOV size
- local Smoothness = 0.2 -- Default smoothness
- local AimbotKey = Enum.UserInputType.MouseButton2 -- Default key (Right Mouse Button)
- local HoldingKey = false -- Tracks whether the key is being held
- local FOVCircle
- -- Function to Create FOV Circle
- local function createFOVCircle()
- FOVCircle = Drawing.new("Circle")
- FOVCircle.Color = Color3.fromRGB(255, 255, 0) -- Yellow FOV Circle
- FOVCircle.Thickness = 2
- FOVCircle.Transparency = 1
- FOVCircle.Radius = FOV
- FOVCircle.Filled = false
- FOVCircle.Visible = false -- Start as hidden
- end
- createFOVCircle()
- -- Function to Find Closest Target
- local function getClosestTarget()
- local closestTarget = nil
- local closestDistance = FOV
- local localPlayer = game.Players.LocalPlayer
- local camera = workspace.CurrentCamera
- for _, player in pairs(game:GetService("Players"):GetPlayers()) do
- if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") and player.Character:FindFirstChild("Humanoid") then
- local screenPos, onScreen = camera:WorldToViewportPoint(player.Character.HumanoidRootPart.Position)
- local mousePos = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2) -- Center of screen
- local distance = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
- if onScreen and distance < closestDistance and player.Character.Humanoid.Health > 0 then
- closestDistance = distance
- closestTarget = player.Character.HumanoidRootPart
- end
- end
- end
- return closestTarget
- end
- -- Smooth Aiming Function
- local function smoothAim(target)
- local camera = workspace.CurrentCamera
- local mousePos = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2) -- Center of screen
- local targetScreenPos = camera:WorldToViewportPoint(target.Position)
- local aimPos = Vector2.new(targetScreenPos.X, targetScreenPos.Y)
- local newAimPos = mousePos:Lerp(aimPos, Smoothness)
- mousemoverel(newAimPos.X - mousePos.X, newAimPos.Y - mousePos.Y)
- end
- -- Aimbot Update Function
- game:GetService("RunService").RenderStepped:Connect(function()
- if AimbotEnabled and HoldingKey then
- FOVCircle.Visible = true
- FOVCircle.Position = Vector2.new(workspace.CurrentCamera.ViewportSize.X / 2, workspace.CurrentCamera.ViewportSize.Y / 2)
- local target = getClosestTarget()
- if target then
- smoothAim(target)
- end
- else
- FOVCircle.Visible = false
- end
- end)
- -- Key Input Handling
- game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
- if input.UserInputType == AimbotKey and not gameProcessed then
- HoldingKey = true
- end
- end)
- game:GetService("UserInputService").InputEnded:Connect(function(input, gameProcessed)
- if input.UserInputType == AimbotKey and not gameProcessed then
- HoldingKey = false
- end
- end)
- -- GUI Integration
- local AimbotSection = MainTab:AddSection({Name = "Aimbot"})
- AimbotSection:AddToggle({
- Name = "Enable Aimbot",
- Default = false,
- Callback = function(state)
- AimbotEnabled = state
- end
- })
- AimbotSection:AddSlider({
- Name = "FOV Size",
- Min = 50,
- Max = 500,
- Default = 100,
- Color = Color3.fromRGB(255, 255, 0),
- Increment = 1,
- ValueName = "FOV",
- Callback = function(value)
- FOV = value
- FOVCircle.Radius = FOV
- end
- })
- AimbotSection:AddSlider({
- Name = "Smoothness",
- Min = 0.1,
- Max = 1,
- Default = 0.2,
- Color = Color3.fromRGB(255, 255, 255),
- Increment = 0.01,
- ValueName = "Smoothness",
- Callback = function(value)
- Smoothness = value
- end
- })
- AimbotSection:AddDropdown({
- Name = "Aimbot Key",
- Default = "Right Mouse Button",
- Options = {"Right Mouse Button", "Left Shift", "E", "Q"},
- Callback = function(selected)
- if selected == "Right Mouse Button" then
- AimbotKey = Enum.UserInputType.MouseButton2
- elseif selected == "Left Shift" then
- AimbotKey = Enum.KeyCode.LeftShift
- elseif selected == "E" then
- AimbotKey = Enum.KeyCode.E
- elseif selected == "Q" then
- AimbotKey = Enum.KeyCode.Q
- end
- end
- })
- -- Function to Enable Fly
- local function enableFly()
- Character = game.Players.LocalPlayer.Character
- if not Character or not Character:FindFirstChild("HumanoidRootPart") then return end
- Humanoid = Character:FindFirstChild("Humanoid")
- -- Prevent character from falling
- Humanoid.PlatformStand = true
- -- Disable collisions
- for _, part in pairs(Character:GetDescendants()) do
- if part:IsA("BasePart") then
- part.CanCollide = false
- end
- end
- -- Create BodyGyro and BodyVelocity
- BodyGyro = Instance.new("BodyGyro")
- BodyGyro.P = 9e4
- BodyGyro.CFrame = Character.HumanoidRootPart.CFrame
- BodyGyro.MaxTorque = Vector3.new(9e9, 9e9, 9e9)
- BodyGyro.Parent = Character.HumanoidRootPart
- BodyVelocity = Instance.new("BodyVelocity")
- BodyVelocity.Velocity = Vector3.zero
- BodyVelocity.MaxForce = Vector3.new(9e9, 9e9, 9e9)
- BodyVelocity.Parent = Character.HumanoidRootPart
- FlyEnabled = true
- end
- -- Function to Disable Fly
- local function disableFly()
- if not FlyEnabled then return end
- -- Restore character state
- if BodyGyro then BodyGyro:Destroy() end
- if BodyVelocity then BodyVelocity:Destroy() end
- if Humanoid then Humanoid.PlatformStand = false end
- -- Re-enable collisions
- for _, part in pairs(Character:GetDescendants()) do
- if part:IsA("BasePart") then
- part.CanCollide = true
- end
- end
- FlyEnabled = false
- end
- -- Handle Fly Movement
- game:GetService("RunService").Stepped:Connect(function()
- if FlyEnabled and Character and Character:FindFirstChild("HumanoidRootPart") then
- local moveDirection = Vector3.zero
- local camera = workspace.CurrentCamera
- -- Move with W, A, S, D
- if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.W) then
- moveDirection += camera.CFrame.LookVector
- end
- if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.S) then
- moveDirection -= camera.CFrame.LookVector
- end
- if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.A) then
- moveDirection -= camera.CFrame.RightVector
- end
- if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.D) then
- moveDirection += camera.CFrame.RightVector
- end
- -- Elevate with Space and Shift
- if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.Space) then
- moveDirection += Vector3.new(0, 1, 0)
- end
- if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftShift) then
- moveDirection -= Vector3.new(0, 1, 0)
- end
- -- Apply Movement
- if moveDirection.Magnitude > 0 then
- BodyGyro.CFrame = camera.CFrame
- BodyVelocity.Velocity = moveDirection.Unit * FlySpeed
- else
- BodyVelocity.Velocity = Vector3.zero
- end
- end
- end)
- -- GUI Integration
- local MovementSection = PlayerTab:AddSection({Name = "Movement"})
- -- Fly Toggle
- MovementSection:AddToggle({
- Name = "Enable Fly",
- Default = false,
- Callback = function(state)
- if state then
- enableFly()
- else
- disableFly()
- end
- end
- })
- -- Fly Speed Slider
- MovementSection:AddSlider({
- Name = "Fly Speed",
- Min = 10,
- Max = 200,
- Default = 50,
- Color = Color3.fromRGB(255, 255, 255),
- Increment = 1,
- ValueName = "Speed",
- Callback = function(value)
- FlySpeed = value
- end
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement