Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local aimbotting = false
- local tweenService = game:GetService("TweenService")
- local currentCamera = game:GetService("Workspace").CurrentCamera
- local localPlayer = game:GetService("Players").LocalPlayer
- local client = game:GetService("Workspace").Client
- local function getClosestCube()
- local closestCube = nil
- local shortestDistance = math.huge
- for i, v in pairs(client.Cubes:GetChildren()) do
- if v:IsA("BasePart") then
- local magnitude = (v.Position - client.CameraPos.Position).magnitude
- if magnitude < shortestDistance then
- closestCube = v
- shortestDistance = magnitude
- end
- end
- end
- return closestCube
- end
- game:GetService("UserInputService").InputBegan:Connect(function(input, onGui)
- if not onGui and input.KeyCode == Enum.KeyCode.T then
- aimbotting = not aimbotting
- warn("Aiming : " .. tostring(aimbotting))
- end
- end)
- game:GetService("RunService").RenderStepped:Connect(function()
- if aimbotting then
- pcall(function()
- tweenService:Create(currentCamera, TweenInfo.new(0.065, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {CFrame = CFrame.new(client.CameraPos.Position, getClosestCube().Position)}):Play()
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement