Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- X_CHANGE = 0.1 --The change in camera angle on the X axis upon moving 1 pixel on 0.36 sensitivity.
- Y_CHANGE = 0.13 --The change in camera angle on the Y axis upon moving 1 pixel on 0.36 sensitivity.
- MOUSE_OFFSET = Vector2.new(0, 0) --The offset (in pixels) of where the script should think the mouse is.
- USE_RIGHT_CLICK = true --Whether or not to still use right click for locking on.
- AIM_KEY = nil --Enum.Keycode for the key to press when you want to lock onto someone.
- --Temporal Aimbot
- wait()
- --Custom Game Support
- local games = {
- {GameId = 532222553, X_CHANGE = 0.05, Y_CHANGE = 0.04, MOUSE_OFFSET = Vector2.new(31, -1)}, --Island Royale
- {GameId = 113491250, X_CHANGE = 0.14, Y_CHANGE = 0.14, MOUSE_OFFSET = Vector2.new(0, 0)}, --Phantom Forces
- {GameId = 1168263273, X_CHANGE = 0.08, Y_CHANGE = 0.08, MOUSE_OFFSET = Vector2.new(0, 0)} --Bad Buisness
- }
- local isBB = false
- if game.GameId == 1168263273 then
- characters = workspace.Characters
- isBB = true
- end
- for i,v in pairs (games) do
- if game.GameId == v.GameId then
- X_CHANGE = v.X_CHANGE
- Y_CHANGE = v.Y_CHANGE
- MOUSE_OFFSET = v.MOUSE_OFFSET
- end
- end
- --Variables
- local version = "1.4a"
- local stopped = false
- local minimized = false
- local _settings = {
- enabled = true,
- ffa = false,
- range = 150,
- predict = true,
- showRange = true
- }
- local RunService = game:GetService("RunService") --Get the Run Service.
- local InputService = game:GetService("UserInputService") --Get the User Input Service.
- local Players = game:GetService("Players") --Get the Players service.
- local player = Players.LocalPlayer --Get the Local Player.
- local playerGui = player.PlayerGui
- local mouse = player:GetMouse()
- local camera = workspace.CurrentCamera
- local p = Input or {MoveMouse = nil} --Setup for ProtoSmasher mouse movement.
- local MoveMouse = mousemoverel or p.MoveMouse --Get the mouse move function.
- local gui = game:GetObjects("rbxassetid://3757696276")[1]
- gui.Parent = game:GetService("CoreGui")
- local main = gui.Main
- local top = main.Top
- local buttons = main.Buttons
- local clicking = {L = false, R = false}
- top.Title.Text = "Temporal v"..version
- --Functions
- function rotateCamera(x, y) --Function for rotating camera along X and Y axis with the MoveMouse function.
- MoveMouse(y / Y_CHANGE, x / X_CHANGE) --Move the mouse to turn the camera.
- end
- function isHovering(frame)
- local aPos = frame.AbsolutePosition
- local aSiz = frame.AbsoluteSize
- if mouse.X >= aPos.X and mouse.X <= aPos.X + aSiz.X and mouse.Y >= aPos.Y and mouse.Y <= aPos.Y + aSiz.Y then
- return true
- else
- return false
- end
- end
- --Events
- top.Close.MouseButton1Click:Connect(function()
- stopped = true
- wait()
- gui:Destroy()
- end)
- top.Minimize.MouseButton1Click:Connect(function()
- minimized = not minimized
- if minimized then
- main.BackgroundTransparency = 1
- buttons.Visible = false
- main.Logo.Visible = false
- else
- main.BackgroundTransparency = 0
- buttons.Visible = true
- main.Logo.Visible = true
- end
- end)
- function BB_localChr ()
- local _record = {math.huge, nil}
- for i,v in pairs (characters:GetChildren()) do
- if v.Body:FindFirstChild("Head") then
- local dist = (v.Body.Head.Position - camera.CFrame.Position).Magnitude
- if dist < _record[1] then
- _record[1] = dist
- _record[2] = v
- end
- end
- end
- return _record[2]
- end
- function BB_isSameTeam (chr) --Special targetting function for Bad Buisness
- if chr and chr == BB_localChr() then
- return true
- end
- for i,v in pairs (playerGui:GetChildren()) do
- if v.Name == "NameGui" then
- if v.Adornee then
- if v.Adornee.Parent.Parent == chr then
- return true
- end
- end
- end
- end
- return false
- end
- local holding_aim = false
- InputService.InputBegan:Connect(function(input)
- if input.KeyCode == AIM_KEY then
- holding_aim = true
- end
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- clicking.L = true
- end
- if input.UserInputType == Enum.UserInputType.MouseButton2 and USE_RIGHT_CLICK then
- clicking.R = true
- end
- end)
- InputService.InputEnded:Connect(function(input)
- if input.KeyCode == AIM_KEY then
- holding_aim = false
- end
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- clicking.L = false
- end
- if input.UserInputType == Enum.UserInputType.MouseButton2 and USE_RIGHT_CLICK then
- clicking.R = false
- end
- end)
- if not MoveMouse and false then --If no mouse movement function exists, then...
- error("Script failed: Your exploit has no mouse movement function") --...print this message.
- else --Otherwise, if the function does exist, then execute this code
- print("Temporal Aimbot v"..version.." Starting...") --Print message.
- wait(0.5)
- local target = nil --The current player target
- local _prevPos = nil
- local record = {player = nil, distance = nil}
- local mPos = Vector2.new(mouse.X, mouse.Y)
- if not isBB then
- Players.PlayerRemoving:Connect(function(plr)
- if plr == target then
- target = nil
- _prevPos = nil
- record = {player = nil, distance = nil}
- end
- end)
- else
- characters.ChildRemoved:Connect(function(chr)
- if chr == target then
- target = nil
- _prevPos = nil
- record = {player = nil, distance = nil}
- end
- end)
- end
- local dragging = false
- local prevPos = Vector2.new(mouse.X, mouse.Y)
- function toggle (button)
- if button.BackgroundColor3 == Color3.new(0, 0, 0) then
- button.BackgroundColor3 = Color3.fromRGB(85, 0, 127)
- button.TextColor3 = Color3.new(0, 0, 0)
- else
- button.BackgroundColor3 = Color3.new(0, 0, 0)
- button.TextColor3 = Color3.fromRGB(85, 0, 127)
- end
- end
- if _settings.enabled then
- toggle(buttons.Enabled)
- end
- if _settings.ffa then
- toggle(buttons.FFA)
- end
- if _settings.predict then
- toggle(buttons.Predict)
- end
- if _settings.showRange then
- toggle(buttons.ShowRange)
- end
- buttons.Range.Text = "Range: "..tostring(_settings.range)
- buttons.Range.FocusLost:Connect(function()
- local num = tonumber(buttons.Range.Text)
- if num then
- _settings.range = num
- buttons.Range.Text = "Range: "..tostring(num)
- else
- buttons.Range.Text = "Range: "..tostring(_settings.range)
- end
- end)
- buttons.Enabled.MouseButton1Click:Connect(function()
- toggle(buttons.Enabled)
- _settings.enabled = not _settings.enabled
- end)
- buttons.FFA.MouseButton1Click:Connect(function()
- toggle(buttons.FFA)
- _settings.ffa = not _settings.ffa
- end)
- buttons.Predict.MouseButton1Click:Connect(function()
- toggle(buttons.Predict)
- _settings.predict = not _settings.predict
- end)
- buttons.ShowRange.MouseButton1Click:Connect(function()
- toggle(buttons.ShowRange)
- _settings.showRange = not _settings.showRange
- end)
- RunService.RenderStepped:Connect(function() --Fires every frame, handles precice aiming
- if _settings.enabled and not stopped then
- mPos = Vector2.new(mouse.X, mouse.Y) + MOUSE_OFFSET
- if not dragging and clicking.L and isHovering(top) then
- dragging = true
- elseif dragging and clicking.L then
- local dif = mPos - prevPos
- main.Position = main.Position + UDim2.new(0, dif.X, 0, dif.Y)
- else
- dragging = false
- end
- local function t (txt)
- buttons.Hint.Text = txt
- end
- if isHovering(buttons.Enabled) then
- t("Enable/disable the aimbot.")
- elseif isHovering(buttons.FFA) then
- t("Target players no matter the team they are on.")
- elseif isHovering(buttons.Predict) then
- t("Predict the location of targets 3 frames ahead to counter lag.")
- elseif isHovering(buttons.ShowRange) then
- t("Show a circle around your mouse that displays the range in which people will be targetted.")
- elseif isHovering(buttons.Range) then
- t("The max amount of pixels away from your mouse a player can be in order for them to be potentially targeted. Please note that the target is detirmened by whoever is closest to the camera, not distance from the mouse.")
- else
- t("Make sure to set your sensitivity to 0.36 (1 bar) or else the aimbot will freak out! Report any bugs to angeld23#6785 on Discord. Join the discord server: discord.me/temporal")
- end
- if target then
- if not isBB then
- if target.Character and target.Character:FindFirstChild("Head") and target.Character.Head:IsA("BasePart") and (clicking.R or holding_aim) and target.Character:FindFirstChild("Humanoid") and target.Character.Humanoid.Health > 0.01 then
- local _sPos, onScreen = camera:WorldToScreenPoint(target.Character.Head.Position)
- local sPos = Vector2.new(_sPos.X, _sPos.Y)
- if onScreen then
- local ray = camera:ScreenPointToRay(mPos.X, mPos.Y)
- local pos
- local _pos = target.Character.Head.Position
- if _settings.predict and _prevPos then
- pos = _pos + (_pos - _prevPos) * 3
- else
- pos = _pos
- end
- local temp1 = CFrame.new(camera.CFrame.Position, pos)
- local temp2 = Instance.new("Part", workspace)
- temp2.Name = "a"..tostring(math.random(100, 10000000))
- temp2.Anchored = true
- temp2.CanCollide = false
- temp2.Transparency = 1
- temp2.CFrame = temp1
- local targetRotation = temp2.Orientation
- local temp3 = CFrame.new(camera.CFrame.Position, camera.CFrame.Position + ray.Direction)
- temp2.CFrame = temp3
- local currentRotation = temp2.Orientation
- temp2:Destroy()
- if targetRotation.Y < -90 and currentRotation.Y > 90 then
- targetRotation = Vector3.new(targetRotation.X, targetRotation.Y + 360, targetRotation.Z)
- end
- if currentRotation.Y < -90 and targetRotation.Y > 90 then
- currentRotation = Vector3.new(currentRotation.X, currentRotation.Y + 360, currentRotation.Z)
- end
- if targetRotation.X < -90 and currentRotation.X > 90 then
- targetRotation = Vector3.new(targetRotation.X, targetRotation.X + 360, targetRotation.Z)
- end
- if currentRotation.X < -90 and targetRotation.X > 90 then
- currentRotation = Vector3.new(currentRotation.X, currentRotation.X + 360, currentRotation.Z)
- end
- local dif = currentRotation - targetRotation
- rotateCamera(dif.X, dif.Y)
- _prevPos = _pos
- else
- target = nil
- _prevPos = nil
- record = {player = nil, distance = nil}
- end
- else
- target = nil
- _prevPos = nil
- record = {player = nil, distance = nil}
- end
- else
- if target.Body:FindFirstChild("Head") and target.Body.Head:IsA("BasePart") and (clicking.R or holding_aim) and target:FindFirstChild("Health") and target.Health.Value > 0 then
- local _sPos, onScreen = camera:WorldToScreenPoint(target.Body.Head.Position)
- local sPos = Vector2.new(_sPos.X, _sPos.Y)
- if onScreen then
- local ray = camera:ScreenPointToRay(mPos.X, mPos.Y)
- local pos
- local _pos = target.Body.Head.Position
- if _settings.predict and _prevPos then
- pos = _pos + (_pos - _prevPos) * 3
- else
- pos = _pos
- end
- local temp1 = CFrame.new(camera.CFrame.Position, pos)
- local temp2 = Instance.new("Part", workspace)
- temp2.Name = "a"..tostring(math.random(100, 10000000))
- temp2.Anchored = true
- temp2.CanCollide = false
- temp2.Transparency = 1
- temp2.CFrame = temp1
- local targetRotation = temp2.Orientation
- local temp3 = CFrame.new(camera.CFrame.Position, camera.CFrame.Position + ray.Direction)
- temp2.CFrame = temp3
- local currentRotation = temp2.Orientation
- temp2:Destroy()
- if targetRotation.Y < -90 and currentRotation.Y > 90 then
- targetRotation = Vector3.new(targetRotation.X, targetRotation.Y + 360, targetRotation.Z)
- end
- if currentRotation.Y < -90 and targetRotation.Y > 90 then
- currentRotation = Vector3.new(currentRotation.X, currentRotation.Y + 360, currentRotation.Z)
- end
- if targetRotation.X < -90 and currentRotation.X > 90 then
- targetRotation = Vector3.new(targetRotation.X, targetRotation.X + 360, targetRotation.Z)
- end
- if currentRotation.X < -90 and targetRotation.X > 90 then
- currentRotation = Vector3.new(currentRotation.X, currentRotation.X + 360, currentRotation.Z)
- end
- local dif = currentRotation - targetRotation
- rotateCamera(dif.X, dif.Y)
- _prevPos = _pos
- else
- target = nil
- _prevPos = nil
- record = {player = nil, distance = nil}
- end
- else
- target = nil
- _prevPos = nil
- record = {player = nil, distance = nil}
- end
- end
- end
- prevPos = mPos
- else
- target = nil
- _prevPos = nil
- record = {player = nil, distance = nil}
- end
- if not stopped then
- main.Circle.Position = UDim2.new(0, mPos.X - main.AbsolutePosition.X, 0, mPos.Y - main.AbsolutePosition.Y)
- end
- end)
- while wait(0.1) do --Loop that fires less often, to save performance
- local c = clicking.R or holding_aim --Shortcut for detecting lockon button
- if c and _settings.enabled and not target and not stopped then
- if not isBB then
- for i,v in pairs (Players:GetPlayers()) do
- if v ~= player and (v.Team ~= player.Team or _settings.ffa) then
- if v.Character then
- if v.Character:FindFirstChild("Head") and v.Character.Head:IsA("BasePart") and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid:IsA("Humanoid") and v.Character.Humanoid.Health > 0.01 then
- local _sPos, onScreen = camera:WorldToScreenPoint(v.Character.Head.Position)
- local sPos = Vector2.new(_sPos.X, _sPos.Y)
- if onScreen then
- if (sPos - mPos).Magnitude <= _settings.range then
- local dist = (camera.CFrame.Position - v.Character.Head.Position).Magnitude
- if not record.player or dist < record.distance then
- record = {player = v, distance = dist}
- end
- end
- end
- end
- end
- end
- end
- else
- local lChr = BB_localChr()
- if lChr then
- for i,v in pairs (characters:GetChildren()) do
- if v ~= lChr and (not BB_isSameTeam(v) or _settings.ffa) then
- if v.Body:FindFirstChild("Head") and v.Body.Head:IsA("BasePart") and v:FindFirstChild("Health") and v.Health.Value > 0 then
- local _sPos, onScreen = camera:WorldToScreenPoint(v.Body.Head.Position)
- local sPos = Vector2.new(_sPos.X, _sPos.Y)
- if onScreen then
- if (sPos - mPos).Magnitude <= _settings.range then
- local dist = (camera.CFrame.Position - v.Body.Head.Position).Magnitude
- if not record.player or dist < record.distance then
- record = {player = v, distance = dist}
- end
- end
- end
- end
- end
- end
- end
- end
- if record.player then
- target = record.player
- record = {player = nil, distance = nil}
- end
- elseif not c then
- target = nil
- _prevPos = nil
- record = {player = nil, distance = nil}
- end
- main.Circle.Size = UDim2.new(0, _settings.range * 2, 0, _settings.range * 2)
- if _settings.showRange and not stopped then
- main.Circle.Visible = true
- elseif not stopped then
- main.Circle.Visible = false
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement