Advertisement
noyonnm987741

Untitled

Jun 1st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.73 KB | None | 0 0
  1. do --SIGHT
  2. local plr = game.Players.LocalPlayer
  3. local allsguis = {}
  4.  
  5. local enabled = false
  6.  
  7. local dohax = function(lbplr)
  8. wait() --make sure the character exists
  9. if not lbplr.Character then return end
  10. for _,obj in next,lbplr.Character:children() do
  11. if obj:IsA("BasePart") then
  12. local sguis = {}
  13. local snew = function(...)
  14. for _,face in next,{...} do
  15. local sgui = Instance.new("SurfaceGui",obj)
  16. sgui.Enabled = enabled
  17. sgui.AlwaysOnTop = true
  18. sgui.Face = face
  19. table.insert(sguis,sgui)
  20. sgui.AncestryChanged:connect(function()
  21. for i,v in next,sguis do
  22. if v == sgui then
  23. table.remove(sguis,i)
  24. sgui:destroy()
  25. end
  26. end
  27. end)
  28. end
  29. end
  30. snew("Front", "Back", "Left", "Right", "Top", "Bottom")
  31. for _,sgui in next,sguis do
  32. local sframe = Instance.new("Frame",sgui)
  33. sframe.Size = UDim2.new(1,0,1,0)
  34. sframe.BorderSizePixel = 0
  35. sframe.BackgroundTransparency = .5
  36. sframe.BackgroundColor3 = lbplr.TEEM.Value == plr.TEEM.Value and BrickColor.new("Really blue").Color or BrickColor.new("Really red").Color
  37. end
  38. table.insert(allsguis,sguis)
  39. end
  40. end
  41. end
  42.  
  43. local connectPlayer = function(lbplr)
  44. if lbplr ~= plr then
  45. dohax(lbplr)
  46. lbplr.CharacterAdded:connect(function(char)
  47. dohax(lbplr)
  48. end)
  49. end
  50. end
  51.  
  52. for _,v in next,game.Players:GetPlayers() do
  53. connectPlayer(v)
  54. end
  55.  
  56. game.Players.PlayerAdded:connect(function(p)
  57. connectPlayer(p)
  58. end)
  59.  
  60. game:GetService("UserInputService").InputBegan:connect(function(input)
  61. if input.KeyCode == Enum.KeyCode.BackSlash then
  62. enabled = not enabled
  63. for _,v in next,allsguis do
  64. for __,vv in next,v do
  65. vv.Enabled = enabled
  66. end
  67. end
  68. end
  69. end)
  70. end
  71.  
  72. do --AIM
  73. local cam = game:GetService("Workspace").CurrentCamera
  74. local plrs = game:GetService("Players"):GetPlayers()
  75. local lplr = game:GetService("Players").LocalPlayer
  76.  
  77. local aiming = false
  78. local dolerp = true
  79.  
  80. game:GetService("RunService"):BindToRenderStep("UpdateCamera", Enum.RenderPriority.Camera.Value, function()
  81. if not aiming or not lplr.Character or not lplr.Character:FindFirstChild("Head") then return end
  82. local cchar,cdist
  83. for _,plr in next,plrs do
  84. if plr ~= lplr and plr.TEEM.Value ~= lplr.TEEM.Value then
  85. local char = plr.Character
  86. if char and char:FindFirstChild("Head") then
  87. local hit = workspace:FindPartOnRay(Ray.new((cam.CFrame*CFrame.new(0,0,-5)).p, char.Head.Position - (cam.CFrame*CFrame.new(0,0,-5)).p))
  88. if hit and hit.Parent and hit.Parent == char or hit.Parent.Parent == char then
  89. local dist = (char.Head.Position - lplr.Character.Head.Position).magnitude
  90. if cdist == nil or dist < cdist then
  91. cdist = dist
  92. cchar = char
  93. end
  94. end
  95. end
  96. end
  97. end
  98. if not cchar then return end
  99. cam.CFrame = dolerp and cam.CFrame:lerp(CFrame.new(cam.CFrame.p, cchar.Head.CFrame.p), .15) or CFrame.new(cam.CFrame.p, cchar.Head.CFrame.p)
  100. end)
  101.  
  102. game.Players.PlayerAdded:connect(function(plr)
  103. table.insert(plrs,plr)
  104. end)
  105.  
  106. game.Players.PlayerRemoving:connect(function(plr)
  107. for i,v in next,plrs do
  108. if v == plr then
  109. table.remove(plrs,i)
  110. end
  111. end
  112. end)
  113.  
  114. game:GetService("UserInputService").InputBegan:connect(function(input)
  115. if input.KeyCode == Enum.KeyCode.CapsLock then
  116. aiming = not aiming
  117. elseif input.KeyCode == Enum.KeyCode.RightBracket then
  118. dolerp = true
  119. elseif input.KeyCode == Enum.KeyCode.LeftBracket then
  120. dolerp = false
  121. end
  122. end)
  123. end
  124.  
  125. do --OMGWHAT
  126. local plr = game.Players.LocalPlayer
  127. game:GetService("UserInputService").InputBegan:connect(function(input)
  128. if input.KeyCode == Enum.KeyCode.L then
  129. if not plr.Character or not plr.Character:FindFirstChild("Head") then return end
  130. for _,v in next,game.Players:children() do
  131. if v ~= plr and v.TEEM.Value ~= plr.TEEM.Value and v.Character and v.Character:FindFirstChild("Head") and v.Character:FindFirstChild("Torso") and v.Character.Torso:FindFirstChild("Neck") then
  132. local char = v.Character
  133. local head = char.Head
  134. char.Torso["Neck"]:destroy()
  135. head.Anchored = true
  136. head.CanCollide = false
  137. head.Transparency = 1
  138. head.face:destroy()
  139. for _,vv in next,head:children() do
  140. if vv:IsA("SurfaceGui") then
  141. vv:destroy()
  142. end
  143. end
  144. local rs = game:GetService("RunService").RenderStepped:connect(function()
  145. head.CFrame = plr.Character.Head.CFrame*CFrame.new(0,0,-5)
  146. end)
  147. head.AncestryChanged:connect(function()
  148. rs:disconnect()
  149. end)
  150. plr.Character.Head.AncestryChanged:connect(function()
  151. rs:disconnect()
  152. end)
  153. end
  154. end
  155. end
  156. end)
  157. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement