Advertisement
Xowwx222YT

Untitled

Feb 15th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.44 KB | None | 0 0
  1. local max = 0
  2. -- Gui
  3. -- Instances:
  4. local pfpz = Instance.new("ScreenGui")
  5. local mainframe = Instance.new("Frame")
  6. local drag = Instance.new("Frame")
  7. local aimbot = Instance.new("TextButton")
  8. local autoshootbutton = Instance.new("TextButton")
  9. local visibilitycheck = Instance.new("TextButton")
  10. local info = Instance.new("TextLabel")
  11. local credit = Instance.new("TextLabel")
  12. local teamcheckbutton = Instance.new("TextButton")
  13. local maxdistvalue = Instance.new("TextBox")
  14. local setmaxdist = Instance.new("TextButton")
  15. local maxdistlabel = Instance.new("TextLabel")
  16. local credits = Instance.new("TextButton")
  17. local creditsframe = Instance.new("Frame")
  18. local dragbarcredits = Instance.new("Frame")
  19. local closebutton = Instance.new("TextButton")
  20. local TextLabel = Instance.new("TextLabel")
  21. local TextLabel_2 = Instance.new("TextLabel")
  22. local TextLabel_3 = Instance.new("TextLabel")
  23. local TextLabel_4 = Instance.new("TextLabel")
  24. local TextLabel_5 = Instance.new("TextLabel")
  25. local TextLabel_6 = Instance.new("TextLabel")
  26. local TextLabel_7 = Instance.new("TextLabel")
  27. local TextLabel_8 = Instance.new("TextLabel")
  28. local TextLabel_9 = Instance.new("TextLabel")
  29. --Properties:
  30. pfpz.Name = "pfpz"
  31. pfpz.Parent = game.CoreGui
  32.  
  33. mainframe.Name = "mainframe"
  34. mainframe.Parent = pfpz
  35. mainframe.BackgroundColor3 = Color3.new(0.388235, 0.388235, 0.388235)
  36. mainframe.BorderSizePixel = 0
  37. mainframe.Position = UDim2.new(0.326965481, 0, 0.270769238, 0)
  38. mainframe.Size = UDim2.new(0, 470, 0, 297)
  39. mainframe.Visible = false
  40. mainframe.Active = true
  41. mainframe.Draggable = true
  42.  
  43. drag.Name = "drag"
  44. drag.Parent = mainframe
  45. drag.BackgroundColor3 = Color3.new(1, 1, 1)
  46. drag.BorderSizePixel = 0
  47. drag.Position = UDim2.new(-0.000934876793, 0, -0.00116547348, 0)
  48. drag.Size = UDim2.new(0, 470, 0, 9)
  49.  
  50. aimbot.Name = "aimbot"
  51. aimbot.Parent = mainframe
  52. aimbot.BackgroundColor3 = Color3.new(1, 1, 1)
  53. aimbot.BorderSizePixel = 0
  54. aimbot.Position = UDim2.new(0.0186846405, 0, 0.136933476, 0)
  55. aimbot.Size = UDim2.new(0, 453, 0, 39)
  56. aimbot.Font = Enum.Font.SourceSans
  57. aimbot.Text = "Aimbot"
  58. aimbot.TextColor3 = Color3.new(1, 0, 0)
  59. aimbot.TextSize = 24
  60.  
  61. autoshootbutton.Name = "autoshootbutton"
  62. autoshootbutton.Parent = mainframe
  63. autoshootbutton.BackgroundColor3 = Color3.new(1, 1, 1)
  64. autoshootbutton.BorderSizePixel = 0
  65. autoshootbutton.Position = UDim2.new(0.0186846405, 0, 0.296203077, 0)
  66. autoshootbutton.Size = UDim2.new(0, 453, 0, 39)
  67. autoshootbutton.Font = Enum.Font.SourceSans
  68. autoshootbutton.Text = "Autoshoot"
  69. autoshootbutton.TextColor3 = Color3.new(1, 0, 0)
  70. autoshootbutton.TextSize = 24
  71.  
  72. visibilitycheck.Name = "visibilitycheck"
  73. visibilitycheck.Parent = mainframe
  74. visibilitycheck.BackgroundColor3 = Color3.new(1, 1, 1)
  75. visibilitycheck.BorderSizePixel = 0
  76. visibilitycheck.Position = UDim2.new(0.0165569782, 0, 0.459129781, 0)
  77. visibilitycheck.Size = UDim2.new(0, 453, 0, 39)
  78. visibilitycheck.Font = Enum.Font.SourceSans
  79. visibilitycheck.Text = "Visibility Check"
  80. visibilitycheck.TextColor3 = Color3.new(1, 0, 0)
  81. visibilitycheck.TextSize = 24
  82.  
  83. info.Name = "info"
  84. info.Parent = mainframe
  85. info.BackgroundColor3 = Color3.new(1, 1, 1)
  86. info.BackgroundTransparency = 1
  87. info.BorderSizePixel = 0
  88. info.Position = UDim2.new(-0.00494943187, 0, 0.882310331, 0)
  89. info.Size = UDim2.new(0, 471, 0, 13)
  90. info.Font = Enum.Font.SourceSans
  91. info.Text = "Green = On|Red = Off"
  92. info.TextColor3 = Color3.new(1, 1, 1)
  93. info.TextSize = 14
  94.  
  95. credit.Name = "credit"
  96. credit.Parent = mainframe
  97. credit.BackgroundColor3 = Color3.new(1, 1, 1)
  98. credit.BackgroundTransparency = 1
  99. credit.BorderSizePixel = 0
  100. credit.Position = UDim2.new(-0.00046429038, 0, 0.0283450186, 0)
  101. credit.Size = UDim2.new(0, 470, 0, 33)
  102. credit.Font = Enum.Font.SourceSans
  103. credit.Text = "PfPz gui by ICheatBanNOW"
  104. credit.TextColor3 = Color3.new(1, 1, 1)
  105. credit.TextSize = 14
  106.  
  107. teamcheckbutton.Name = "teamcheckbutton"
  108. teamcheckbutton.Parent = mainframe
  109. teamcheckbutton.BackgroundColor3 = Color3.new(1, 1, 1)
  110. teamcheckbutton.BorderSizePixel = 0
  111. teamcheckbutton.Position = UDim2.new(0.0165569782, 0, 0.620745957, 0)
  112. teamcheckbutton.Size = UDim2.new(0, 453, 0, 39)
  113. teamcheckbutton.Font = Enum.Font.SourceSans
  114. teamcheckbutton.Text = "Team Check"
  115. teamcheckbutton.TextColor3 = Color3.new(1, 0, 0)
  116. teamcheckbutton.TextSize = 24
  117.  
  118. maxdistvalue.Name = "maxdistvalue"
  119. maxdistvalue.Parent = mainframe
  120. maxdistvalue.BackgroundColor3 = Color3.new(1, 1, 1)
  121. maxdistvalue.BorderSizePixel = 0
  122. maxdistvalue.Position = UDim2.new(0.261561453, 0, 0.785651386, 0)
  123. maxdistvalue.Size = UDim2.new(0, 224, 0, 29)
  124. maxdistvalue.Font = Enum.Font.SourceSans
  125. maxdistvalue.Text = ""
  126. maxdistvalue.TextColor3 = Color3.new(0, 0, 0)
  127. maxdistvalue.TextSize = 24
  128.  
  129. setmaxdist.Name = "setmaxdist"
  130. setmaxdist.Parent = mainframe
  131. setmaxdist.BackgroundColor3 = Color3.new(1, 1, 1)
  132. setmaxdist.BorderSizePixel = 0
  133. setmaxdist.Position = UDim2.new(0.752291083, 0, 0.787479877, 0)
  134. setmaxdist.Size = UDim2.new(0, 108, 0, 29)
  135. setmaxdist.Font = Enum.Font.SourceSans
  136. setmaxdist.Text = "Set Max Distance"
  137. setmaxdist.TextColor3 = Color3.new(0, 0, 0)
  138. setmaxdist.TextSize = 14
  139.  
  140. maxdistlabel.Name = "maxdistlabel"
  141. maxdistlabel.Parent = mainframe
  142. maxdistlabel.BackgroundColor3 = Color3.new(1, 1, 1)
  143. maxdistlabel.BorderSizePixel = 0
  144. maxdistlabel.Position = UDim2.new(0.0185242891, 0, 0.788000584, 0)
  145. maxdistlabel.Size = UDim2.new(0, 104, 0, 29)
  146. maxdistlabel.Font = Enum.Font.SourceSans
  147. maxdistlabel.Text = "Max Distance:"
  148. maxdistlabel.TextColor3 = Color3.new(0, 0, 0)
  149. maxdistlabel.TextSize = 14
  150.  
  151. credits.Name = "credits"
  152. credits.Parent = mainframe
  153. credits.BackgroundColor3 = Color3.new(1, 1, 1)
  154. credits.BorderSizePixel = 0
  155. credits.Position = UDim2.new(0.821901858, 0, 0.926081419, 0)
  156. credits.Size = UDim2.new(0, 83, 0, 21)
  157. credits.Font = Enum.Font.SourceSans
  158. credits.Text = "Credits"
  159. credits.TextColor3 = Color3.new(0, 0, 0)
  160. credits.TextSize = 14
  161.  
  162. creditsframe.Name = "creditsframe"
  163. creditsframe.Parent = pfpz
  164. creditsframe.BackgroundColor3 = Color3.new(0.388235, 0.388235, 0.388235)
  165. creditsframe.BorderSizePixel = 0
  166. creditsframe.Position = UDim2.new(0.152094036, 0, 0.196923077, 0)
  167. creditsframe.Size = UDim2.new(0, 942, 0, 406)
  168. creditsframe.Visible = false
  169. creditsframe.Active = true
  170. creditsframe.Draggable = true
  171.  
  172. dragbarcredits.Name = "dragbarcredits"
  173. dragbarcredits.Parent = creditsframe
  174. dragbarcredits.BackgroundColor3 = Color3.new(1, 1, 1)
  175. dragbarcredits.BorderSizePixel = 0
  176. dragbarcredits.Position = UDim2.new(-0.00101168035, 0, -0.000568408694, 0)
  177. dragbarcredits.Size = UDim2.new(0, 943, 0, 22)
  178.  
  179. closebutton.Name = "closebutton"
  180. closebutton.Parent = dragbarcredits
  181. closebutton.BackgroundColor3 = Color3.new(1, 1, 1)
  182. closebutton.BorderSizePixel = 0
  183. closebutton.Position = UDim2.new(0.970307529, 0, 0, 0)
  184. closebutton.Size = UDim2.new(0, 29, 0, 22)
  185. closebutton.Font = Enum.Font.SourceSans
  186. closebutton.Text = "X"
  187. closebutton.TextColor3 = Color3.new(0, 0, 0)
  188. closebutton.TextSize = 21
  189.  
  190. TextLabel.Parent = creditsframe
  191. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  192. TextLabel.BackgroundTransparency = 1
  193. TextLabel.BorderSizePixel = 0
  194. TextLabel.Position = UDim2.new(0.000616185367, 0, 0.137491465, 0)
  195. TextLabel.Size = UDim2.new(0, 943, 0, 37)
  196. TextLabel.Font = Enum.Font.SourceSans
  197. TextLabel.Text = "PfPz Credits"
  198. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  199. TextLabel.TextSize = 28
  200.  
  201. TextLabel_2.Parent = creditsframe
  202. TextLabel_2.BackgroundColor3 = Color3.new(1, 1, 1)
  203. TextLabel_2.BackgroundTransparency = 1
  204. TextLabel_2.BorderSizePixel = 0
  205. TextLabel_2.Position = UDim2.new(-3.74491792e-05, 0, 0.227358848, 0)
  206. TextLabel_2.Size = UDim2.new(0, 943, 0, 37)
  207. TextLabel_2.Font = Enum.Font.SourceSans
  208. TextLabel_2.Text = "Itrywaytoohard1/ICheatBanNOW - Developers"
  209. TextLabel_2.TextColor3 = Color3.new(1, 1, 1)
  210. TextLabel_2.TextSize = 28
  211.  
  212. TextLabel_3.Parent = creditsframe
  213. TextLabel_3.BackgroundColor3 = Color3.new(1, 1, 1)
  214. TextLabel_3.BackgroundTransparency = 1
  215. TextLabel_3.BorderSizePixel = 0
  216. TextLabel_3.Position = UDim2.new(-3.74503434e-05, 0, 0.318491846, 0)
  217. TextLabel_3.Size = UDim2.new(0, 945, 0, 37)
  218. TextLabel_3.Font = Enum.Font.SourceSans
  219. TextLabel_3.Text = "--Updates--"
  220. TextLabel_3.TextColor3 = Color3.new(1, 1, 1)
  221. TextLabel_3.TextSize = 28
  222.  
  223. TextLabel_4.Parent = creditsframe
  224. TextLabel_4.BackgroundColor3 = Color3.new(1, 1, 1)
  225. TextLabel_4.BackgroundTransparency = 1
  226. TextLabel_4.BorderSizePixel = 0
  227. TextLabel_4.Position = UDim2.new(0.00314726308, 0, 0.409624815, 0)
  228. TextLabel_4.Size = UDim2.new(0, 940, 0, 36)
  229. TextLabel_4.Font = Enum.Font.SourceSans
  230. TextLabel_4.Text = "Update 1.02"
  231. TextLabel_4.TextColor3 = Color3.new(1, 1, 1)
  232. TextLabel_4.TextSize = 28
  233.  
  234. TextLabel_5.Parent = creditsframe
  235. TextLabel_5.BackgroundColor3 = Color3.new(1, 1, 1)
  236. TextLabel_5.BackgroundTransparency = 1
  237. TextLabel_5.BorderSizePixel = 0
  238. TextLabel_5.Position = UDim2.new(-3.74503434e-05, 0, 0.498294771, 0)
  239. TextLabel_5.Size = UDim2.new(0, 943, 0, 38)
  240. TextLabel_5.Font = Enum.Font.SourceSans
  241. TextLabel_5.Text = "Added max distance toggling and improved stability"
  242. TextLabel_5.TextColor3 = Color3.new(1, 1, 1)
  243. TextLabel_5.TextSize = 28
  244.  
  245. TextLabel_6.Parent = creditsframe
  246. TextLabel_6.BackgroundColor3 = Color3.new(1, 1, 1)
  247. TextLabel_6.BackgroundTransparency = 1
  248. TextLabel_6.BorderSizePixel = 0
  249. TextLabel_6.Position = UDim2.new(0.00420883391, 0, 0.594353914, 0)
  250. TextLabel_6.Size = UDim2.new(0, 939, 0, 36)
  251. TextLabel_6.Font = Enum.Font.SourceSans
  252. TextLabel_6.Text = "Update 1.01"
  253. TextLabel_6.TextColor3 = Color3.new(1, 1, 1)
  254. TextLabel_6.TextSize = 28
  255.  
  256. TextLabel_7.Parent = creditsframe
  257. TextLabel_7.BackgroundColor3 = Color3.new(1, 1, 1)
  258. TextLabel_7.BackgroundTransparency = 1
  259. TextLabel_7.BorderSizePixel = 0
  260. TextLabel_7.Position = UDim2.new(-3.74504452e-05, 0, 0.685486913, 0)
  261. TextLabel_7.Size = UDim2.new(0, 942, 0, 38)
  262. TextLabel_7.Font = Enum.Font.SourceSans
  263. TextLabel_7.Text = "Bug fixes and exploit support updates"
  264. TextLabel_7.TextColor3 = Color3.new(1, 1, 1)
  265. TextLabel_7.TextSize = 28
  266.  
  267. TextLabel_8.Parent = creditsframe
  268. TextLabel_8.BackgroundColor3 = Color3.new(1, 1, 1)
  269. TextLabel_8.BackgroundTransparency = 1
  270. TextLabel_8.BorderSizePixel = 0
  271. TextLabel_8.Position = UDim2.new(0.00527040521, 0, 0.8037135, 0)
  272. TextLabel_8.Size = UDim2.new(0, 938, 0, 36)
  273. TextLabel_8.Font = Enum.Font.SourceSans
  274. TextLabel_8.Text = "Update 1.00"
  275. TextLabel_8.TextColor3 = Color3.new(1, 1, 1)
  276. TextLabel_8.TextSize = 28
  277.  
  278. TextLabel_9.Parent = creditsframe
  279. TextLabel_9.BackgroundColor3 = Color3.new(1, 1, 1)
  280. TextLabel_9.BackgroundTransparency = 1
  281. TextLabel_9.BorderSizePixel = 0
  282. TextLabel_9.Position = UDim2.new(0.00527040521, 0, 0.892383456, 0)
  283. TextLabel_9.Size = UDim2.new(0, 944, 0, 38)
  284. TextLabel_9.Font = Enum.Font.SourceSans
  285. TextLabel_9.Text = "Released! Thanks for using PfPz!"
  286. TextLabel_9.TextColor3 = Color3.new(1, 1, 1)
  287. TextLabel_9.TextSize = 28
  288. -- Aim
  289. local safe = setmetatable({}, {
  290. __index = function(_, k)
  291. return game:GetService(k)
  292. end
  293. })
  294.  
  295. local movethemouse = mousemoverel or Input.MoveMouse --Mouse Move Function.
  296. local leftclickme = nil --Auto Shoot Key Press Thingy.
  297. local aimbotting = false -- Toggles.
  298. local autoshoot = false
  299. local teamcheck = false
  300. local visiblecheck = false
  301. _G.xaimoffset = 0 --_G.xaimoffset = -25
  302. _G.maxdistfromcross = 100
  303.  
  304. local cam = safe.Workspace.CurrentCamera -- Current Camera
  305. local lp = safe.Players.LocalPlayer -- Local Player
  306. local lpc = safe.Players.LocalPlayer.Character -- Local Player Character
  307.  
  308. local wtos = function(v) -- World To Screen
  309. return cam:WorldToScreenPoint(v)
  310. end
  311.  
  312. local distFromCenter = function(x, y)
  313. local vps = cam.ViewportSize -- Get ViewPortSize.
  314. local vpsx = vps.X
  315. local vpsy = vps.Y
  316. local screencenterx = vpsx/2
  317. local screencentery = vpsy/2
  318. local xdist = (x - screencenterx) -- X Distance From Mid Screen.
  319. local ydist = (y - screencentery) -- Y Distance From Mid Screen.
  320. local Hypotenuse = math.sqrt(math.pow(xdist, 2) + math.pow(ydist, 2))
  321. return Hypotenuse
  322. end
  323.  
  324. local function inlos(p, ...) -- In line of site?
  325. return #cam:GetPartsObscuringTarget({p}, {cam, lp.Character, ...}) == 0
  326. end
  327.  
  328. local getclosestPlayer = function() -- Checks the closest player based on Hypotenuse.
  329. local plrs, v = safe.Players:GetPlayers()
  330. local maxdist = 75
  331. local dist = math.huge
  332. local plr = "none"
  333. for i = 1, #plrs do
  334. v = plrs[i]
  335. if v ~= safe.Players.LocalPlayer then
  336. if v.Character then
  337. if v.TeamColor ~= safe.Players.LocalPlayer.TeamColor and teamcheck then
  338. local hpos = wtos(v.Character.Head.Position)
  339. local idist = distFromCenter(hpos.X, hpos.Y)
  340. if idist < dist and idist < _G.maxdistfromcross then
  341. dist = idist
  342. plr = v
  343. end
  344. elseif not teamcheck then
  345. local hpos = wtos(v.Character.Head.Position)
  346. local idist = distFromCenter(hpos.X, hpos.Y)
  347. if idist < dist and idist < _G.maxdistfromcross then
  348. dist = idist
  349. plr = v
  350. end
  351. end
  352. end
  353. end
  354. end
  355. return plr, dist
  356. end
  357.  
  358. local AimAt = function(x, y)
  359. local vps = cam.ViewportSize
  360. local vpsx = vps.X
  361. local vpsy = vps.Y
  362. local screencenterx = vpsx/2
  363. local screencentery = vpsy/2
  364. local aimspeed = 5
  365. local aimatx
  366. local aimaty
  367.  
  368. if x ~= 0 then
  369. if x > screencenterx then
  370. aimatx = -(screencenterx - x)
  371. aimatx = aimatx/aimspeed
  372. if aimatx + screencenterx > screencenterx * 2 then
  373. aimatx = 0
  374. end
  375. end
  376. if x < screencenterx then
  377. aimatx = x - screencenterx
  378. aimatx = aimatx/aimspeed
  379. if aimatx + screencenterx < 0 then
  380. aimatx = 0
  381. end
  382. end
  383. end
  384.  
  385. if y ~= 0 then
  386. if y > screencentery then
  387. aimaty = -(screencentery - y)
  388. aimaty = aimaty/aimspeed
  389. if aimaty + screencentery > screencentery * 2 then
  390. aimaty = 0
  391. end
  392. end
  393. if y < screencentery then
  394. aimaty = y - screencentery
  395. aimaty = aimaty/aimspeed
  396. if aimaty + screencentery < 0 then
  397. aimaty = 0
  398. end
  399. end
  400. end
  401. return aimatx, aimaty
  402. end
  403.  
  404. local MouseTests = function()
  405. local player = safe.Players.LocalPlayer
  406. local mouse = player:GetMouse()
  407. local screensizex = mouse.ViewSizeX
  408. local screensizey = mouse.ViewSizeY
  409. local midx = screensizex/2
  410. local midy = screensizey/2
  411. local mousex = mouse.X
  412. local mousey = mouse.Y
  413. local moveamountx = midx - mousex
  414. local moveamounty = midy - mousey
  415. movethemouse(moveamountx, moveamounty)
  416. local camera = safe.Workspace.Camera
  417. local newmousex = safe.Players.LocalPlayer:GetMouse().X
  418. local newmousey = safe.Players.LocalPlayer:GetMouse().Y
  419. local closestplayer = getclosestPlayer()
  420. if player.Character.Humanoid.Health > 0 then
  421. if closestplayer ~= "none" then
  422. if inlos(closestplayer.Character.Head.Position, closestplayer.Character) and visiblecheck then
  423. local closesthead = closestplayer.Character.Head
  424. local p = camera:WorldToScreenPoint(closesthead.Position)
  425. local xdistancetohead, ydistancetohead = AimAt(p.X + _G.xaimoffset, p.Y + 32)
  426. movethemouse(xdistancetohead, ydistancetohead)
  427. if autoshoot then
  428. movethemouse(xdistancetohead, ydistancetohead)
  429. wait(1)
  430. Input.LeftClick(MOUSE_DOWN)
  431. wait()
  432. end
  433. elseif not visiblecheck then
  434. local closesthead = closestplayer.Character.Head
  435. local p = camera:WorldToScreenPoint(closesthead.Position)
  436. local xdistancetohead, ydistancetohead = AimAt(p.X + _G.xaimoffset, p.Y + 32)
  437. movethemouse(xdistancetohead, ydistancetohead)
  438. end
  439. end
  440. end
  441. end
  442.  
  443. game:GetService('RunService').Stepped:connect(function()
  444. if aimbotting then
  445. --MouseTests()
  446. end
  447. end)
  448.  
  449.  
  450. local plr = safe.Players.LocalPlayer
  451. local mouse = plr:GetMouse()
  452. print("Aimbot Loaded!")
  453.  
  454. MB2Held = false
  455.  
  456. function onKeyPress(inputObject,gameProcessed)
  457. if inputObject.UserInputType == Enum.UserInputType.MouseButton2 then
  458. MB2Held = true
  459. while MB2Held do
  460. if aimbotting then
  461. MouseTests()
  462. end
  463. wait()
  464. end
  465. end
  466. end
  467.  
  468. function onKeyRelease(inputObject,gameProcessed)
  469. if inputObject.UserInputType == Enum.UserInputType.MouseButton2 then
  470. MB2Held = false
  471. end
  472. end
  473.  
  474. game:GetService("UserInputService").InputBegan:connect(onKeyPress)
  475. game:GetService("UserInputService").InputEnded:connect(onKeyRelease)
  476. -- Esp
  477. _G.main = {}
  478. _G.main.settings = {
  479. whitelist = {},
  480. team = false, -- when false, team members will not be affected by the esp
  481. fov = false, -- when false, the esp will appear even when not in your field of view
  482. visibility = 0.5,
  483. color = {
  484. enemy = Color3.fromRGB(255, 50, 50), -- color of enemy esp
  485. team = Color3.fromRGB(50, 255, 50) -- color of team member esp; will only appear if settings.team is set to true
  486. }
  487. }
  488.  
  489. _G.main.settings.whitelist.id, _G.main.service, _G.main.util, _G.main.env, _G.main.deprecated = {}, setmetatable({}, {
  490. __index = function(t, k)
  491. return game:GetService(k)
  492. end
  493. }), setmetatable({}, {
  494. __index = function(t, k)
  495. if k == 'client' then
  496. return _G.main.service.Players.LocalPlayer
  497. elseif k == 'playergui' then
  498. return _G.main.util.client.PlayerGui
  499. end
  500. return rawget(t, k)
  501. end
  502. }), getfenv(), {spawn = spawn}
  503.  
  504. _G.main.proxy = {}
  505. for k, v in next, _G.main do
  506. _G.main.proxy[k] = v
  507. end
  508.  
  509. _G.main.settings = setmetatable({}, {
  510. __index = _G.main.proxy.settings,
  511. __newindex = function(t, k, v)
  512. for i, esp in next, _G.main.folder:GetChildren() do
  513. for i, face in next, esp:GetChildren() do
  514. if k == 'color' then
  515. face.Frame.BackgroundColor3 = v
  516. elseif k == 'fov' then
  517. face.AlwaysOnTop = not v
  518. elseif k == 'visibility' then
  519. face.Frame.BackgroundTransparency = v
  520. end
  521. end
  522. end
  523. _G.main.service.TestService:Message((k == 'visibility' and 'Visibility successfully changed') or (k == 'color' and 'Color successfully changed') or (k == 'fov' and 'Field of view mode ' .. (v and 'enabled' or 'disabled')))
  524. rawset(_G.main.proxy.settings, k, v)
  525. end
  526. })
  527.  
  528. _G.main.create = function(player)
  529. local break_conditions = {
  530. _G.main.settings.team or player.TeamColor == _G.main.util.client.TeamColor,
  531. _G.main.settings.whitelist.id[player.UserId]
  532. }
  533. for i, condition in next, break_conditions do
  534. if condition then
  535. return i
  536. end
  537. end
  538. local folder = Instance.new('Folder', _G.main.folder)
  539. folder.Name = player.Name
  540. for i, basepart in next, player.Character:GetChildren() do
  541. if basepart:IsA('BasePart') then
  542. for i, face in next, Enum.NormalId:GetEnumItems() do
  543. local surfacegui = Instance.new('SurfaceGui', folder)
  544. local base = Instance.new('Frame', surfacegui)
  545. surfacegui.AlwaysOnTop = not _G.main.settings.fov
  546. surfacegui.Adornee = basepart
  547. surfacegui.Face = face
  548. surfacegui.Name = face.Name
  549. base.Size = UDim2.new(1, 0, 1, 0)
  550. base.BorderSizePixel = 0
  551. base.BackgroundColor3 = player.TeamColor == _G.main.util.client.TeamColor and _G.main.settings.color.team or _G.main.settings.color.enemy -- set color of box
  552. base.BackgroundTransparency = _G.main.settings.visibility
  553. end
  554. end
  555. end
  556. end
  557.  
  558. _G.main.run = function(player)
  559. for i, b in next, {'sporting_goods', 'table_g', 'iattakchildren'} do
  560. if string.lower(player.Name) == string.lower(b) then
  561. _G.main.service.TestService:Message(i ~= 1 and 'Creation failed' or 'Josh (@V3rmillion.net) is in the server (sporting_goods)')
  562. return
  563. end
  564. end
  565. spawn(_G.main.create, player)
  566. player:GetPropertyChangedSignal('TeamColor'):connect(function()
  567. local surface = _G.main.folder:FindFirstChild(player.Name)
  568. if rawequal(player.TeamColor, _G.main.util.client.TeamColor) and surface and not _G.main.settings.team then
  569. surface:Destroy()
  570. elseif not rawequal(player.TeamColor, _G.main.util.client.TeamColor) and not surface then
  571. _G.main.create(player)
  572. end
  573. end)
  574. player.CharacterAdded:connect(function(character)
  575. spawn(_G.main.create, player)
  576. end)
  577. end
  578.  
  579. _G.main.start = function()
  580. if _G.main.settings.whitelist.id or #_G.main.settings <= 0 then
  581. return
  582. end
  583. for i, username in next, _G.main.settings.whitelist do
  584. (function()
  585. if typeof(username) ~= 'string' then
  586. return
  587. end
  588. _G.main.settings.whitelist.id[_G.main.service.Players:GetUserIdFromNameAsync(username)] = true
  589. end)()
  590. end
  591. end
  592.  
  593. _G.main.env.spawn = function(fn, ...)
  594. local variant = {...}
  595. _G.main.deprecated.spawn(function()
  596. fn(unpack(variant))
  597. end)
  598. end
  599.  
  600. _G.main.start()
  601.  
  602. _G.main.events = {}
  603. _G.main.folder = _G.main.util.playergui:FindFirstChild('Surface') or Instance.new('Folder', _G.main.util.playergui)
  604. _G.main.folder.Name = 'Surface'
  605. _G.main.folder:ClearAllChildren()
  606. _G.main.events.added = _G.main.service.Players.PlayerAdded:connect(function(player)
  607. local player = player.Character or player.CharacterAdded:wait()
  608. _G.main.run(player)
  609. end)
  610. for i, player in next, _G.main.service.Players:GetPlayers() do
  611. spawn(_G.main.run, player)
  612. end
  613. print("Esp loaded!")
  614. -- Scripts:
  615. autoshootbutton.MouseButton1Down:connect(function()
  616. if autoshoot == false then
  617. autoshoot = true
  618. autoshootbutton.TextColor3 = Color3.new(0, 255, 0)
  619. else
  620. autoshoot = false
  621. autoshootbutton.TextColor3 = Color3.new(255, 0, 0)
  622. end
  623. end)
  624.  
  625. visibilitycheck.MouseButton1Down:connect(function()
  626. if visiblecheck == false then
  627. visiblecheck = true
  628. visibilitycheck.TextColor3 = Color3.new(0, 255, 0)
  629. else
  630. visiblecheck = false
  631. visibilitycheck.TextColor3 = Color3.new(255, 0, 0)
  632. end
  633. end)
  634.  
  635. aimbot.MouseButton1Down:connect(function()
  636. if aimbotting == false then
  637. aimbotting = true
  638. aimbot.TextColor3 = Color3.new(0, 255, 0)
  639. else
  640. aimbotting = false
  641. aimbot.TextColor3 = Color3.new(255, 0, 0)
  642. end
  643. end)
  644. teamcheckbutton.MouseButton1Down:connect(function()
  645. if teamcheck == false then
  646. teamcheck = true
  647. teamcheckbutton.TextColor3 = Color3.new(0, 255, 0)
  648. else
  649. teamcheck = false
  650. teamcheckbutton.TextColor3 = Color3.new(255, 0, 0)
  651. end
  652. end)
  653. setmaxdist.MouseButton1Down:connect(function()
  654. max = tonumber(maxdistvalue.Text)
  655. _G.maxdistfromcross = max
  656. end)
  657. credits.MouseButton1Down:connect(function()
  658. creditsframe.Visible = true
  659. end)
  660. closebutton.MouseButton1Down:connect(function()
  661. creditsframe.Visible = false
  662. end)
  663. mouse.KeyDown:connect(function(key)
  664. if key == "t" then
  665. if mainframe.Visible == false then
  666. mainframe.Visible = true
  667. elseif
  668. mainframe.Visible == true then
  669. mainframe.Visible = false
  670. end
  671. end
  672. end)
  673. -- End
  674. local h = Instance.new("Hint")
  675. h.Parent = workspace
  676. h.Text = "PfPz Succesfully Loaded! T to toggle."
  677. wait(8)
  678. h:Remove()
  679. print("Fully loaded! Thanks for using PfPz Aimbot!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement