MoneyLmaoooo

script gng

Feb 4th, 2025
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.61 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local RunService = game:GetService("RunService")
  3. local LocalPlayer = Players.LocalPlayer
  4. local Mouse = game.Players.LocalPlayer:GetMouse()
  5. local CamlockState = false
  6. local Prediction = 0.165771
  7.  
  8. function FindNearestEnemy()
  9. local ClosestDistance, ClosestPlayer = math.huge, nil
  10. local CenterPosition = Vector2.new(game:GetService("GuiService"):GetScreenResolution().X / 2, game:GetService("GuiService"):GetScreenResolution().Y / 2)
  11.  
  12. for _, Player in ipairs(game:GetService("Players"):GetPlayers()) do
  13. if Player ~= LocalPlayer then
  14. local Character = Player.Character
  15. if Character and Character:FindFirstChild("HumanoidRootPart") and Character.Humanoid.Health > 0 then
  16. local Position, IsVisibleOnViewport = game:GetService("Workspace").CurrentCamera:WorldToViewportPoint(Character.HumanoidRootPart.Position)
  17. if IsVisibleOnViewport then
  18. local Distance = (CenterPosition - Vector2.new(Position.X, Position.Y)).Magnitude
  19. if Distance < ClosestDistance then
  20. ClosestPlayer = Character.HumanoidRootPart
  21. ClosestDistance = Distance
  22. end
  23. end
  24. end
  25. end
  26. end
  27.  
  28. return ClosestPlayer
  29. end
  30.  
  31. local enemy = nil
  32.  
  33. -- Function to aim the camera at the nearest enemy's HumanoidRootPart
  34. RunService.Heartbeat:Connect(function()
  35. if CamlockState == true then
  36. if enemy then
  37. local camera = workspace.CurrentCamera
  38. camera.CFrame = CFrame.new(camera.CFrame.p, enemy.Position + enemy.Velocity * Prediction)
  39. end
  40. end
  41. end)
  42.  
  43. local Wowo = Instance.new("ScreenGui")
  44. local Frame = Instance.new("Frame")
  45. local UICorner = Instance.new("UICorner")
  46. local TextButton = Instance.new("TextButton")
  47. local UICorner_2 = Instance.new("UICorner")
  48.  
  49. -- Properties:
  50. Wowo.Name = "Wowo"
  51. Wowo.Parent = game.CoreGui
  52. Wowo.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  53.  
  54. Frame.Parent = Wowo
  55. Frame.BackgroundColor3 = Color3.fromRGB(165, 42, 42)
  56. Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
  57. Frame.BorderSizePixel = 0
  58. Frame.Position = UDim2.new(0.5, -50, 0.5, -50)
  59. Frame.Size = UDim2.new(0, 100, 0, 100)
  60. Frame.Active = true
  61. Frame.Draggable = true
  62.  
  63. UICorner.Parent = Frame
  64.  
  65. TextButton.Parent = Frame
  66. TextButton.BackgroundColor3 = Color3.fromRGB(139, 0, 0)
  67. TextButton.BorderColor3 = Color3.fromRGB(0, 0, 0)
  68. TextButton.BorderSizePixel = 0
  69. TextButton.Position = UDim2.new(0.1, 0, 0.1, 0)
  70. TextButton.Size = UDim2.new(0.8, 0, 0.8, 0)
  71. TextButton.Font = Enum.Font.SourceSansSemibold
  72. TextButton.Text = "VaultV2 OFF"
  73. TextButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  74. TextButton.TextScaled = true
  75. TextButton.TextSize = 11.000
  76. TextButton.TextWrapped = true
  77.  
  78. TextButton.MouseButton1Click:Connect(function()
  79. CamlockState = not CamlockState
  80. TextButton.Text = CamlockState and "VaultV2 ON" or "VaultV2 OFF"
  81. enemy = CamlockState and FindNearestEnemy() or nil
  82. end)
  83.  
  84. UICorner_2.Parent = TextButton
  85.  
  86. -- Function to cycle through rainbow colors for the Frame
  87. local rainbowColors = {
  88. Color3.fromRGB(0, 0, 0),
  89. Color3.fromRGB(0, 0, 0),
  90. Color3.fromRGB(0, 0, 0),
  91. Color3.fromRGB(0, 0, 0),
  92. Color3.fromRGB(0, 0, 0),
  93. Color3.fromRGB(0, 0, 0),
  94. Color3.fromRGB(0, 0, 0)
  95. }
  96.  
  97. local rainbowIndex = 1
  98. local rainbowCycleSpeed = 0.09
  99.  
  100. RunService.RenderStepped:Connect(function(deltaTime)
  101. local index = math.floor(tick() / rainbowCycleSpeed) % #rainbowColors + 1
  102. Frame.BackgroundColor3 = rainbowColors[index]
  103. end)
Add Comment
Please, Sign In to add comment