Advertisement
Guest User

Phantom Forces GUI Script Cheat

a guest
Oct 2nd, 2021
728
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.12 KB | None | 0 0
  1. Itt a script:
  2. (első localtól kell kimácsolni)
  3.  
  4.  
  5. local rs = game:GetService("RunService")
  6. local uis = game:GetService("UserInputService")
  7.  
  8. local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
  9. local Window = Library.CreateLib("CNF'S PF-Hack", "DarkTheme")
  10.  
  11. local AimbotTab = Window:NewTab("Aimbot")
  12. local AimbotSection = AimbotTab:NewSection("Aimbot")
  13.  
  14. local EspTab = Window:NewTab("ESP")
  15. local EspSection = EspTab:NewSection("ESP")
  16.  
  17. local ExperimentalTab = Window:NewTab("Experimental")
  18. local SASection = ExperimentalTab:NewSection("Silent Aim")
  19.  
  20. local BindsTab = Window:NewTab("Binds")
  21. local BindsSection = BindsTab:NewSection("Binds")
  22.  
  23. local ColorTab = Window:NewTab("Color")
  24. local ColorSection = ColorTab:NewSection("Color")
  25.  
  26.  
  27.  
  28.  
  29.  
  30. local AbColor = Color3.fromRGB(255, 128, 128)
  31. local EspColor = Color3.fromRGB(255, 128, 128)
  32.  
  33. ColorSection:NewColorPicker("Fov Ring Color", "", Color3.fromRGB(255,128,128), function(color)
  34. AbColor = color
  35. end)
  36.  
  37. ColorSection:NewColorPicker("Esp Color", "", Color3.fromRGB(255,128,128), function(color)
  38. EspColor = color
  39. end)
  40.  
  41.  
  42.  
  43. local smoothing = 1
  44. local fov = 500
  45. local wallCheck = false
  46. local maxWalls = 0
  47. local abTargetPart = "Head"
  48. local FOVringList = {}
  49.  
  50. local function isPointVisible(targetForWallCheck, mw)
  51. local castPoints = {targetForWallCheck.PrimaryPart.Position}
  52. local ignoreList = {targetForWallCheck, game.Players.LocalPlayer.Character, game.Workspace.CurrentCamera}
  53. local result = workspace.CurrentCamera:GetPartsObscuringTarget(castPoints, ignoreList)
  54.  
  55. return #result <= mw
  56. end
  57.  
  58. AimbotSection:NewToggle("Enabled", "", function(state)
  59. if state then
  60. FOVringList = {}
  61. abLoop = rs.RenderStepped:Connect(function()
  62. for i,v in pairs(FOVringList) do
  63. v:Remove()
  64. end
  65.  
  66. FOVringList = {}
  67.  
  68. local FOVring = Drawing.new("Circle")
  69. FOVring.Visible = true
  70. FOVring.Thickness = 2
  71. FOVring.Radius = fov / workspace.CurrentCamera.FieldOfView
  72. FOVring.Transparency = 1
  73. FOVring.Color = AbColor
  74. FOVring.Position = game.Workspace.CurrentCamera.ViewportSize/2
  75.  
  76. FOVringList[#FOVringList+1] = FOVring
  77.  
  78. local team
  79. if game.Players.LocalPlayer.Team.Name == "Ghosts" then team = "Phantoms" else team = "Ghosts" end
  80.  
  81. local target = Vector2.new(math.huge, math.huge)
  82. local targetPos
  83. local targetPlayer
  84. if game.Workspace.Players:FindFirstChild(team) then
  85. for i,v in pairs(game.Workspace.Players:FindFirstChild(team):GetChildren()) do
  86. local pos = v[abTargetPart].Position
  87. local ScreenSpacePos, IsOnScreen = game.Workspace.CurrentCamera:WorldToViewportPoint(pos)
  88. ScreenSpacePos = Vector2.new(ScreenSpacePos.X, ScreenSpacePos.Y) - game.Workspace.CurrentCamera.ViewportSize/2
  89.  
  90. if IsOnScreen and ScreenSpacePos.Magnitude < target.Magnitude and (isPointVisible(v, maxWalls) or not wallCheck) then
  91. target = ScreenSpacePos
  92. targetPos = pos
  93. targetPlayer = v
  94. end
  95. end
  96. end
  97.  
  98. if target.Magnitude <= fov / workspace.CurrentCamera.FieldOfView and uis:IsMouseButtonPressed(Enum.UserInputType.MouseButton2) then
  99. if target ~= Vector2.new(math.huge, math.huge) then
  100. mousemoverel(target.X/smoothing, target.Y/smoothing)
  101. end
  102. end
  103. end)
  104. else
  105. abLoop:Disconnect()
  106. for i,v in pairs(FOVringList) do
  107. v:Remove()
  108. end
  109. end
  110. end)
  111. AimbotSection:NewToggle("Wall Check", "", function(state) wallCheck = state end)
  112. AimbotSection:NewSlider("Max Wallbangs", "Inclusive", 50, 0, function(s) maxWalls = s end)
  113. AimbotSection:NewSlider("Fov", "", 50000, 500, function(s) fov = s end)
  114. AimbotSection:NewSlider("Smoothing", "", 300, 100, function(s) smoothing = s/100 end)
  115. AimbotSection:NewDropdown("Target Part", "", {"Head", "Torso", "Right Arm", "Left Arm", "Right Leg", "Left Leg"}, function(currentOption) abTargetPart = currentOption end)
  116.  
  117.  
  118.  
  119. local saTargetPart = "Head"
  120. local safov = 500
  121. local panicMode = false
  122. local panicDistance = 5
  123. local saWallCheck = false
  124. local saWallBangs = 0
  125. local gunCF
  126. local motor
  127. local sa = false
  128. local saFovRingList = {}
  129.  
  130. saLoop = rs.RenderStepped:Connect(function()
  131. for i,v in pairs(saFovRingList) do
  132. v:Remove()
  133. end
  134.  
  135. saFovRingList = {}
  136. if not sa then return end
  137. local FOVring = Drawing.new("Circle")
  138. FOVring.Visible = true
  139. FOVring.Thickness = 2
  140. FOVring.Radius = safov / workspace.CurrentCamera.FieldOfView
  141. FOVring.Transparency = 1
  142. FOVring.Color = AbColor
  143. FOVring.Position = game.Workspace.CurrentCamera.ViewportSize/2
  144.  
  145. saFovRingList[#saFovRingList+1] = FOVring
  146.  
  147. local team
  148. if game.Players.LocalPlayer.Team.Name == "Ghosts" then team = "Phantoms" else team = "Ghosts" end
  149.  
  150. local targetPos
  151. local last = Vector2.new(math.huge, math.huge)
  152. if game.Workspace.Players:FindFirstChild(team) then
  153. for i,v in pairs(game.Workspace.Players:FindFirstChild(team):GetChildren()) do
  154. local pos = v[saTargetPart].Position
  155. local ScreenSpacePos, IsOnScreen = game.Workspace.CurrentCamera:WorldToViewportPoint(pos)
  156. ScreenSpacePos = Vector2.new(ScreenSpacePos.X, ScreenSpacePos.Y) - game.Workspace.CurrentCamera.ViewportSize/2
  157.  
  158. if (v[saTargetPart].Position - Workspace.CurrentCamera.CFrame.Position).Magnitude <= panicDistance and panicMode then
  159. targetPos = pos
  160. break
  161. end
  162.  
  163. if IsOnScreen and ScreenSpacePos.Magnitude < last.Magnitude and ScreenSpacePos.Magnitude <= (safov / workspace.CurrentCamera.FieldOfView) and (isPointVisible(v, saWallBangs) or not saWallCheck) then
  164. last = ScreenSpacePos
  165. targetPos = pos
  166. end
  167. end
  168. end
  169. if targetPos then
  170. motor = Workspace.CurrentCamera:GetChildren()[3].Trigger.Motor6D
  171. local cf = motor.C0
  172.  
  173. local cf2 = CFrame.new(motor.Part0.CFrame:ToWorldSpace(cf).Position, targetPos)
  174. gunCF = motor.Part0.CFrame:ToObjectSpace(cf2)
  175. else
  176. gunCF = nil
  177. motor = nil
  178. end
  179. end)
  180. local OldIndex
  181. OldIndex = hookmetamethod(game, "__newindex", newcclosure(function(...)
  182. local Self, Key, Value = ...
  183.  
  184. if sa and motor and gunCF and Self == motor and Key == "C0" then
  185. return OldIndex(Self, Key, gunCF)
  186. end
  187.  
  188. return OldIndex(...)
  189. end))
  190.  
  191. SASection:NewToggle("Silent Aim", "", function(state)
  192. sa = state
  193. end)
  194.  
  195. SASection:NewToggle("Wall Check", "", function(state) saWallCheck = state end)
  196. SASection:NewSlider("Max Wallbangs", "Inclusive", 50, 0, function(s) saWallBangs = s end)
  197. SASection:NewSlider("Fov", "", 50000, 500, function(s) safov = s end)
  198. SASection:NewDropdown("Target Part", "", {"Head", "Torso", "Right Arm", "Left Arm", "Right Leg", "Left Leg"}, function(currentOption)saTargetPart = currentOption end)
  199. SASection:NewToggle("Panic Mode", "Will track closest player if they are within panic distance", function(state) panicMode = state end)
  200. SASection:NewSlider("Panic Distance", "", 40, 5, function(s) panicDistance = s end)
  201.  
  202.  
  203.  
  204. local LineList = {}
  205. local width = 3
  206. local height = 5
  207.  
  208. EspSection:NewToggle("Enabled", "", function(state)
  209. if state then
  210. LineList = {}
  211. espLoop = rs.RenderStepped:Connect(function()
  212. for i,v in pairs(LineList) do
  213. if v then
  214. v:Remove()
  215. end
  216. end
  217.  
  218. local team
  219. if game.Players.LocalPlayer.Team.Name == "Ghosts" then team = "Phantoms" else team = "Ghosts" end
  220.  
  221. LineList = {}
  222. if game.Workspace.Players:FindFirstChild(team) then
  223. for i,v in pairs(game.Workspace.Players:FindFirstChild(team):GetChildren()) do
  224. local pos = v.PrimaryPart.Position
  225. local ScreenSpacePos, IsOnScreen = game.Workspace.CurrentCamera:WorldToViewportPoint(pos)
  226.  
  227. a = game.Workspace.CurrentCamera:WorldToViewportPoint(v.Torso.CFrame:PointToWorldSpace(Vector3.new(width/2, height/2, 0)))
  228. b = game.Workspace.CurrentCamera:WorldToViewportPoint(v.Torso.CFrame:PointToWorldSpace(Vector3.new(-width/2, height/2, 0)))
  229. c = game.Workspace.CurrentCamera:WorldToViewportPoint(v.Torso.CFrame:PointToWorldSpace(Vector3.new(-width/2, -height/2, 0)))
  230. d = game.Workspace.CurrentCamera:WorldToViewportPoint(v.Torso.CFrame:PointToWorldSpace(Vector3.new(width/2, -height/2, 0)))
  231.  
  232. a = Vector2.new(a.X, a.Y)
  233. b = Vector2.new(b.X, b.Y)
  234. c = Vector2.new(c.X, c.Y)
  235. d = Vector2.new(d.X, d.Y)
  236.  
  237. if IsOnScreen then
  238. local Line = Drawing.new("Quad")
  239. Line.Visible = true
  240. Line.PointA = a
  241. Line.PointB = b
  242. Line.PointC = c
  243. Line.PointD = d
  244. Line.Color = EspColor
  245. Line.Thickness = 2
  246. Line.Transparency = 1
  247.  
  248. LineList[#LineList+1] = Line
  249. end
  250. end
  251. end
  252. end)
  253. else
  254. espLoop:Disconnect()
  255. for i,v in pairs(LineList) do
  256. v:Remove()
  257. end
  258. LineList = {}
  259. end
  260. end)
  261.  
  262.  
  263.  
  264. BindsSection:NewKeybind("Toggle UI", "", Enum.KeyCode.F, function()
  265. Library:ToggleUI()
  266. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement