Advertisement
brorlly

Untitled

Dec 21st, 2022
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.41 KB | None | 0 0
  1.  
  2. local key1 = ""..math.random(9999,9999)
  3. local Rayfield = loadstring(game:HttpGet('https://raw.githubusercontent.com/shlexware/Rayfield/main/source'))()
  4.  
  5. -- Windows
  6. local Window = Rayfield:CreateWindow({
  7. Name = "Update Logs WIll Be here soon",
  8. LoadingTitle = "Rayfield Interface Suite",
  9. LoadingSubtitle = "by ToggleHub",
  10. KeySystem = true,
  11. KeySettings = {
  12. Title = "Toggle Hub",
  13. Subtitle = "Key System",
  14. Note = "Welcome Back Alpha "..key1,
  15. Key = key1
  16. }
  17. })
  18. local rs = game:GetService("RunService")
  19. local uis = game:GetService("UserInputService")
  20.  
  21. local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
  22. local Window = Library.CreateLib("ToggleHub-Paid-AlphaSwag#", "DarkTheme")
  23.  
  24. local AimbotTab = Window:NewTab("Aimbot")
  25. local AimbotSection = AimbotTab:NewSection("Aimbot")
  26.  
  27. local EspTab = Window:NewTab("ESP")
  28. local EspSection = EspTab:NewSection("ESP")
  29.  
  30. local ExperimentalTab = Window:NewTab("PATCHED")
  31. local SASection = ExperimentalTab:NewSection("Silent Aim(NOTWORKING")
  32.  
  33. local BindsTab = Window:NewTab("Binds")
  34. local BindsSection = BindsTab:NewSection("Binds")
  35.  
  36. local ColorTab = Window:NewTab("Color")
  37. local ColorSection = ColorTab:NewSection("Color")
  38.  
  39.  
  40. Blacklisted = {"Flame", "SightMark", "SightMark2A", "Tip", "Trigger"}
  41.  
  42. workspace.CurrentCamera.DescendantAdded:Connect(function(O)
  43. if O:IsA("BasePart") and not table.find(Blacklisted, O.Name) then
  44. spawn(function()
  45. while wait() do
  46. O.Color = Color3.fromHSV((tick() % 5 / 5), 1, 1)
  47. O.Transparency = 0.8
  48. O.Material = Enum.Material.ForceField
  49. end
  50. end)
  51. end
  52. end)
  53.  
  54.  
  55. local AbColor = Color3.fromRGB(255, 128, 128)
  56. local EspColor = Color3.fromRGB(255, 128, 128)
  57.  
  58. ColorSection:NewColorPicker("Fov Ring Color", "", Color3.fromRGB(255,128,128), function(color)
  59. AbColor = color
  60. end)
  61.  
  62. ColorSection:NewColorPicker("Esp Color", "", Color3.fromRGB(255,128,128), function(color)
  63. EspColor = color
  64. end)
  65.  
  66.  
  67. local function getTeam()
  68. -- PF Sometimes changes the team names, if this is depreicated and not working,
  69. -- you might be able to fix it by using dark dex to get the team names
  70. local localPlayerGhostsTeamName = "Ghosts" -- the actual name of team ghosts
  71. local playerFolderGhostsTeamName = "Bright orange" -- the name of the folder phantoms players are in
  72. local playerFolderPhantomsTeamName = "Bright blue" -- the name of the folder ghost players are in
  73.  
  74. if game.Players.LocalPlayer.Team.Name == localPlayerGhostsTeamName then return playerFolderPhantomsTeamName else return playerFolderGhostsTeamName end
  75. end
  76.  
  77. local smoothing = 1
  78. local fov = 500
  79. local wallCheck = false
  80. local maxWalls = 0
  81. local abTargetPart = "Head"
  82. local FOVringList = {}
  83.  
  84. local function isPointVisible(targetForWallCheck, mw)
  85. local castPoints = {targetForWallCheck.PrimaryPart.Position}
  86. local ignoreList = {targetForWallCheck, game.Players.LocalPlayer.Character, game.Workspace.CurrentCamera}
  87. local result = workspace.CurrentCamera:GetPartsObscuringTarget(castPoints, ignoreList)
  88.  
  89. return #result <= mw
  90. end
  91.  
  92. AimbotSection:NewToggle("Enabled", "", function(state)
  93. if state then
  94. FOVringList = {}
  95. abLoop = rs.RenderStepped:Connect(function()
  96. for i,v in pairs(FOVringList) do
  97. v:Remove()
  98. end
  99.  
  100. FOVringList = {}
  101.  
  102. local FOVring = Drawing.new("Circle")
  103. FOVring.Visible = true
  104. FOVring.Thickness = 2
  105. FOVring.Radius = fov / workspace.CurrentCamera.FieldOfView
  106. FOVring.Transparency = 1
  107. FOVring.Color = AbColor
  108. FOVring.Position = game.Workspace.CurrentCamera.ViewportSize/2
  109.  
  110. FOVringList[#FOVringList+1] = FOVring
  111.  
  112. local team = getTeam()
  113.  
  114. local target = Vector2.new(math.huge, math.huge)
  115. local targetPos
  116. local targetPlayer
  117. if game.Workspace.Players:FindFirstChild(team) then
  118. for i,v in pairs(game.Workspace.Players:FindFirstChild(team):GetChildren()) do
  119. local pos = v[abTargetPart].Position
  120. local ScreenSpacePos, IsOnScreen = game.Workspace.CurrentCamera:WorldToViewportPoint(pos)
  121. ScreenSpacePos = Vector2.new(ScreenSpacePos.X, ScreenSpacePos.Y) - game.Workspace.CurrentCamera.ViewportSize/2
  122.  
  123. if IsOnScreen and ScreenSpacePos.Magnitude < target.Magnitude and (isPointVisible(v, maxWalls) or not wallCheck) then
  124. target = ScreenSpacePos
  125. targetPos = pos
  126. targetPlayer = v
  127. end
  128. end
  129. end
  130.  
  131. if target.Magnitude <= fov / workspace.CurrentCamera.FieldOfView and uis:IsMouseButtonPressed(Enum.UserInputType.MouseButton2) then
  132. if target ~= Vector2.new(math.huge, math.huge) then
  133. mousemoverel(target.X/smoothing, target.Y/smoothing)
  134. end
  135. end
  136. end)
  137. else
  138. abLoop:Disconnect()
  139. for i,v in pairs(FOVringList) do
  140. v:Remove()
  141. end
  142. end
  143. end)
  144. AimbotSection:NewToggle("Wall Check", "", function(state) wallCheck = state end)
  145. AimbotSection:NewSlider("Max Wallbangs", "Inclusive", 50, 0, function(s) maxWalls = s end)
  146. AimbotSection:NewSlider("Fov", "", 50000, 500, function(s) fov = s end)
  147. AimbotSection:NewSlider("Smoothing", "", 300, 100, function(s) smoothing = s/100 end)
  148. AimbotSection:NewDropdown("Target Part", "", {"Head", "Torso", "Right Arm", "Left Arm", "Right Leg", "Left Leg"}, function(currentOption) abTargetPart = currentOption end)
  149.  
  150.  
  151.  
  152.  
  153.  
  154. local saTargetPart = "Head"
  155. local safov = 500
  156. local panicMode = false
  157. local panicDistance = 5
  158. local saWallCheck = false
  159. local saWallBangs = 0
  160. local gunCF
  161. local motor
  162. local sa = false
  163. local saFovRingList = {}
  164.  
  165. saLoop = rs.RenderStepped:Connect(function()
  166. for i,v in pairs(saFovRingList) do
  167. v:Remove()
  168. end
  169.  
  170. saFovRingList = {}
  171. if not sa then return end
  172. local FOVring = Drawing.new("Circle")
  173. FOVring.Visible = true
  174. FOVring.Thickness = 2
  175. FOVring.Radius = safov / workspace.CurrentCamera.FieldOfView
  176. FOVring.Transparency = 1
  177. FOVring.Color = AbColor
  178. FOVring.Position = game.Workspace.CurrentCamera.ViewportSize/2
  179.  
  180. saFovRingList[#saFovRingList+1] = FOVring
  181.  
  182. local team = getTeam()
  183.  
  184. local targetPos
  185. local last = Vector2.new(math.huge, math.huge)
  186. if game.Workspace.Players:FindFirstChild(team) then
  187. for i,v in pairs(game.Workspace.Players:FindFirstChild(team):GetChildren()) do
  188. local pos = v[saTargetPart].Position
  189. local ScreenSpacePos, IsOnScreen = game.Workspace.CurrentCamera:WorldToViewportPoint(pos)
  190. ScreenSpacePos = Vector2.new(ScreenSpacePos.X, ScreenSpacePos.Y) - game.Workspace.CurrentCamera.ViewportSize/2
  191.  
  192. if (v[saTargetPart].Position - Workspace.CurrentCamera.CFrame.Position).Magnitude <= panicDistance and panicMode then
  193. targetPos = pos
  194. break
  195. end
  196.  
  197. if IsOnScreen and ScreenSpacePos.Magnitude < last.Magnitude and ScreenSpacePos.Magnitude <= (safov / workspace.CurrentCamera.FieldOfView) and (isPointVisible(v, saWallBangs) or not saWallCheck) then
  198. last = ScreenSpacePos
  199. targetPos = pos
  200. end
  201. end
  202. end
  203. if targetPos then
  204. motor = Workspace.CurrentCamera:GetChildren()[3].Trigger.Motor6D
  205. local cf = motor.C0
  206.  
  207. local cf2 = CFrame.new(motor.Part0.CFrame:ToWorldSpace(cf).Position, targetPos)
  208. gunCF = motor.Part0.CFrame:ToObjectSpace(cf2)
  209. else
  210. gunCF = nil
  211. motor = nil
  212. end
  213. end)
  214. local OldIndex
  215. OldIndex = hookmetamethod(game, "__newindex", newcclosure(function(...)
  216. local Self, Key, Value = ...
  217.  
  218. if sa and motor and gunCF and Self == motor and Key == "C0" then
  219. return OldIndex(Self, Key, gunCF)
  220. end
  221.  
  222. return OldIndex(...)
  223. end))
  224.  
  225. SASection:NewToggle("Silent Aim", "", function(state)
  226. sa = state
  227. end)
  228.  
  229. SASection:NewToggle("Wall Check", "", function(state) saWallCheck = state end)
  230. SASection:NewSlider("Max Wallbangs", "Inclusive", 50, 0, function(s) saWallBangs = s end)
  231. SASection:NewSlider("Fov", "", 50000, 500, function(s) safov = s end)
  232. SASection:NewDropdown("Target Part", "", {"Head", "Torso", "Right Arm", "Left Arm", "Right Leg", "Left Leg"}, function(currentOption)saTargetPart = currentOption end)
  233. SASection:NewToggle("Panic Mode", "Will track closest player if they are within panic distance", function(state) panicMode = state end)
  234. SASection:NewSlider("Panic Distance", "", 40, 5, function(s) panicDistance = s end)
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241. local LineList = {}
  242. local width = 3
  243. local height = 5
  244.  
  245. EspSection:NewToggle("Enabled", "", function(state)
  246. if state then
  247. LineList = {}
  248. espLoop = rs.RenderStepped:Connect(function()
  249. for i,v in pairs(LineList) do
  250. if v then
  251. v:Remove()
  252. end
  253. end
  254.  
  255. local team = getTeam()
  256.  
  257. LineList = {}
  258. if game.Workspace.Players:FindFirstChild(team) then
  259. for i,v in pairs(game.Workspace.Players:FindFirstChild(team):GetChildren()) do
  260. local pos = v.PrimaryPart.Position
  261. local ScreenSpacePos, IsOnScreen = game.Workspace.CurrentCamera:WorldToViewportPoint(pos)
  262.  
  263. a = game.Workspace.CurrentCamera:WorldToViewportPoint(v.Torso.CFrame:PointToWorldSpace(Vector3.new(width/2, height/2, 0)))
  264. b = game.Workspace.CurrentCamera:WorldToViewportPoint(v.Torso.CFrame:PointToWorldSpace(Vector3.new(-width/2, height/2, 0)))
  265. c = game.Workspace.CurrentCamera:WorldToViewportPoint(v.Torso.CFrame:PointToWorldSpace(Vector3.new(-width/2, -height/2, 0)))
  266. d = game.Workspace.CurrentCamera:WorldToViewportPoint(v.Torso.CFrame:PointToWorldSpace(Vector3.new(width/2, -height/2, 0)))
  267.  
  268. a = Vector2.new(a.X, a.Y)
  269. b = Vector2.new(b.X, b.Y)
  270. c = Vector2.new(c.X, c.Y)
  271. d = Vector2.new(d.X, d.Y)
  272.  
  273. if IsOnScreen then
  274. local Line = Drawing.new("Quad")
  275. Line.Visible = true
  276. Line.PointA = a
  277. Line.PointB = b
  278. Line.PointC = c
  279. Line.PointD = d
  280. Line.Color = EspColor
  281. Line.Thickness = 2
  282. Line.Transparency = 1
  283.  
  284. LineList[#LineList+1] = Line
  285. end
  286. end
  287. end
  288. end)
  289. else
  290. espLoop:Disconnect()
  291. for i,v in pairs(LineList) do
  292. v:Remove()
  293. end
  294. LineList = {}
  295. end
  296. end)
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310. BindsSection:NewKeybind("Toggle UI", "", Enum.KeyCode.B, function()
  311. Library:ToggleUI()
  312. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement