Advertisement
ViperSoftware

Street Shootout Viper.gg V2

Nov 29th, 2024
2,392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.11 KB | None | 0 0
  1. -- Global Toggles
  2. _G.ESPEnabled = true -- Toggle ESP on/off
  3. _G.AimbotEnabled = true -- Toggle Aimbot on/off
  4.  
  5. -- Services
  6. local Players = game:GetService("Players")
  7. local RunService = game:GetService("RunService")
  8. local UserInputService = game:GetService("UserInputService")
  9. local Camera = game.Workspace.CurrentCamera
  10.  
  11. --Speed Hack
  12. -- Default WalkSpeed
  13. local defaultWalkSpeed = 16 -- Standard Roblox walk speed
  14. local customWalkSpeed = defaultWalkSpeed -- Adjustable speed
  15.  
  16. -- Function to set walk speed
  17. local function setWalkSpeed(speed)
  18. if Players.LocalPlayer.Character and Players.LocalPlayer.Character:FindFirstChild("Humanoid") then
  19. Players.LocalPlayer.Character.Humanoid.WalkSpeed = speed
  20. end
  21. end
  22.  
  23. -- Update walk speed continuously (in case character respawns)
  24. RunService.Heartbeat:Connect(function()
  25. if Players.LocalPlayer.Character and Players.LocalPlayer.Character:FindFirstChild("Humanoid") then
  26. Players.LocalPlayer.Character.Humanoid.WalkSpeed = customWalkSpeed
  27. end
  28. end)
  29.  
  30. -- List of Locations
  31. local locations = {
  32. {Name = "Nearest ATM", PartName = "MoneyShooter", Offset = Vector3.new(0, 0, -3)}, -- ATM teleport
  33. {Name = "Nearest Cash Register", PartName = "MoveToPart", ParentModel = "CounterWithCash", Offset = Vector3.new(0, 0, -3)}, -- Cash Register teleport
  34. {Name = "Criminal Base", PartName = "TeleportPart1", ParentModel = "CriminalBase_InteractingModel", Offset = Vector3.new(0, 0, 0)}, -- Criminal Teleport
  35. }
  36.  
  37. -- Function to find the nearest location
  38. local function findNearestLocation(partName, parentModel)
  39. local nearestPart = nil
  40. local shortestDistance = math.huge
  41.  
  42. for _, obj in ipairs(workspace:GetDescendants()) do
  43. if parentModel then
  44. -- Look for specific parent model (e.g., CounterWithCash)
  45. if obj:IsA("Model") and obj.Name == parentModel then
  46. local targetPart = obj:FindFirstChild(partName)
  47. if targetPart and targetPart:IsA("BasePart") then
  48. local distance = (Players.LocalPlayer.Character.HumanoidRootPart.Position - targetPart.Position).Magnitude
  49. if distance < shortestDistance then
  50. nearestPart = targetPart
  51. shortestDistance = distance
  52. end
  53. end
  54. end
  55. else
  56. -- Look for parts directly
  57. if obj:IsA("BasePart") and obj.Name == partName then
  58. local distance = (Players.LocalPlayer.Character.HumanoidRootPart.Position - obj.Position).Magnitude
  59. if distance < shortestDistance then
  60. nearestPart = obj
  61. shortestDistance = distance
  62. end
  63. end
  64. end
  65. end
  66.  
  67. return nearestPart
  68. end
  69.  
  70. -- Function to teleport the player
  71. local function teleportTo(part, offset)
  72. if part and Players.LocalPlayer.Character and Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
  73. local targetPosition = part.Position + offset -- Use only the Vector3 position
  74. Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(targetPosition)
  75. print("Teleported to:", part.Name)
  76. else
  77. print("Failed to teleport. Part not found.")
  78. end
  79. end
  80.  
  81.  
  82. -- Settings
  83. local FOV = 100 -- Field of View for aimbot targeting
  84. local Smoothness = 0.2 -- Controls how smooth the aimbot is (lower is faster)
  85. local AimPart = "Head" -- Body part to aim at (e.g., "Head", "Torso")
  86. local BulletSpeed = 1000 -- Bullet travel speed (game-specific)
  87. local Gravity = Vector3.new(0, -196.2, 0) -- Gravity, typically Roblox standard
  88.  
  89. -- Store all ESP highlights for cleanup
  90. local ESPInstances = {}
  91.  
  92. -- Drawing API for FOV circle
  93. local FOVCircle = Drawing.new("Circle")
  94. FOVCircle.Visible = true
  95. FOVCircle.Color = Color3.new(1, 1, 1) -- White color
  96. FOVCircle.Thickness = 2
  97. FOVCircle.Transparency = 1
  98. FOVCircle.Filled = false
  99.  
  100. -- Function to update FOV circle position and size
  101. local function updateFOVCircle()
  102. local mousePos = UserInputService:GetMouseLocation()
  103. FOVCircle.Position = mousePos
  104. FOVCircle.Radius = FOV
  105. end
  106.  
  107. -- Function to create ESP
  108. local function addESP(player)
  109. if not _G.ESPEnabled then return end
  110.  
  111. -- Ensure the player has a character
  112. if player ~= Players.LocalPlayer and player.Character then
  113. local highlight = Instance.new("Highlight")
  114. highlight.Adornee = player.Character
  115. highlight.Parent = player.Character
  116. highlight.FillColor = Color3.new(1, 0, 0) -- Red for enemies
  117. highlight.OutlineColor = Color3.new(1, 1, 1) -- White outline
  118. highlight.FillTransparency = 0.5
  119. highlight.OutlineTransparency = 0
  120.  
  121. -- Store for cleanup
  122. ESPInstances[player] = highlight
  123. end
  124. end
  125.  
  126. -- Cleanup ESP for a player
  127. local function removeESP(player)
  128. if ESPInstances[player] then
  129. ESPInstances[player]:Destroy()
  130. ESPInstances[player] = nil
  131. end
  132. end
  133.  
  134. -- Add ESP for all current players
  135. for _, player in ipairs(Players:GetPlayers()) do
  136. if player.Character then
  137. addESP(player)
  138. end
  139.  
  140. -- Listen for respawn (CharacterAdded)
  141. player.CharacterAdded:Connect(function()
  142. if _G.ESPEnabled then
  143. wait(0.1) -- Small delay to ensure character is fully loaded
  144. removeESP(player) -- Clean up any existing ESP
  145. addESP(player) -- Reapply ESP
  146. end
  147. end)
  148. end
  149.  
  150. -- Add ESP for new players
  151. Players.PlayerAdded:Connect(function(player)
  152. player.CharacterAdded:Connect(function()
  153. if _G.ESPEnabled then
  154. wait(0.1) -- Small delay to ensure character is fully loaded
  155. addESP(player)
  156. end
  157. end)
  158. end)
  159.  
  160. -- Monitor Kill Switch (Optional Cleanup)
  161. RunService.Heartbeat:Connect(function()
  162. if not _G.ESPEnabled then
  163. -- Destroy all ESP highlights and clear the table
  164. for _, instance in pairs(ESPInstances) do
  165. if instance and instance.Parent then
  166. instance:Destroy()
  167. end
  168. end
  169. ESPInstances = {}
  170. print("ESP Disabled and Cleaned Up")
  171. end
  172. end)
  173.  
  174. -- Function to calculate the closest player to the crosshair
  175. local function getClosestPlayer()
  176. local closestPlayer = nil
  177. local shortestDistance = FOV -- Use the current FOV value from the slider
  178.  
  179. for _, player in ipairs(Players:GetPlayers()) do
  180. if player ~= Players.LocalPlayer and player.Character and player.Character:FindFirstChild(AimPart) then
  181. local part = player.Character[AimPart]
  182. local screenPosition, onScreen = Camera:WorldToViewportPoint(part.Position)
  183.  
  184. if onScreen then
  185. local mousePos = UserInputService:GetMouseLocation()
  186. local distance = (Vector2.new(screenPosition.X, screenPosition.Y) - mousePos).Magnitude
  187.  
  188. if distance < shortestDistance then
  189. closestPlayer = player
  190. shortestDistance = distance
  191. end
  192. end
  193. end
  194. end
  195.  
  196. return closestPlayer
  197. end
  198.  
  199. -- Function to calculate bullet prediction
  200. local function getPredictedPosition(targetPart, targetVelocity, distance)
  201. local travelTime = distance / BulletSpeed
  202.  
  203. -- Predict future position based on velocity and gravity
  204. local futurePosition = targetPart.Position + (targetVelocity * travelTime) + (0.5 * Gravity * travelTime^2)
  205. return futurePosition
  206. end
  207.  
  208. -- Aimbot Functionality
  209. RunService.RenderStepped:Connect(function()
  210. if _G.AimbotEnabled then
  211. local target = getClosestPlayer()
  212.  
  213. if target and target.Character and target.Character:FindFirstChild(AimPart) then
  214. local targetPart = target.Character[AimPart]
  215. local targetVelocity = target.Character:FindFirstChild("HumanoidRootPart") and target.Character.HumanoidRootPart.Velocity or Vector3.zero
  216. local distance = (Camera.CFrame.Position - targetPart.Position).Magnitude
  217.  
  218. -- Calculate predicted position
  219. local predictedPosition = getPredictedPosition(targetPart, targetVelocity, distance)
  220.  
  221. -- Smoothly adjust the camera to the predicted position using the current Smoothness value
  222. local newPosition = Camera.CFrame.Position:Lerp(predictedPosition, Smoothness)
  223. Camera.CFrame = CFrame.new(Camera.CFrame.Position, newPosition)
  224. end
  225. end
  226.  
  227. -- Update FOV circle position and size
  228. updateFOVCircle()
  229. end)
  230.  
  231. -- Load Orion Library
  232. local OrionLib = loadstring(game:HttpGet(('https://raw.githubusercontent.com/shlexware/Orion/main/source')))()
  233.  
  234. -- Create the main window
  235. local Window = OrionLib:MakeWindow({Name = "Viper.GG Street Shootout", HidePremium = false, SaveConfig = true, ConfigFolder = "StreetShootout"})
  236.  
  237. -- Tabs
  238. local MainTab = Window:MakeTab({
  239. Name = "Main",
  240. Icon = "rbxassetid://4483345998",
  241. PremiumOnly = false
  242. })
  243.  
  244. -- Create a new "Misc" tab
  245. local MiscTab = Window:MakeTab({
  246. Name = "Misc",
  247. Icon = "rbxassetid://4483345998", -- Replace this with any suitable icon
  248. PremiumOnly = false
  249. })
  250. -- Create a Teleport Tab in the GUI
  251. local TeleportTab = Window:MakeTab({
  252. Name = "Teleport",
  253. Icon = "rbxassetid://4483345998", -- Replace with any suitable icon
  254. PremiumOnly = false
  255. })
  256.  
  257. -- Speed Slider in Orion GUI
  258. MainTab:AddSlider({
  259. Name = "Walk Speed",
  260. Min = 16,
  261. Max = 100,
  262. Default = defaultWalkSpeed,
  263. Color = Color3.fromRGB(255, 255, 255),
  264. Increment = 1,
  265. ValueName = "Speed",
  266. Callback = function(value)
  267. customWalkSpeed = value -- Update the walk speed
  268. setWalkSpeed(customWalkSpeed) -- Apply the new speed
  269. end
  270. })
  271.  
  272. -- Add Buttons for Each Location Telport
  273. for _, location in ipairs(locations) do
  274. TeleportTab:AddButton({
  275. Name = location.Name,
  276. Callback = function()
  277. local nearestPart = findNearestLocation(location.PartName, location.ParentModel)
  278. if nearestPart then
  279. teleportTo(nearestPart, location.Offset)
  280. else
  281. print(location.Name .. " not found!")
  282. end
  283. end
  284. })
  285. end
  286.  
  287. -- Toggles for Aimbot and ESP
  288. MainTab:AddToggle({
  289. Name = "Enable ESP",
  290. Default = _G.ESPEnabled,
  291. Callback = function(value)
  292. _G.ESPEnabled = value
  293. if not value then
  294. -- Cleanup ESP when toggled off
  295. for _, instance in pairs(ESPInstances) do
  296. if instance and instance.Parent then
  297. instance:Destroy()
  298. end
  299. end
  300. ESPInstances = {}
  301. end
  302. end
  303. })
  304.  
  305. MainTab:AddToggle({
  306. Name = "Enable Aimbot",
  307. Default = _G.AimbotEnabled,
  308. Callback = function(value)
  309. _G.AimbotEnabled = value
  310. end
  311. })
  312.  
  313. -- Sliders for Aimbot FOV and Smoothness
  314. MainTab:AddSlider({
  315. Name = "Aimbot FOV",
  316. Min = 50,
  317. Max = 200,
  318. Default = FOV,
  319. Color = Color3.fromRGB(255, 255, 255),
  320. Increment = 1,
  321. ValueName = "FOV",
  322. Callback = function(value)
  323. FOV = value -- Update the global FOV setting
  324. updateFOVCircle() -- Update the circle size
  325. end
  326. })
  327.  
  328. MainTab:AddSlider({
  329. Name = "Aimbot Smoothness",
  330. Min = 0.1,
  331. Max = 1,
  332. Default = Smoothness,
  333. Color = Color3.fromRGB(255, 255, 255),
  334. Increment = 0.05,
  335. ValueName = "Smoothness",
  336. Callback = function(value)
  337. Smoothness = value -- Update the global Smoothness setting
  338. end
  339. })
  340.  
  341. -- Dropdown for Aimbot Target Part
  342. MainTab:AddDropdown({
  343. Name = "Aimbot Target Part",
  344. Default = AimPart,
  345. Options = {"Head", "Torso"},
  346. Callback = function(value)
  347. AimPart = value
  348. end
  349. })
  350.  
  351. -- Button to execute a kill switch for ESP
  352. MainTab:AddButton({
  353. Name = "Kill ESP Highlights",
  354. Callback = function()
  355. for _, instance in pairs(ESPInstances) do
  356. if instance and instance.Parent then
  357. instance:Destroy()
  358. end
  359. end
  360. ESPInstances = {}
  361. print("ESP highlights killed.")
  362. end
  363. })
  364.  
  365. -- Initialize Orion
  366. OrionLib:Init()
  367.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement