Advertisement
Guest User

Aimbot by Phoenix

a guest
Jun 19th, 2019
516
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.31 KB | None | 0 0
  1. local TS = require(game.ReplicatedStorage.Tortoiseshell)
  2. TS.Console:Log("--|_Phoenix Initialized_|--", Color3.fromRGB(255,10,255))
  3.  
  4.  
  5. function run()
  6.  
  7.  
  8.  
  9.  
  10.  
  11. -----------------------------------// aimbot script
  12.  
  13.  
  14. local cam = workspace.Camera
  15. local camera = workspace.Camera
  16. local plr = game:service'Players'.LocalPlayer
  17. local t
  18. local mouse = plr:GetMouse()
  19. local aimbot = true
  20. local whitelisted = {
  21. plr.Name;
  22. }
  23.  
  24. local ray = Ray.new
  25. local ray_start
  26.  
  27.  
  28.  
  29.  
  30. local checkifwhitelisted = function(nam)
  31. local asd = false
  32.  
  33. for _, a in pairs(whitelisted) do
  34. if nam == a then
  35. asd = true
  36. end
  37. end
  38.  
  39. return asd
  40. end
  41.  
  42. _G.gofor = "Head"
  43. local lPlayerTeam = nil
  44.  
  45. function checkteam(name)
  46. local teams = game.Teams
  47. local plr_team = nil
  48. for i,v in pairs(teams:GetDescendants()) do
  49. if plr_team == nil then
  50. if v.Name == name then
  51. plr_team = v.Parent
  52. return plr_team
  53. end
  54. end
  55. end
  56. end
  57. lPlayerTeam = checkteam(plr.Name)
  58.  
  59. function CheckIf(name)
  60. for i,v in pairs(workspace.Characters:children()) do
  61. if checkteam(name) ~= lPlayerTeam then
  62. return true
  63. end
  64. end
  65. return false
  66. end
  67.  
  68. local function getcloseplayer()
  69. --pcall(function()
  70. local ignorelist = workspace.Characters[plr.Name].Hitbox:children''
  71. for i,v in pairs(workspace:children'') do
  72. if v:IsA("Model") then
  73. table.insert(ignorelist,v)
  74. end
  75. end
  76. local closestDist = 2e9
  77. local player
  78.  
  79. for _, a in pairs(workspace.Characters:children()) do
  80. if a:IsA'Model' and game:service'Players':FindFirstChild(a.Name) and a.Name ~= plr.Name and checkifwhitelisted(a.Name) == false and CheckIf(a.Name) and a ~= nil then
  81.  
  82. local dist = (workspace.Characters[plr.Name].Root.Position - a.Root.Position).magnitude
  83.  
  84. if dist < closestDist then
  85. if a ~= nil and a:FindFirstChild'Hitbox' then
  86. if a.Hitbox:FindFirstChild'Head' then
  87. pcall(function()
  88. ray_start = workspace.Characters[plr.Name].Hitbox.Head.Position
  89. local vector = ( a.Hitbox.Head.Position - ray_start)
  90. local new_ray = ray(ray_start, vector.unit * 1000)
  91. local hit, position = workspace:FindPartOnRayWithIgnoreList(new_ray, ignorelist)
  92.  
  93. if (hit and hit:isDescendantOf(a.Hitbox)) then
  94. closestDist = dist
  95. player = a.Hitbox
  96. end
  97. end)
  98. end
  99. end
  100. end
  101.  
  102.  
  103. end
  104. end
  105.  
  106. return player
  107. --end)
  108. end
  109.  
  110. mouse.KeyDown:connect(function(key)
  111. if key == "[" then
  112. if aimbot then
  113. aimbot = false
  114. else
  115. aimbot = true
  116. end
  117. end
  118. end)
  119.  
  120. local closesthead = nil
  121.  
  122.  
  123. --------------------------------------------------------------------------////////////////////////// Cam Scripto
  124.  
  125. game.Players.LocalPlayer.PlayerScripts.CameraScript.Disabled = true
  126. local UserInputService = game:GetService("UserInputService")
  127. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  128. local Workspace = game:GetService("Workspace")
  129. local Players = game:GetService("Players")
  130. local TS = require(ReplicatedStorage:WaitForChild("Tortoiseshell"))
  131. local PLAYER = Players.LocalPlayer
  132. local CAMERA = Workspace.CurrentCamera
  133. local OFFSET = Vector3.new(0, 1.6, 0)
  134. local SPRINT_FOV_SCALE = 0.9
  135. local LEAN_DISTANCE = 2
  136. local LEAN_TILT = 0.15
  137. local MIN_Y, MAX_Y = -1.5, 1.5
  138. local SENSITIVITY = Vector2.new(0.004, 0.004)
  139. local recoilSpring = TS.Math.Spring:Create(1, 200, 30, 1)
  140. TS.Camera.FirstPerson.RecoilSpring = recoilSpring
  141. local character, root, state, sprinting, lean, vaulting, grounded, climbing, aiming, look, sliding, backpack, items, equipped, item, config
  142. local x, y = 0, 0
  143. local leanOffset = CFrame.new()
  144. local lastUpdate = 0
  145. local actionSpring = TS.Math.Spring:Create(1, 100, 10, 1)
  146. local slideFOV = 0
  147. local spectateChar
  148. local function Equipped(newItem)
  149. pcall(function()
  150. config = nil
  151. item = nil
  152. if newItem then
  153. config = TS.Items:GetConfig(newItem)
  154. item = newItem
  155. end
  156. end)
  157. end
  158. local function HandleCharacter(newCharacter)
  159. if newCharacter then
  160. character = nil
  161. spectateChar = nil
  162. root = newCharacter:WaitForChild("Root")
  163. state = newCharacter:WaitForChild("State")
  164. sprinting = state:WaitForChild("Sprinting")
  165. lean = state:WaitForChild("Lean")
  166. vaulting = state:WaitForChild("Vaulting")
  167. grounded = state:WaitForChild("Grounded")
  168. climbing = state:WaitForChild("Climbing")
  169. aiming = state:WaitForChild("Aiming")
  170. look = state:WaitForChild("Look")
  171. sliding = state:WaitForChild("Sliding")
  172. backpack = newCharacter:WaitForChild("Backpack")
  173. equipped = backpack:WaitForChild("Equipped")
  174. items = backpack:WaitForChild("Items")
  175. equipped.Changed:Connect(function()
  176. Equipped(equipped.Value)
  177. end)
  178. vaulting.Changed:Connect(function()
  179. if vaulting.Value then
  180. actionSpring:Shove(Vector3.new(sprinting.Value and -3 or -2, 0, 0))
  181. end
  182. end)
  183. climbing.Changed:Connect(function()
  184. if climbing.Value then
  185. actionSpring:Shove(Vector3.new(-10, 0, 0))
  186. end
  187. end)
  188. grounded.Changed:Connect(function()
  189. if not vaulting.Value and root.Velocity.Y < -60 then
  190. actionSpring:Shove(Vector3.new(root.Velocity.Y / 20, 0, 0))
  191. end
  192. end)
  193. newCharacter.DescendantAdded:Connect(function(obj)
  194. if obj:IsA("BasePart") then
  195. obj.LocalTransparencyModifier = 1
  196. end
  197. end)
  198. for _, v in pairs(newCharacter:GetDescendants()) do
  199. if v:IsA("BasePart") then
  200. v.LocalTransparencyModifier = 1
  201. end
  202. end
  203. Equipped(equipped.Value)
  204. character = newCharacter
  205. end
  206. end
  207. TS.Damage.CharacterKilled:Connect(function(char, _, player)
  208. if char == character and player then
  209. spectateChar = TS.Characters:GetCharacter(player)
  210. end
  211. end)
  212. TS.Characters.CharacterAdded:Connect(function(player, character)
  213. if player == PLAYER then
  214. HandleCharacter(character)
  215. end
  216. end)
  217. UserInputService.InputChanged:connect(function(inputObject, processed)
  218. if inputObject.UserInputType == Enum.UserInputType.MouseMovement then
  219. local fovSens = math.clamp((CAMERA.FieldOfView / TS.Camera.FieldOfView) ^ 1.5, 0, 1)
  220. x = (x - inputObject.Delta.X * SENSITIVITY.X * fovSens * TS.Camera.Sensitivity) % (math.pi * 2)
  221. y = math.clamp(y - inputObject.Delta.Y * SENSITIVITY.Y * fovSens * TS.Camera.Sensitivity, MIN_Y, MAX_Y)
  222. end
  223. end)
  224. CAMERA.FieldOfView = 1
  225. CAMERA.CameraType = Enum.CameraType.Scriptable
  226. HandleCharacter(TS.Characters:GetCharacter(PLAYER))
  227.  
  228.  
  229. TS.Timer:BindToRenderStep("Camera", 1, function(deltaTime)
  230. if workspace.Characters:FindFirstChild(plr.Name) == nil then
  231. TS.Timer:UnbindFromRenderStep('Camera')
  232. end
  233. if spectateChar then
  234. local center = spectateChar.PrimaryPart.Position + Vector3.new(0, 0.5, 0)
  235. CAMERA.FieldOfView = 50
  236. CAMERA.CFrame = CFrame.new(center) * CFrame.Angles(0, x, 0) * CFrame.Angles(y, 0, 0) * CFrame.new(0, 0, 15)
  237. CAMERA.Focus = CAMERA.CFrame * CFrame.new(0, 0, -20)
  238. elseif character and character.Parent then
  239. look.Value = y
  240. if sliding.Value then
  241. local speed = Vector2.new(root.Velocity.X, root.Velocity.Z).Magnitude
  242. slideFOV = TS.Math:Lerp(slideFOV, speed / 3 * (TS.Camera.FieldOfView / 90), math.min(deltaTime * 10, 1))
  243. else
  244. slideFOV = TS.Math:Lerp(slideFOV, 0, math.min(deltaTime * 10, 1))
  245. end
  246. local newFOV = TS.Camera.FieldOfView
  247. local center = root.CFrame:PointToWorldSpace(OFFSET)
  248. local player = getcloseplayer()
  249. if sprinting.Value then
  250. newFOV = newFOV * SPRINT_FOV_SCALE
  251. elseif aiming.Value then
  252. if aimbot then
  253. if player ~= nil then
  254. CAMERA.CoordinateFrame = CFrame.new(center, player.Head.Position)
  255. end
  256. end
  257. if item then
  258. newFOV = newFOV * config.Stats.AimFOV
  259. else
  260. newFOV = newFOV * 0.9
  261. end
  262. end
  263. CAMERA.FieldOfView = TS.Math:Lerp(CAMERA.FieldOfView, math.min(newFOV + slideFOV, 120), math.min(deltaTime * 10, 1))
  264. local leanAmount = lean.Value
  265. if math.abs(leanAmount) > 0.1 then
  266. local hit, position = TS.Raycast:CastGeometry(center + Vector3.new(0, -1, 0), root.CFrame:VectorToWorldSpace(Vector3.new(leanAmount * LEAN_DISTANCE * 2, 0, 0)))
  267. if hit then
  268. local distance = (position - center).Magnitude
  269. leanAmount = math.sin(lean.Value) * distance / (LEAN_DISTANCE * 2)
  270. end
  271. end
  272. local heightOffset = math.cos(leanAmount * math.pi / 2) - 1
  273. leanOffset = leanOffset:Lerp(CFrame.new(leanAmount * LEAN_DISTANCE, heightOffset * LEAN_DISTANCE / 4, 0) * CFrame.Angles(0, 0, -leanAmount * LEAN_TILT), math.min(deltaTime * 10, 1))
  274. actionSpring:Update(deltaTime)
  275. local actionOffset = CFrame.Angles(actionSpring.Position.X, actionSpring.Position.Y, actionSpring.Position.Z)
  276. local recoilOffset = CFrame.Angles(recoilSpring.Position.Y * 0, recoilSpring.Position.X * 0, 0)
  277. if aiming.Value == false or player == nil then
  278. CAMERA.CFrame = CFrame.new(center) * CFrame.Angles(0, x, 0) * CFrame.Angles(y, 0, 0) * leanOffset * actionOffset * recoilOffset
  279. end
  280. CAMERA.Focus = CAMERA.CFrame * CFrame.new(0, 0, -20)
  281. if 0.1 <= tick() - lastUpdate then
  282. lastUpdate = tick()
  283. TS.Network:Fire("Character", "State", "Look", y)
  284. end
  285. end
  286. end)
  287. end
  288.  
  289. run()
  290.  
  291. workspace.Characters.ChildAdded:Connect(function(v)
  292. if v.Name == game.Players.LocalPlayer.Name then
  293. wait(.2)
  294. run()
  295. end
  296. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement