Advertisement
Nova355killer

Rainbow Aim

Apr 18th, 2019
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.01 KB | None | 0 0
  1. local UIS = game:GetService('UserInputService')
  2. local RS = game:GetService('RunService')
  3. local Players = game:GetService('Players')
  4. local StarterGui = game:GetService('StarterGui')
  5. local Player = Players.LocalPlayer
  6. local Studio = RS:IsStudio()
  7. local PlayerGui = RS:IsStudio() and Player:WaitForChild('PlayerGui') or game.CoreGui
  8. local Mouse = Player:GetMouse()
  9. local old_icon = Mouse.Icon
  10. local Camera = workspace.CurrentCamera
  11. targetpart = 'Head' -- Don't change this.
  12. -- It can be changed with the targetpart_change hotkey ingame.
  13. local target
  14. local target_old
  15. local alert = false
  16. local lockedon = false
  17. local settingkey = false
  18. local upvals = nil
  19. local val = 1
  20. local windows = {}
  21. local function hb() RS.Heartbeat:wait() end
  22.  
  23. local version = 1.25
  24. local Spawn = nil or game.PlaceId == 292439477 and workspace:WaitForChild('Lobby',2):WaitForChild('Spawn1',2)
  25. local spawned = false
  26.  
  27. script.Name = 'GameSense!'
  28. Mouse.TargetFilter = Camera
  29.  
  30. -- hotkey
  31. toggle_aim = Enum.UserInputType.MouseButton2
  32. toggle_aimbot = Enum.KeyCode.Delete
  33. toggle_trigger = Enum.KeyCode.Delete
  34. toggle_esp = Enum.KeyCode.Delete
  35. toggle_gui = Enum.KeyCode.Delete
  36. toggle_bottompos = Enum.KeyCode.Delete
  37. toggle_performance = Enum.KeyCode.Delete
  38. toggle_bones = Enum.KeyCode.Delete
  39. toggle_chams = Enum.KeyCode.Delete
  40. toggle_tracers = Enum.KeyCode.Delete
  41. toggle_boxes = Enum.KeyCode.Delete
  42. toggle_font = Enum.KeyCode.Delete
  43. ffatoggle = Enum.KeyCode.Delete
  44. targetpart_change = Enum.KeyCode.Delete
  45. priority_toggle = Enum.KeyCode.Delete
  46. sethotkey = Enum.KeyCode.Delete
  47. -- aim fov
  48. fov_increase = Enum.KeyCode.KeypadPlus
  49. fov_decrease = Enum.KeyCode.KeypadMinus
  50. -- aim sens (how smooth your crosshair will move)
  51. sens_increase = Enum.KeyCode.RightBracket
  52. sens_decrease = Enum.KeyCode.LeftBracket
  53.  
  54. -- parts
  55. parts = {
  56. 'Head';
  57. 'Torso'
  58. }
  59.  
  60. fonts = {
  61. Enum.Font.SourceSansBold,
  62. Enum.Font.Cartoon,
  63. Enum.Font.Arcade,
  64. Enum.Font.SciFi,
  65. Enum.Font.Fantasy,
  66. Enum.Font.Code,
  67. Enum.Font.Highway,
  68. Enum.Font.Bodoni
  69. }
  70.  
  71. textSet = false
  72.  
  73. currentfont = 1
  74. ffa = false
  75. hidden = false
  76. performancemode = false
  77. -- aim
  78. fov = 6
  79. sens = .25
  80. drop = .4
  81. aim_toggled = false
  82. bottompos = true
  83. aim_priority = 2
  84. -- [2] FOV or [1] Distance
  85. aimingcolor = Color3.fromRGB(0,165,255)
  86. aimbot_toggled = true
  87. aim_line = true
  88. locksoundid = 538769304
  89. mouseiconid = 18671553
  90.  
  91. -- trigger
  92. trigger_toggled = false
  93. trigger_delay = 1/20
  94.  
  95. -- esp
  96. esp_toggled = false
  97. esp_bones = false
  98. esp_chams = false
  99. esp_tracers = false
  100. -- item_esp (coming soon)
  101. linesize = 1
  102. showdists = true
  103. textsize = 14
  104. textoffset = 20
  105. visiblecolor = Color3.fromRGB(38,255,99)
  106. hiddencolor = Color3.fromRGB(255,37,40)
  107. headboxsize = 4
  108. headboxaimsize = 6
  109. headboxshape = 'diamond'
  110. -- rectangle or diamond
  111.  
  112. -- box esp
  113. bounding_box = true
  114. -- box_pointsize = 0 [UNUSED]
  115. box_line_size = 1
  116. -- box_line_size_visible = 2 [UNUSED]
  117.  
  118. local GUI = Instance.new('ScreenGui',PlayerGui)
  119. GUI.Name = 'GameSense '..version
  120. GUI.ResetOnSpawn = false
  121.  
  122. ESP = Instance.new('Folder',GUI)
  123. ESP.Name = 'ESP'
  124. local Bottom = Instance.new('Frame',ESP)
  125. Bottom.Name = 'Bottom'
  126. Bottom.BackgroundTransparency = 1
  127. Bottom.Size = UDim2.new(0,1,0,1)
  128. Bottom.Position = UDim2.new(.5,0,1,1)
  129.  
  130. local Status = Instance.new('TextLabel',GUI)
  131. Status.Name = 'Status'
  132. Status.BackgroundTransparency = 1
  133. Status.Size = UDim2.new(0,500,0,50)
  134. Status.Position = UDim2.new(.5,-250,.85,0)
  135. Status.TextSize = 0
  136. Status.Font = Enum.Font.SourceSansBold
  137. Status.TextColor3 = Color3.new(1,1,1)
  138. Status.TextStrokeColor3 = Color3.new(0,0,0)
  139. Status.TextStrokeTransparency = .6
  140. Status.Text = 'On Standby'
  141. Status.ZIndex = 50
  142.  
  143. local Credits = Status:Clone()
  144. Credits.Name = 'Credits'
  145. Credits.Parent = GUI
  146. Credits.Position = UDim2.new(-1000000,-1000000,-1000000,-1000000)
  147. Credits.TextSize = 0
  148. Credits.Text = 'GameSense '..version..' by Avexus!'
  149.  
  150. local FovGui = Instance.new('ImageLabel',GUI)
  151. FovGui.Name = 'FovGui'
  152. FovGui.Image = 'rbxassetid://324848180'
  153. FovGui.Size = UDim2.new(0,(Camera.ViewportSize.X/(90/fov))*2,0,(Camera.ViewportSize.X/(90/fov))*2)
  154. FovGui.Position = UDim2.new(0.5,-FovGui.AbsoluteSize.X/2,0.5,-FovGui.AbsoluteSize.Y/2)
  155. FovGui.BackgroundTransparency = 1
  156. FovGui.ImageTransparency = 0.7
  157. FovGui.ImageColor3 = Color3.new(1,0,0)
  158.  
  159. local Indicator = Instance.new('TextLabel',GUI)
  160. Indicator.Name = 'Indicator'
  161. Indicator.Font = Enum.Font.SourceSans
  162. Indicator.TextSize = 0
  163. Indicator.TextXAlignment = Enum.TextXAlignment.Center
  164. Indicator.TextYAlignment = Enum.TextYAlignment.Center
  165. Indicator.TextStrokeTransparency = 1
  166. Indicator.Text = aim_priority>1 and 'FOV: '..fov or 'Distance'
  167.  
  168. local SensAdjust = Instance.new('TextBox',GUI)
  169. SensAdjust.Name = 'SensAdjust'
  170. SensAdjust.Font = Enum.Font.SourceSans
  171. SensAdjust.BackgroundTransparency = .75
  172. SensAdjust.BackgroundColor3 = Color3.new(0,0,0)
  173. SensAdjust.BorderColor3 = Color3.new(1,1,1)
  174. SensAdjust.Size = UDim2.new(0,50,0,20)
  175. SensAdjust.TextStrokeTransparency = 1
  176. SensAdjust.TextColor3 = Color3.new(1,1,1)
  177. SensAdjust.TextSize = 0
  178. SensAdjust.PlaceholderText = 'Sens'
  179. SensAdjust.Text = tonumber(sens)
  180. SensAdjust.Position = Credits.Position + UDim2.new(0,250,0,75)
  181.  
  182. local SensLabel = Instance.new('TextLabel',SensAdjust)
  183. SensLabel.Name = 'SensLabel'
  184. SensLabel.Font = Enum.Font.SourceSans
  185. SensLabel.Size = UDim2.new(1,0,1,0)
  186. SensLabel.BackgroundTransparency = 1
  187. SensLabel.TextSize = 0
  188. SensLabel.TextColor3 = Color3.new(1,1,1)
  189. SensLabel.TextStrokeColor3 = Color3.new(0,0,0)
  190. SensLabel.TextStrokeTransparency = 1
  191. SensLabel.Text = 'Sens:'
  192. SensLabel.Position = UDim2.new(-1,0,0,0)
  193. SensLabel.TextXAlignment = Enum.TextXAlignment.Left
  194.  
  195. local FovAdjust = SensAdjust:Clone()
  196. FovAdjust.Parent = GUI
  197. FovAdjust.PlaceholderText = 'FOV'
  198. FovAdjust.Name = 'FovAdjust'
  199. FovAdjust.Text = tonumber(fov)
  200. FovAdjust.Position = SensAdjust.Position + UDim2.new(0,0,0,20)
  201. FovAdjust.SensLabel.Name = 'FovLabel'
  202. FovAdjust.FovLabel.Text = 'Fov:'
  203.  
  204. local DropAdjust = SensAdjust:Clone()
  205. DropAdjust.Parent = GUI
  206. DropAdjust.PlaceholderText = 'Drop'
  207. DropAdjust.Name = 'DropAdjust'
  208. DropAdjust.Text = tonumber(drop)
  209. DropAdjust.Position = SensAdjust.Position + UDim2.new(0,0,0,40)
  210. DropAdjust.SensLabel.Name = 'DropLabel'
  211. DropAdjust.DropLabel.Text = 'Drop:'
  212.  
  213. local KeysList = Instance.new('TextLabel',GUI)
  214. KeysList.Name = 'KeysList'
  215. KeysList.Font = Enum.Font.SourceSans
  216. KeysList.TextStrokeTransparency = .6
  217. KeysList.TextSize = 0
  218. KeysList.TextColor3 = Color3.new(1,1,1)
  219. KeysList.Size = UDim2.new(0,0,1,0)
  220. KeysList.Position = UDim2.new(0,5,0,-280)
  221. KeysList.BackgroundTransparency = 1
  222. KeysList.Active = false
  223.  
  224. local n = 0
  225.  
  226. spawn(function()
  227. while Status do
  228. Indicator.TextColor3 = Color3.fromHSV(n,.5,1)
  229. FovGui.ImageColor3 = Indicator.TextColor3
  230. if not textSet then
  231. if aim_toggled and target then
  232. Status.TextColor3 = aimingcolor
  233. Status.Text = ('Aiming at '..target.Name)
  234. else
  235. Status.TextColor3 = Color3.fromHSV(n,.5,1)
  236. Status.Text = 'On Standby'
  237. end
  238. end
  239. n = (n+.005)%1
  240. hb()
  241. end
  242. end)
  243.  
  244. SensAdjust.InputEnded:Connect(function() if SensAdjust.Text~='' then sens = tonumber(SensAdjust.Text)>0 and tonumber(SensAdjust.Text) or sens end end)
  245. FovAdjust.InputEnded:Connect(function() if FovAdjust.Text~='' then fov = tonumber(FovAdjust.Text)>0 and tonumber(FovAdjust.Text) or fov
  246. FovGui:TweenSize(UDim2.new(0,(Camera.ViewportSize.X/(90/fov))*2,0,(Camera.ViewportSize.X/(90/fov))*2),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.1,true) end end)
  247. DropAdjust.InputEnded:Connect(function() if DropAdjust.Text~='' then drop = tonumber(DropAdjust.Text)>=0 and tonumber(DropAdjust.Text) or drop end end)
  248.  
  249. local function distfromspawn(x)
  250. if Spawn then
  251. return x:DistanceFromCharacter(Spawn.Position)
  252. else
  253. return 201
  254. end
  255. end
  256.  
  257. local function setText(text)
  258. spawn(function()
  259. textSet = true
  260. Status.Text = text
  261. Status.TextColor3 = Color3.new(1,1,1)
  262. wait(#text/4)
  263. textSet = false
  264. end)
  265. end
  266.  
  267. local function playsound(id)
  268. local sound = Instance.new('Sound',Camera)
  269. sound.Volume = 3
  270. sound:Play()
  271. game:GetService('Debris'):AddItem(sound,5)
  272. end
  273.  
  274.  
  275. local function DrawLine(Folder,P1,P2,Thickness,Color,LineTransparency,BorderThickness,BorderColor)
  276. -- Declare variables
  277. local Point1,Point2 = P1.Position,P2.Position
  278. if Point1 and Point2 then
  279. local X,Y = Camera.ViewportSize.X, Camera.ViewportSize.Y
  280. local X1,X2 = (X * Point1.X.Scale + Point1.X.Offset + P1.Size.X.Offset/2), (X * Point2.X.Scale + Point2.X.Offset + P2.Size.X.Offset/2)
  281. local Y1,Y2 = (Y * Point1.Y.Scale + Point1.Y.Offset + P1.Size.Y.Offset/2), (Y * Point2.Y.Scale + Point2.Y.Offset + P2.Size.Y.Offset/2)
  282. local MidX,MidY = (X1+X2)/2, (Y1+Y2)/2
  283. -- Set defaults to prevent errors
  284. Thickness = Thickness or 1
  285. Color = Color or Color3.new(1,1,1)
  286. LineTransparency = LineTransparency or 0
  287. BorderThickness = BorderThickness or 0
  288. BorderColor = BorderColor or Color3.new(0,0,0)
  289. -- Draw the line
  290. local Line = Folder:FindFirstChild(P1.Name..'-'..P2.Name) or Instance.new('Frame',Folder)
  291. Line.Visible = false
  292. Line.BackgroundTransparency = LineTransparency
  293. Line.BorderSizePixel = BorderThickness
  294. Line.BorderColor3 = BorderColor
  295. Line.Size = UDim2.new(0,(Vector2.new(X1,Y1) - Vector2.new(X2,Y2)).magnitude-1,0,Thickness)
  296. Line.Position = UDim2.new(0,MidX-Line.AbsoluteSize.X/2,0,MidY-Line.AbsoluteSize.Y)
  297. Line.BackgroundColor3 = Color
  298. Line.Rotation = math.deg(math.atan2((Y2-Y1),(X2-X1)))
  299. Line.Name = P1.Name..'-'..P2.Name
  300. Line.Visible = true
  301. return Line
  302. else
  303. return nil
  304. end
  305. end
  306.  
  307. local function GetNearest(Mode)
  308. local lowest,nearest,gui = math.huge,nil,nil
  309. if Mode==1 then
  310. for _,plr in next,Players:GetPlayers() do
  311. if plr.Name~=Player.Name and plr.Character~=nil and plr.Character:FindFirstChild(targetpart) then
  312. local dist = Player:DistanceFromCharacter(plr.Character[targetpart].Position)
  313. local ray = Ray.new(Player.Character.Head.Position,(plr.Character[targetpart].Position-Player.Character.Head.Position).unit*5000)
  314. local part,point = workspace:FindPartOnRayWithIgnoreList(ray,{Camera,Player.Character,unpack(windows)})
  315. local Z = Camera:WorldToScreenPoint(plr.Character[targetpart].Position).Z
  316. if part and part:IsDescendantOf(plr.Character) and Z>0 and dist < lowest and (ffa or plr.TeamColor~=Player.TeamColor) then lowest = dist nearest = plr.Character end
  317. end
  318. end
  319. elseif Mode==2 then
  320. for _,plr in next,Players:GetPlayers() do
  321. if plr.Name~=Player.Name and plr.Character~=nil and plr.Character:FindFirstChild(targetpart) then
  322. local pos = Camera:WorldToScreenPoint(plr.Character[targetpart].Position)
  323. local ray = Ray.new(Player.Character[targetpart].Position,(plr.Character[targetpart].Position-Player.Character[targetpart].Position).unit*2048)
  324. local part,point = workspace:FindPartOnRayWithIgnoreList(ray,{Camera,Player.Character,unpack(windows)})
  325. local dist = (Vector2.new(Mouse.X,Mouse.Y)-Vector2.new(pos.X,pos.Y)).magnitude
  326. if part and part:IsDescendantOf(plr.Character) and pos.Z>0 and dist <= Camera.ViewportSize.X/(90/fov) and dist < lowest and (ffa or plr.TeamColor~=Player.TeamColor) then lowest = dist nearest = plr.Character end
  327. end
  328. end
  329. end
  330. return nearest
  331. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement