Advertisement
brorlly

Untitled

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