Advertisement
ViperSoftware

State Of Anarchy Viper.GG 1.0

Nov 28th, 2024
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.05 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. if not player.Character or not player.Character:FindFirstChild("HumanoidRootPart") then return end
  81.  
  82. local character = player.Character
  83. local rootPart = character:FindFirstChild("HumanoidRootPart")
  84. local humanoid = character:FindFirstChild("Humanoid")
  85.  
  86. -- ESP Object
  87. local ESP = {}
  88.  
  89. -- Box Outline
  90. ESP.Box = Drawing.new("Square")
  91. ESP.Box.Color = Color3.fromRGB(255, 0, 0) -- Red for enemies
  92. ESP.Box.Thickness = 2
  93. ESP.Box.Transparency = 1
  94. ESP.Box.Filled = false
  95.  
  96. -- Player Name
  97. ESP.Name = Drawing.new("Text")
  98. ESP.Name.Text = player.Name
  99. ESP.Name.Color = Color3.fromRGB(255, 255, 255)
  100. ESP.Name.Size = 14 -- Smaller Text
  101. ESP.Name.Outline = true
  102.  
  103. -- Health Text
  104. ESP.Health = Drawing.new("Text")
  105. ESP.Health.Color = Color3.fromRGB(0, 255, 0) -- Green
  106. ESP.Health.Size = 12 -- Smaller Text
  107. ESP.Health.Outline = true
  108.  
  109. -- Distance Text
  110. ESP.Distance = Drawing.new("Text")
  111. ESP.Distance.Color = Color3.fromRGB(255, 255, 0) -- Yellow
  112. ESP.Distance.Size = 12 -- Smaller Text
  113. ESP.Distance.Outline = true
  114.  
  115. -- Add ESP to Table
  116. ESPObjects[player] = ESP
  117.  
  118. -- Update Function
  119. game:GetService("RunService").RenderStepped:Connect(function()
  120. 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
  121. if ESPObjects[player] then
  122. ESPObjects[player].Box:Remove()
  123. ESPObjects[player].Name:Remove()
  124. ESPObjects[player].Health:Remove()
  125. ESPObjects[player].Distance:Remove()
  126. ESPObjects[player] = nil
  127. end
  128. return
  129. end
  130.  
  131. local screenPos, onScreen = workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position)
  132. if onScreen then
  133. -- Update Box Position and Size
  134. local size = (workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position + Vector3.new(3, 3, 0)) - workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position - Vector3.new(3, 3, 0))).X
  135. ESP.Box.Size = Vector2.new(size, size * 2)
  136. ESP.Box.Position = Vector2.new(screenPos.X - size / 2, screenPos.Y - size)
  137.  
  138. -- Update Text Positions with Spacing
  139. ESP.Name.Position = Vector2.new(screenPos.X, screenPos.Y - size - 20) -- Name is at the top
  140. ESP.Health.Position = Vector2.new(screenPos.X, screenPos.Y - size - 5) -- Health is below Name
  141. ESP.Distance.Position = Vector2.new(screenPos.X, screenPos.Y + size + 5) -- Distance is below the Box
  142.  
  143. -- Update Text Values
  144. ESP.Health.Text = "Health: " .. math.floor(humanoid.Health)
  145. ESP.Distance.Text = "Distance: " .. math.floor((rootPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude) .. " studs"
  146.  
  147. -- Show ESP
  148. ESP.Box.Visible = true
  149. ESP.Name.Visible = true
  150. ESP.Health.Visible = true
  151. ESP.Distance.Visible = true
  152. else
  153. -- Hide ESP
  154. ESP.Box.Visible = false
  155. ESP.Name.Visible = false
  156. ESP.Health.Visible = false
  157. ESP.Distance.Visible = false
  158. end
  159. end)
  160. end
  161.  
  162. -- Function to Clear All ESP
  163. local function clearESP()
  164. for _, esp in pairs(ESPObjects) do
  165. if esp.Box then esp.Box:Remove() end
  166. if esp.Name then esp.Name:Remove() end
  167. if esp.Health then esp.Health:Remove() end
  168. if esp.Distance then esp.Distance:Remove() end
  169. end
  170. ESPObjects = {}
  171. end
  172.  
  173. -- Function to Toggle ESP
  174. local function toggleESP(state)
  175. ESPEnabled = state
  176. if ESPEnabled then
  177. -- Create ESP for All Players
  178. for _, player in pairs(game:GetService("Players"):GetPlayers()) do
  179. if player ~= game.Players.LocalPlayer then
  180. createESP(player)
  181. end
  182. end
  183.  
  184. -- Handle New Players
  185. game:GetService("Players").PlayerAdded:Connect(function(player)
  186. player.CharacterAdded:Connect(function()
  187. if ESPEnabled then
  188. createESP(player)
  189. end
  190. end)
  191. end)
  192. else
  193. clearESP()
  194. end
  195. end
  196.  
  197. -- GUI Integration
  198. ESPSection:AddToggle({
  199. Name = "Enable ESP",
  200. Default = false,
  201. Callback = function(state)
  202. toggleESP(state)
  203. end
  204. })
  205.  
  206. -- Variables
  207. local AimbotEnabled = false
  208. local FOV = 100 -- Default FOV size
  209. local Smoothness = 0.2 -- Default smoothness
  210. local AimbotKey = Enum.UserInputType.MouseButton2 -- Default key (Right Mouse Button)
  211. local HoldingKey = false -- Tracks whether the key is being held
  212. local FOVCircle
  213.  
  214. -- Function to Create FOV Circle
  215. local function createFOVCircle()
  216. FOVCircle = Drawing.new("Circle")
  217. FOVCircle.Color = Color3.fromRGB(255, 255, 0) -- Yellow FOV Circle
  218. FOVCircle.Thickness = 2
  219. FOVCircle.Transparency = 1
  220. FOVCircle.Radius = FOV
  221. FOVCircle.Filled = false
  222. FOVCircle.Visible = false -- Start as hidden
  223. end
  224.  
  225. createFOVCircle()
  226.  
  227. -- Function to Find Closest Target
  228. local function getClosestTarget()
  229. local closestTarget = nil
  230. local closestDistance = FOV
  231. local localPlayer = game.Players.LocalPlayer
  232. local camera = workspace.CurrentCamera
  233.  
  234. for _, player in pairs(game:GetService("Players"):GetPlayers()) do
  235. if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") and player.Character:FindFirstChild("Humanoid") then
  236. local screenPos, onScreen = camera:WorldToViewportPoint(player.Character.HumanoidRootPart.Position)
  237. local mousePos = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2) -- Center of screen
  238. local distance = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
  239.  
  240. if onScreen and distance < closestDistance and player.Character.Humanoid.Health > 0 then
  241. closestDistance = distance
  242. closestTarget = player.Character.HumanoidRootPart
  243. end
  244. end
  245. end
  246.  
  247. return closestTarget
  248. end
  249.  
  250. -- Smooth Aiming Function
  251. local function smoothAim(target)
  252. local camera = workspace.CurrentCamera
  253. local mousePos = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2) -- Center of screen
  254. local targetScreenPos = camera:WorldToViewportPoint(target.Position)
  255.  
  256. local aimPos = Vector2.new(targetScreenPos.X, targetScreenPos.Y)
  257. local newAimPos = mousePos:Lerp(aimPos, Smoothness)
  258.  
  259. mousemoverel(newAimPos.X - mousePos.X, newAimPos.Y - mousePos.Y)
  260. end
  261.  
  262. -- Aimbot Update Function
  263. game:GetService("RunService").RenderStepped:Connect(function()
  264. if AimbotEnabled and HoldingKey then
  265. FOVCircle.Visible = true
  266. FOVCircle.Position = Vector2.new(workspace.CurrentCamera.ViewportSize.X / 2, workspace.CurrentCamera.ViewportSize.Y / 2)
  267.  
  268. local target = getClosestTarget()
  269. if target then
  270. smoothAim(target)
  271. end
  272. else
  273. FOVCircle.Visible = false
  274. end
  275. end)
  276.  
  277. -- Key Input Handling
  278. game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
  279. if input.UserInputType == AimbotKey and not gameProcessed then
  280. HoldingKey = true
  281. end
  282. end)
  283.  
  284. game:GetService("UserInputService").InputEnded:Connect(function(input, gameProcessed)
  285. if input.UserInputType == AimbotKey and not gameProcessed then
  286. HoldingKey = false
  287. end
  288. end)
  289.  
  290. -- GUI Integration
  291. local AimbotSection = MainTab:AddSection({Name = "Aimbot"})
  292.  
  293. AimbotSection:AddToggle({
  294. Name = "Enable Aimbot",
  295. Default = false,
  296. Callback = function(state)
  297. AimbotEnabled = state
  298. end
  299. })
  300.  
  301. AimbotSection:AddSlider({
  302. Name = "FOV Size",
  303. Min = 50,
  304. Max = 500,
  305. Default = 100,
  306. Color = Color3.fromRGB(255, 255, 0),
  307. Increment = 1,
  308. ValueName = "FOV",
  309. Callback = function(value)
  310. FOV = value
  311. FOVCircle.Radius = FOV
  312. end
  313. })
  314.  
  315. AimbotSection:AddSlider({
  316. Name = "Smoothness",
  317. Min = 0.1,
  318. Max = 1,
  319. Default = 0.2,
  320. Color = Color3.fromRGB(255, 255, 255),
  321. Increment = 0.01,
  322. ValueName = "Smoothness",
  323. Callback = function(value)
  324. Smoothness = value
  325. end
  326. })
  327.  
  328. AimbotSection:AddDropdown({
  329. Name = "Aimbot Key",
  330. Default = "Right Mouse Button",
  331. Options = {"Right Mouse Button", "Left Shift", "E", "Q"},
  332. Callback = function(selected)
  333. if selected == "Right Mouse Button" then
  334. AimbotKey = Enum.UserInputType.MouseButton2
  335. elseif selected == "Left Shift" then
  336. AimbotKey = Enum.KeyCode.LeftShift
  337. elseif selected == "E" then
  338. AimbotKey = Enum.KeyCode.E
  339. elseif selected == "Q" then
  340. AimbotKey = Enum.KeyCode.Q
  341. end
  342. end
  343. })
  344.  
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement