Advertisement
ViperSoftware

State Of Anarchy Viper.GG 2.0

Nov 30th, 2024
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.85 KB | None | 0 0
  1. -- Load OrionLib
  2. local OrionLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/shlexware/Orion/main/source"))()
  3.  
  4. -- Create the GUI Window
  5. local Window = OrionLib:MakeWindow({
  6. Name = "Viper.gg SOA",
  7. HidePremium = false,
  8. SaveConfig = true,
  9. ConfigFolder = "OrionTest"
  10. })
  11.  
  12. -- Create Tabs
  13. local MainTab = Window:MakeTab({Name = "Main", Icon = "rbxassetid://4483345998", PremiumOnly = false})
  14. local PlayerTab = Window:MakeTab({Name = "Player", Icon = "rbxassetid://4483345998", PremiumOnly = false})
  15. local SettingsTab = Window:MakeTab({Name = "Settings", Icon = "rbxassetid://4483345998", PremiumOnly = false})
  16.  
  17. -- Add Sections
  18. local ESPSection = MainTab:AddSection({Name = "ESP"})
  19. local FarmSection = MainTab:AddSection({Name = "Auto-Farm"})
  20. local MovementSection = PlayerTab:AddSection({Name = "Movement"})
  21. local MiscSection = SettingsTab:AddSection({Name = "Miscellaneous"})
  22.  
  23. -- Add Basic Toggles and Sliders for Testing
  24. ESPSection:AddToggle({
  25. Name = "Toggle ESP",
  26. Default = false,
  27. Callback = function(state)
  28. if state then
  29. print("ESP Enabled")
  30. else
  31. print("ESP Disabled")
  32. end
  33. end
  34. })
  35.  
  36. FarmSection:AddToggle({
  37. Name = "Auto-Farm",
  38. Default = false,
  39. Callback = function(state)
  40. if state then
  41. print("Auto-Farm Enabled")
  42. else
  43. print("Auto-Farm Disabled")
  44. end
  45. end
  46. })
  47.  
  48. MovementSection:AddSlider({
  49. Name = "Walk Speed",
  50. Min = 16,
  51. Max = 100,
  52. Default = 16,
  53. Color = Color3.fromRGB(255, 255, 255),
  54. Increment = 1,
  55. ValueName = "Speed",
  56. Callback = function(value)
  57. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = value
  58. print("Walk Speed Set To:", value)
  59. end
  60. })
  61.  
  62. MiscSection:AddButton({
  63. Name = "Reset Walk Speed",
  64. Callback = function()
  65. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  66. print("Walk Speed Reset to Default")
  67. end
  68. })
  69.  
  70. -- Initialize OrionLib
  71. OrionLib:Init()
  72.  
  73.  
  74. -- Variables
  75. local ESPEnabled = false
  76. local ESPObjects = {}
  77.  
  78. -- Function to Create ESP for a Player
  79. local function createESP(player)
  80. -- Make sure the player has a character
  81. local function setupCharacter(character)
  82. if not character:FindFirstChild("HumanoidRootPart") or not character:FindFirstChild("Humanoid") then
  83. -- Wait for essential parts to load
  84. character:WaitForChild("HumanoidRootPart")
  85. character:WaitForChild("Humanoid")
  86. end
  87.  
  88. -- ESP Object
  89. local ESP = {}
  90.  
  91. -- Box Outline
  92. ESP.Box = Drawing.new("Square")
  93. ESP.Box.Color = Color3.fromRGB(255, 0, 0) -- Red for enemies
  94. ESP.Box.Thickness = 2
  95. ESP.Box.Transparency = 1
  96. ESP.Box.Filled = false
  97.  
  98. -- Player Name
  99. ESP.Name = Drawing.new("Text")
  100. ESP.Name.Text = player.Name
  101. ESP.Name.Color = Color3.fromRGB(255, 255, 255)
  102. ESP.Name.Size = 14
  103. ESP.Name.Outline = true
  104.  
  105. -- Health Text
  106. ESP.Health = Drawing.new("Text")
  107. ESP.Health.Color = Color3.fromRGB(0, 255, 0) -- Green
  108. ESP.Health.Size = 12
  109. ESP.Health.Outline = true
  110.  
  111. -- Distance Text
  112. ESP.Distance = Drawing.new("Text")
  113. ESP.Distance.Color = Color3.fromRGB(255, 255, 0) -- Yellow
  114. ESP.Distance.Size = 12
  115. ESP.Distance.Outline = true
  116.  
  117. -- Add ESP to the table
  118. ESPObjects[player] = ESP
  119.  
  120. -- Update ESP on RenderStepped
  121. local updateConnection
  122. updateConnection = game:GetService("RunService").RenderStepped:Connect(function()
  123. -- Remove ESP if the player is no longer valid
  124. 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
  125. if ESPObjects[player] then
  126. ESPObjects[player].Box:Remove()
  127. ESPObjects[player].Name:Remove()
  128. ESPObjects[player].Health:Remove()
  129. ESPObjects[player].Distance:Remove()
  130. ESPObjects[player] = nil
  131. end
  132. updateConnection:Disconnect() -- Disconnect the update loop
  133. return
  134. end
  135.  
  136. -- Update ESP positions and visibility
  137. local rootPart = character:FindFirstChild("HumanoidRootPart")
  138. local humanoid = character:FindFirstChild("Humanoid")
  139. local screenPos, onScreen = workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position)
  140. if onScreen then
  141. -- Update Box Position and Size
  142. local size = (workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position + Vector3.new(3, 3, 0)) - workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position - Vector3.new(3, 3, 0))).X
  143. ESP.Box.Size = Vector2.new(size, size * 2)
  144. ESP.Box.Position = Vector2.new(screenPos.X - size / 2, screenPos.Y - size)
  145.  
  146. -- Update Text Positions with spacing
  147. ESP.Name.Position = Vector2.new(screenPos.X, screenPos.Y - size - 20) -- Name is at the top
  148. ESP.Health.Position = Vector2.new(screenPos.X, screenPos.Y - size - 5) -- Health is below Name
  149. ESP.Distance.Position = Vector2.new(screenPos.X, screenPos.Y + size + 5) -- Distance is below the Box
  150.  
  151. -- Update Text Values
  152. ESP.Health.Text = "Health: " .. math.floor(humanoid.Health)
  153. ESP.Distance.Text = "Distance: " .. math.floor((rootPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude) .. " studs"
  154.  
  155. -- Show ESP
  156. ESP.Box.Visible = true
  157. ESP.Name.Visible = true
  158. ESP.Health.Visible = true
  159. ESP.Distance.Visible = true
  160. else
  161. -- Hide ESP
  162. ESP.Box.Visible = false
  163. ESP.Name.Visible = false
  164. ESP.Health.Visible = false
  165. ESP.Distance.Visible = false
  166. end
  167. end)
  168. end
  169.  
  170. -- Handle case where player already has a character
  171. if player.Character then
  172. setupCharacter(player.Character)
  173. end
  174.  
  175. -- Listen for the player's character being added
  176. player.CharacterAdded:Connect(setupCharacter)
  177. end
  178.  
  179. -- Function to Clear ESP for All Players
  180. local function clearESP()
  181. for _, esp in pairs(ESPObjects) do
  182. if esp.Box then esp.Box:Remove() end
  183. if esp.Name then esp.Name:Remove() end
  184. if esp.Health then esp.Health:Remove() end
  185. if esp.Distance then esp.Distance:Remove() end
  186. end
  187. ESPObjects = {}
  188. end
  189.  
  190. -- Function to Toggle ESP
  191. local function toggleESP(state)
  192. ESPEnabled = state
  193. if ESPEnabled then
  194. -- Create ESP for existing players
  195. for _, player in pairs(game:GetService("Players"):GetPlayers()) do
  196. if player ~= game.Players.LocalPlayer then
  197. createESP(player)
  198. end
  199. end
  200.  
  201. -- Listen for new players
  202. game:GetService("Players").PlayerAdded:Connect(function(player)
  203. createESP(player)
  204. end)
  205.  
  206. -- Handle players leaving
  207. game:GetService("Players").PlayerRemoving:Connect(function(player)
  208. if ESPObjects[player] then
  209. ESPObjects[player].Box:Remove()
  210. ESPObjects[player].Name:Remove()
  211. ESPObjects[player].Health:Remove()
  212. ESPObjects[player].Distance:Remove()
  213. ESPObjects[player] = nil
  214. end
  215. end)
  216. else
  217. clearESP()
  218. end
  219. end
  220.  
  221. -- GUI Integration
  222. ESPSection:AddToggle({
  223. Name = "Enable ESP",
  224. Default = false,
  225. Callback = function(state)
  226. toggleESP(state)
  227. end
  228. })
  229.  
  230.  
  231. -- Variables
  232. local AimbotEnabled = false
  233. local FOV = 100 -- Default FOV size
  234. local Smoothness = 0.2 -- Default smoothness
  235. local AimbotKey = Enum.UserInputType.MouseButton2 -- Default key (Right Mouse Button)
  236. local HoldingKey = false -- Tracks whether the key is being held
  237. local FOVCircle
  238.  
  239. -- Function to Create FOV Circle
  240. local function createFOVCircle()
  241. FOVCircle = Drawing.new("Circle")
  242. FOVCircle.Color = Color3.fromRGB(255, 255, 0) -- Yellow FOV Circle
  243. FOVCircle.Thickness = 2
  244. FOVCircle.Transparency = 1
  245. FOVCircle.Radius = FOV
  246. FOVCircle.Filled = false
  247. FOVCircle.Visible = false -- Start as hidden
  248. end
  249.  
  250. createFOVCircle()
  251.  
  252. -- Function to Find Closest Target
  253. local function getClosestTarget()
  254. local closestTarget = nil
  255. local closestDistance = FOV
  256. local localPlayer = game.Players.LocalPlayer
  257. local camera = workspace.CurrentCamera
  258.  
  259. for _, player in pairs(game:GetService("Players"):GetPlayers()) do
  260. if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") and player.Character:FindFirstChild("Humanoid") then
  261. local screenPos, onScreen = camera:WorldToViewportPoint(player.Character.HumanoidRootPart.Position)
  262. local mousePos = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2) -- Center of screen
  263. local distance = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
  264.  
  265. if onScreen and distance < closestDistance and player.Character.Humanoid.Health > 0 then
  266. closestDistance = distance
  267. closestTarget = player.Character.HumanoidRootPart
  268. end
  269. end
  270. end
  271.  
  272. return closestTarget
  273. end
  274.  
  275. -- Smooth Aiming Function
  276. local function smoothAim(target)
  277. local camera = workspace.CurrentCamera
  278. local mousePos = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2) -- Center of screen
  279. local targetScreenPos = camera:WorldToViewportPoint(target.Position)
  280.  
  281. local aimPos = Vector2.new(targetScreenPos.X, targetScreenPos.Y)
  282. local newAimPos = mousePos:Lerp(aimPos, Smoothness)
  283.  
  284. mousemoverel(newAimPos.X - mousePos.X, newAimPos.Y - mousePos.Y)
  285. end
  286.  
  287. -- Aimbot Update Function
  288. game:GetService("RunService").RenderStepped:Connect(function()
  289. if AimbotEnabled and HoldingKey then
  290. FOVCircle.Visible = true
  291. FOVCircle.Position = Vector2.new(workspace.CurrentCamera.ViewportSize.X / 2, workspace.CurrentCamera.ViewportSize.Y / 2)
  292.  
  293. local target = getClosestTarget()
  294. if target then
  295. smoothAim(target)
  296. end
  297. else
  298. FOVCircle.Visible = false
  299. end
  300. end)
  301.  
  302. -- Key Input Handling
  303. game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
  304. if input.UserInputType == AimbotKey and not gameProcessed then
  305. HoldingKey = true
  306. end
  307. end)
  308.  
  309. game:GetService("UserInputService").InputEnded:Connect(function(input, gameProcessed)
  310. if input.UserInputType == AimbotKey and not gameProcessed then
  311. HoldingKey = false
  312. end
  313. end)
  314.  
  315. -- GUI Integration
  316. local AimbotSection = MainTab:AddSection({Name = "Aimbot"})
  317.  
  318. AimbotSection:AddToggle({
  319. Name = "Enable Aimbot",
  320. Default = false,
  321. Callback = function(state)
  322. AimbotEnabled = state
  323. end
  324. })
  325.  
  326. AimbotSection:AddSlider({
  327. Name = "FOV Size",
  328. Min = 50,
  329. Max = 500,
  330. Default = 100,
  331. Color = Color3.fromRGB(255, 255, 0),
  332. Increment = 1,
  333. ValueName = "FOV",
  334. Callback = function(value)
  335. FOV = value
  336. FOVCircle.Radius = FOV
  337. end
  338. })
  339.  
  340. AimbotSection:AddSlider({
  341. Name = "Smoothness",
  342. Min = 0.1,
  343. Max = 1,
  344. Default = 0.2,
  345. Color = Color3.fromRGB(255, 255, 255),
  346. Increment = 0.01,
  347. ValueName = "Smoothness",
  348. Callback = function(value)
  349. Smoothness = value
  350. end
  351. })
  352.  
  353. AimbotSection:AddDropdown({
  354. Name = "Aimbot Key",
  355. Default = "Right Mouse Button",
  356. Options = {"Right Mouse Button", "Left Shift", "E", "Q"},
  357. Callback = function(selected)
  358. if selected == "Right Mouse Button" then
  359. AimbotKey = Enum.UserInputType.MouseButton2
  360. elseif selected == "Left Shift" then
  361. AimbotKey = Enum.KeyCode.LeftShift
  362. elseif selected == "E" then
  363. AimbotKey = Enum.KeyCode.E
  364. elseif selected == "Q" then
  365. AimbotKey = Enum.KeyCode.Q
  366. end
  367. end
  368. })
  369.  
  370. -- Function to Enable Fly
  371. local function enableFly()
  372. Character = game.Players.LocalPlayer.Character
  373. if not Character or not Character:FindFirstChild("HumanoidRootPart") then return end
  374. Humanoid = Character:FindFirstChild("Humanoid")
  375.  
  376. -- Prevent character from falling
  377. Humanoid.PlatformStand = true
  378.  
  379. -- Disable collisions
  380. for _, part in pairs(Character:GetDescendants()) do
  381. if part:IsA("BasePart") then
  382. part.CanCollide = false
  383. end
  384. end
  385.  
  386. -- Create BodyGyro and BodyVelocity
  387. BodyGyro = Instance.new("BodyGyro")
  388. BodyGyro.P = 9e4
  389. BodyGyro.CFrame = Character.HumanoidRootPart.CFrame
  390. BodyGyro.MaxTorque = Vector3.new(9e9, 9e9, 9e9)
  391. BodyGyro.Parent = Character.HumanoidRootPart
  392.  
  393. BodyVelocity = Instance.new("BodyVelocity")
  394. BodyVelocity.Velocity = Vector3.zero
  395. BodyVelocity.MaxForce = Vector3.new(9e9, 9e9, 9e9)
  396. BodyVelocity.Parent = Character.HumanoidRootPart
  397.  
  398. FlyEnabled = true
  399. end
  400.  
  401. -- Function to Disable Fly
  402. local function disableFly()
  403. if not FlyEnabled then return end
  404.  
  405. -- Restore character state
  406. if BodyGyro then BodyGyro:Destroy() end
  407. if BodyVelocity then BodyVelocity:Destroy() end
  408. if Humanoid then Humanoid.PlatformStand = false end
  409.  
  410. -- Re-enable collisions
  411. for _, part in pairs(Character:GetDescendants()) do
  412. if part:IsA("BasePart") then
  413. part.CanCollide = true
  414. end
  415. end
  416.  
  417. FlyEnabled = false
  418. end
  419.  
  420. -- Handle Fly Movement
  421. game:GetService("RunService").Stepped:Connect(function()
  422. if FlyEnabled and Character and Character:FindFirstChild("HumanoidRootPart") then
  423. local moveDirection = Vector3.zero
  424. local camera = workspace.CurrentCamera
  425.  
  426. -- Move with W, A, S, D
  427. if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.W) then
  428. moveDirection += camera.CFrame.LookVector
  429. end
  430. if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.S) then
  431. moveDirection -= camera.CFrame.LookVector
  432. end
  433. if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.A) then
  434. moveDirection -= camera.CFrame.RightVector
  435. end
  436. if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.D) then
  437. moveDirection += camera.CFrame.RightVector
  438. end
  439.  
  440. -- Elevate with Space and Shift
  441. if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.Space) then
  442. moveDirection += Vector3.new(0, 1, 0)
  443. end
  444. if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftShift) then
  445. moveDirection -= Vector3.new(0, 1, 0)
  446. end
  447.  
  448. -- Apply Movement
  449. if moveDirection.Magnitude > 0 then
  450. BodyGyro.CFrame = camera.CFrame
  451. BodyVelocity.Velocity = moveDirection.Unit * FlySpeed
  452. else
  453. BodyVelocity.Velocity = Vector3.zero
  454. end
  455. end
  456. end)
  457.  
  458. -- GUI Integration
  459. local MovementSection = PlayerTab:AddSection({Name = "Movement"})
  460.  
  461. -- Fly Toggle
  462. MovementSection:AddToggle({
  463. Name = "Enable Fly",
  464. Default = false,
  465. Callback = function(state)
  466. if state then
  467. enableFly()
  468. else
  469. disableFly()
  470. end
  471. end
  472. })
  473.  
  474. -- Fly Speed Slider
  475. MovementSection:AddSlider({
  476. Name = "Fly Speed",
  477. Min = 10,
  478. Max = 200,
  479. Default = 50,
  480. Color = Color3.fromRGB(255, 255, 255),
  481. Increment = 1,
  482. ValueName = "Speed",
  483. Callback = function(value)
  484. FlySpeed = value
  485. end
  486. })
  487.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement