Advertisement
asdasdsadwa

Untitled

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