Advertisement
asdasdsadwa

Untitled

May 13th, 2022
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.72 KB | None | 0 0
  1. local configs = {
  2. main = {
  3. enabled = true,
  4. aimlockkey = "q",
  5. prediction = 0.120167,
  6. aimpart = 'UpperTorso', -- Head, UpperTorso, HumanoidRootPart, LowerTorso
  7. notifications = true
  8. }
  9. }
  10.  
  11. -- box / marker settings
  12.  
  13. local boxsettings = {
  14. box = {
  15. Showbox = true,
  16.  
  17. boxsize = Vector3.new(3.3, 3, 2.8), -- Box Size
  18. markercolor = Color3.fromRGB(125, 12, 145), -- Marrker Color
  19. markersize = UDim2.new(5, 1, 4, 1) -- Marker Size
  20. }
  21. }
  22.  
  23. -- dont mess with anything below
  24. local box = Instance.new("Part", game.Workspace)
  25.  
  26. local Mouse = game.Players.LocalPlayer:GetMouse()
  27.  
  28. function makemarker(Parent, Adornee, Color, Size, Size2)
  29. local box = Instance.new("BillboardGui", Parent)
  30. box.Name = "PRIVATE-REWRITE!"
  31. box.Adornee = Adornee
  32. box.Size = UDim2.new(Size, Size2, Size, Size2)
  33. box.AlwaysOnTop = true
  34.  
  35. local a = Instance.new("Frame", box)
  36. a.Size = boxsettings.box.markersize
  37. a.BackgroundColor3 = Color
  38.  
  39. local g = Instance.new("UICorner", a)
  40. g.CornerRadius = UDim.new(50, 25)
  41. return (box)
  42. end
  43.  
  44. local Plr
  45. Mouse.KeyDown:Connect(function(KeyPressed)
  46. if KeyPressed == (configs.main.aimlockkey) then
  47. if configs.main.enabled == true then
  48. configs.main.enabled = false
  49. if configs.main.notifications == true then
  50. Plr = FindClosestUser()
  51. game.StarterGui:SetCore("SendNotification", {
  52. Title = "Private TAY.CC",
  53. Text = "Unlocked;"
  54. })
  55. end
  56. else
  57. Plr = FindClosestUser()
  58. configs.main.enabled = true
  59. if configs.main.notifications == true then
  60. game.StarterGui:SetCore("SendNotification", {
  61. Title = "Private TAY.CC",
  62. Text = "Locked On; " .. tostring(Plr.Character.Humanoid.DisplayName)
  63. })
  64. end
  65. end
  66. end
  67. end)
  68.  
  69. local data = game.Players:GetPlayers()
  70. function noob(player)
  71. local character
  72. repeat
  73. wait()
  74. until player.Character
  75. local handler = makemarker(guimain, player.Character:WaitForChild(configs.main.aimpart),
  76. Color3.fromRGB(107, 184, 255), 0.10, 8)
  77. handler.Name = player.Name
  78. player.CharacterAdded:connect(function(Char)
  79. handler.Adornee = Char:WaitForChild("HumanoidRootPart")
  80. end)
  81. end
  82.  
  83. for i = 1, #data do
  84. if data[i] ~= game.Players.LocalPlayer then
  85. noob(data[i])
  86. end
  87. end
  88.  
  89. game.Players.PlayerAdded:connect(function(Player)
  90. noob(Player)
  91. end)
  92.  
  93. spawn(function()
  94. box.Anchored = true
  95. box.CanCollide = false
  96. box.Size = boxsettings.box.boxsize
  97. if boxsettings.box.Showbox == true then
  98. box.Transparency = 0.70
  99. else
  100. box.Transparency = 1
  101. end
  102. makemarker(box, box, boxsettings.box.markercolor, 0.40, 1)
  103. end)
  104.  
  105. function FindClosestUser()
  106. local closestPlayer
  107. local ShortestDistance = 300
  108.  
  109. for i, v in pairs(game.Players:GetPlayers()) do
  110. if v ~= game.Players.LocalPlayer and v.Character and v.Character:FindFirstChild("Humanoid") and
  111. v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("HumanoidRootPart") then
  112. local pos = game:GetService "Workspace".CurrentCamera:WorldToViewportPoint(v.Character.PrimaryPart.Position)
  113. local magnitude = (Vector2.new(pos.X, pos.Y) -
  114. Vector2.new(game.Players.LocalPlayer:GetMouse().X,
  115. game.Players.LocalPlayer:GetMouse().Y)).magnitude
  116. if magnitude < ShortestDistance then
  117. closestPlayer = v
  118. ShortestDistance = magnitude
  119. end
  120. end
  121. end
  122. return closestPlayer
  123. end
  124.  
  125. game:GetService "RunService".Stepped:connect(function()
  126. if configs.main.enabled and Plr.Character and Plr.Character:FindFirstChild("HumanoidRootPart") then
  127. box.CFrame = CFrame.new(Plr.Character[configs.main.aimpart].Position +
  128. (Plr.Character.UpperTorso.Velocity * configs.main.prediction))
  129. else
  130. box.CFrame = CFrame.new(0, 9999, 0)
  131. end
  132. end)
  133.  
  134. repeat
  135. wait()
  136. until game:IsLoaded()
  137. local mt = getrawmetatable(game)
  138. local old = mt.__namecall
  139. setreadonly(mt, false)
  140. mt.__namecall = newcclosure(function(...)
  141. local args = {...}
  142. if configs.main.enabled and getnamecallmethod() == "FireServer" and args[2] == "UpdateMousePos" then
  143. args[3] = Plr.Character[configs.main.aimpart].Position +
  144. (Plr.Character[configs.main.aimpart].Velocity * configs.main.prediction)
  145. return old(unpack(args))
  146. end
  147. return old(...)
  148. end
  149. end) ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement