Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local UIS = game:GetService('UserInputService')
- local RS = game:GetService('RunService')
- local Players = game:GetService('Players')
- local StarterGui = game:GetService('StarterGui')
- local Player = Players.LocalPlayer
- local Studio = RS:IsStudio()
- local PlayerGui = RS:IsStudio() and Player:WaitForChild('PlayerGui') or game.CoreGui
- local Mouse = Player:GetMouse()
- local old_icon = Mouse.Icon
- local Camera = workspace.CurrentCamera
- targetpart = 'Head' -- Don't change this.
- -- It can be changed with the targetpart_change hotkey ingame.
- local target
- local target_old
- local alert = false
- local lockedon = false
- local settingkey = false
- local upvals = nil
- local val = 1
- local windows = {}
- local function hb() RS.Heartbeat:wait() end
- local version = 1.25
- local Spawn = nil or game.PlaceId == 292439477 and workspace:WaitForChild('Lobby',2):WaitForChild('Spawn1',2)
- local spawned = false
- script.Name = 'GameSense!'
- Mouse.TargetFilter = Camera
- -- hotkey
- toggle_aim = Enum.UserInputType.MouseButton2
- toggle_aimbot = Enum.KeyCode.Delete
- toggle_trigger = Enum.KeyCode.Delete
- toggle_esp = Enum.KeyCode.Delete
- toggle_gui = Enum.KeyCode.Delete
- toggle_bottompos = Enum.KeyCode.Delete
- toggle_performance = Enum.KeyCode.Delete
- toggle_bones = Enum.KeyCode.Delete
- toggle_chams = Enum.KeyCode.Delete
- toggle_tracers = Enum.KeyCode.Delete
- toggle_boxes = Enum.KeyCode.Delete
- toggle_font = Enum.KeyCode.Delete
- ffatoggle = Enum.KeyCode.Delete
- targetpart_change = Enum.KeyCode.Delete
- priority_toggle = Enum.KeyCode.Delete
- sethotkey = Enum.KeyCode.Delete
- -- aim fov
- fov_increase = Enum.KeyCode.KeypadPlus
- fov_decrease = Enum.KeyCode.KeypadMinus
- -- aim sens (how smooth your crosshair will move)
- sens_increase = Enum.KeyCode.RightBracket
- sens_decrease = Enum.KeyCode.LeftBracket
- -- parts
- parts = {
- 'Head';
- 'Torso'
- }
- fonts = {
- Enum.Font.SourceSansBold,
- Enum.Font.Cartoon,
- Enum.Font.Arcade,
- Enum.Font.SciFi,
- Enum.Font.Fantasy,
- Enum.Font.Code,
- Enum.Font.Highway,
- Enum.Font.Bodoni
- }
- textSet = false
- currentfont = 1
- ffa = false
- hidden = false
- performancemode = false
- -- aim
- fov = 6
- sens = .25
- drop = .4
- aim_toggled = false
- bottompos = true
- aim_priority = 2
- -- [2] FOV or [1] Distance
- aimingcolor = Color3.fromRGB(0,165,255)
- aimbot_toggled = true
- aim_line = true
- locksoundid = 538769304
- mouseiconid = 18671553
- -- trigger
- trigger_toggled = false
- trigger_delay = 1/20
- -- esp
- esp_toggled = false
- esp_bones = false
- esp_chams = false
- esp_tracers = false
- -- item_esp (coming soon)
- linesize = 1
- showdists = true
- textsize = 14
- textoffset = 20
- visiblecolor = Color3.fromRGB(38,255,99)
- hiddencolor = Color3.fromRGB(255,37,40)
- headboxsize = 4
- headboxaimsize = 6
- headboxshape = 'diamond'
- -- rectangle or diamond
- -- box esp
- bounding_box = true
- -- box_pointsize = 0 [UNUSED]
- box_line_size = 1
- -- box_line_size_visible = 2 [UNUSED]
- local GUI = Instance.new('ScreenGui',PlayerGui)
- GUI.Name = 'GameSense '..version
- GUI.ResetOnSpawn = false
- ESP = Instance.new('Folder',GUI)
- ESP.Name = 'ESP'
- local Bottom = Instance.new('Frame',ESP)
- Bottom.Name = 'Bottom'
- Bottom.BackgroundTransparency = 1
- Bottom.Size = UDim2.new(0,1,0,1)
- Bottom.Position = UDim2.new(.5,0,1,1)
- local Status = Instance.new('TextLabel',GUI)
- Status.Name = 'Status'
- Status.BackgroundTransparency = 1
- Status.Size = UDim2.new(0,500,0,50)
- Status.Position = UDim2.new(.5,-250,.85,0)
- Status.TextSize = 0
- Status.Font = Enum.Font.SourceSansBold
- Status.TextColor3 = Color3.new(1,1,1)
- Status.TextStrokeColor3 = Color3.new(0,0,0)
- Status.TextStrokeTransparency = .6
- Status.Text = 'On Standby'
- Status.ZIndex = 50
- local Credits = Status:Clone()
- Credits.Name = 'Credits'
- Credits.Parent = GUI
- Credits.Position = UDim2.new(-1000000,-1000000,-1000000,-1000000)
- Credits.TextSize = 0
- Credits.Text = 'GameSense '..version..' by Avexus!'
- local FovGui = Instance.new('ImageLabel',GUI)
- FovGui.Name = 'FovGui'
- FovGui.Image = 'rbxassetid://324848180'
- FovGui.Size = UDim2.new(0,(Camera.ViewportSize.X/(90/fov))*2,0,(Camera.ViewportSize.X/(90/fov))*2)
- FovGui.Position = UDim2.new(0.5,-FovGui.AbsoluteSize.X/2,0.5,-FovGui.AbsoluteSize.Y/2)
- FovGui.BackgroundTransparency = 1
- FovGui.ImageTransparency = 0.7
- FovGui.ImageColor3 = Color3.new(1,0,0)
- local Indicator = Instance.new('TextLabel',GUI)
- Indicator.Name = 'Indicator'
- Indicator.Font = Enum.Font.SourceSans
- Indicator.TextSize = 0
- Indicator.TextXAlignment = Enum.TextXAlignment.Center
- Indicator.TextYAlignment = Enum.TextYAlignment.Center
- Indicator.TextStrokeTransparency = 1
- Indicator.Text = aim_priority>1 and 'FOV: '..fov or 'Distance'
- local SensAdjust = Instance.new('TextBox',GUI)
- SensAdjust.Name = 'SensAdjust'
- SensAdjust.Font = Enum.Font.SourceSans
- SensAdjust.BackgroundTransparency = .75
- SensAdjust.BackgroundColor3 = Color3.new(0,0,0)
- SensAdjust.BorderColor3 = Color3.new(1,1,1)
- SensAdjust.Size = UDim2.new(0,50,0,20)
- SensAdjust.TextStrokeTransparency = 1
- SensAdjust.TextColor3 = Color3.new(1,1,1)
- SensAdjust.TextSize = 0
- SensAdjust.PlaceholderText = 'Sens'
- SensAdjust.Text = tonumber(sens)
- SensAdjust.Position = Credits.Position + UDim2.new(0,250,0,75)
- local SensLabel = Instance.new('TextLabel',SensAdjust)
- SensLabel.Name = 'SensLabel'
- SensLabel.Font = Enum.Font.SourceSans
- SensLabel.Size = UDim2.new(1,0,1,0)
- SensLabel.BackgroundTransparency = 1
- SensLabel.TextSize = 0
- SensLabel.TextColor3 = Color3.new(1,1,1)
- SensLabel.TextStrokeColor3 = Color3.new(0,0,0)
- SensLabel.TextStrokeTransparency = 1
- SensLabel.Text = 'Sens:'
- SensLabel.Position = UDim2.new(-1,0,0,0)
- SensLabel.TextXAlignment = Enum.TextXAlignment.Left
- local FovAdjust = SensAdjust:Clone()
- FovAdjust.Parent = GUI
- FovAdjust.PlaceholderText = 'FOV'
- FovAdjust.Name = 'FovAdjust'
- FovAdjust.Text = tonumber(fov)
- FovAdjust.Position = SensAdjust.Position + UDim2.new(0,0,0,20)
- FovAdjust.SensLabel.Name = 'FovLabel'
- FovAdjust.FovLabel.Text = 'Fov:'
- local DropAdjust = SensAdjust:Clone()
- DropAdjust.Parent = GUI
- DropAdjust.PlaceholderText = 'Drop'
- DropAdjust.Name = 'DropAdjust'
- DropAdjust.Text = tonumber(drop)
- DropAdjust.Position = SensAdjust.Position + UDim2.new(0,0,0,40)
- DropAdjust.SensLabel.Name = 'DropLabel'
- DropAdjust.DropLabel.Text = 'Drop:'
- local KeysList = Instance.new('TextLabel',GUI)
- KeysList.Name = 'KeysList'
- KeysList.Font = Enum.Font.SourceSans
- KeysList.TextStrokeTransparency = .6
- KeysList.TextSize = 0
- KeysList.TextColor3 = Color3.new(1,1,1)
- KeysList.Size = UDim2.new(0,0,1,0)
- KeysList.Position = UDim2.new(0,5,0,-280)
- KeysList.BackgroundTransparency = 1
- KeysList.Active = false
- local n = 0
- spawn(function()
- while Status do
- Indicator.TextColor3 = Color3.fromHSV(n,.5,1)
- FovGui.ImageColor3 = Indicator.TextColor3
- if not textSet then
- if aim_toggled and target then
- Status.TextColor3 = aimingcolor
- Status.Text = ('Aiming at '..target.Name)
- else
- Status.TextColor3 = Color3.fromHSV(n,.5,1)
- Status.Text = 'On Standby'
- end
- end
- n = (n+.005)%1
- hb()
- end
- end)
- SensAdjust.InputEnded:Connect(function() if SensAdjust.Text~='' then sens = tonumber(SensAdjust.Text)>0 and tonumber(SensAdjust.Text) or sens end end)
- FovAdjust.InputEnded:Connect(function() if FovAdjust.Text~='' then fov = tonumber(FovAdjust.Text)>0 and tonumber(FovAdjust.Text) or fov
- 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)
- DropAdjust.InputEnded:Connect(function() if DropAdjust.Text~='' then drop = tonumber(DropAdjust.Text)>=0 and tonumber(DropAdjust.Text) or drop end end)
- local function distfromspawn(x)
- if Spawn then
- return x:DistanceFromCharacter(Spawn.Position)
- else
- return 201
- end
- end
- local function setText(text)
- spawn(function()
- textSet = true
- Status.Text = text
- Status.TextColor3 = Color3.new(1,1,1)
- wait(#text/4)
- textSet = false
- end)
- end
- local function playsound(id)
- local sound = Instance.new('Sound',Camera)
- sound.Volume = 3
- sound:Play()
- game:GetService('Debris'):AddItem(sound,5)
- end
- local function DrawLine(Folder,P1,P2,Thickness,Color,LineTransparency,BorderThickness,BorderColor)
- -- Declare variables
- local Point1,Point2 = P1.Position,P2.Position
- if Point1 and Point2 then
- local X,Y = Camera.ViewportSize.X, Camera.ViewportSize.Y
- 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)
- 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)
- local MidX,MidY = (X1+X2)/2, (Y1+Y2)/2
- -- Set defaults to prevent errors
- Thickness = Thickness or 1
- Color = Color or Color3.new(1,1,1)
- LineTransparency = LineTransparency or 0
- BorderThickness = BorderThickness or 0
- BorderColor = BorderColor or Color3.new(0,0,0)
- -- Draw the line
- local Line = Folder:FindFirstChild(P1.Name..'-'..P2.Name) or Instance.new('Frame',Folder)
- Line.Visible = false
- Line.BackgroundTransparency = LineTransparency
- Line.BorderSizePixel = BorderThickness
- Line.BorderColor3 = BorderColor
- Line.Size = UDim2.new(0,(Vector2.new(X1,Y1) - Vector2.new(X2,Y2)).magnitude-1,0,Thickness)
- Line.Position = UDim2.new(0,MidX-Line.AbsoluteSize.X/2,0,MidY-Line.AbsoluteSize.Y)
- Line.BackgroundColor3 = Color
- Line.Rotation = math.deg(math.atan2((Y2-Y1),(X2-X1)))
- Line.Name = P1.Name..'-'..P2.Name
- Line.Visible = true
- return Line
- else
- return nil
- end
- end
- local function GetNearest(Mode)
- local lowest,nearest,gui = math.huge,nil,nil
- if Mode==1 then
- for _,plr in next,Players:GetPlayers() do
- if plr.Name~=Player.Name and plr.Character~=nil and plr.Character:FindFirstChild(targetpart) then
- local dist = Player:DistanceFromCharacter(plr.Character[targetpart].Position)
- local ray = Ray.new(Player.Character.Head.Position,(plr.Character[targetpart].Position-Player.Character.Head.Position).unit*5000)
- local part,point = workspace:FindPartOnRayWithIgnoreList(ray,{Camera,Player.Character,unpack(windows)})
- local Z = Camera:WorldToScreenPoint(plr.Character[targetpart].Position).Z
- 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
- end
- end
- elseif Mode==2 then
- for _,plr in next,Players:GetPlayers() do
- if plr.Name~=Player.Name and plr.Character~=nil and plr.Character:FindFirstChild(targetpart) then
- local pos = Camera:WorldToScreenPoint(plr.Character[targetpart].Position)
- local ray = Ray.new(Player.Character[targetpart].Position,(plr.Character[targetpart].Position-Player.Character[targetpart].Position).unit*2048)
- local part,point = workspace:FindPartOnRayWithIgnoreList(ray,{Camera,Player.Character,unpack(windows)})
- local dist = (Vector2.new(Mouse.X,Mouse.Y)-Vector2.new(pos.X,pos.Y)).magnitude
- 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
- end
- end
- end
- return nearest
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement