Advertisement
Cizzy

Bad Business

Feb 22nd, 2021
2,848
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.32 KB | None | 0 0
  1. math.randomseed(tick());
  2. local modules, controlfunc;
  3. for i,v in next, getgc(true) do
  4. if type(v) == "table" then
  5. if rawget(v, "Version") and rawget(v, "Kitty") then
  6. local mt = getrawmetatable(v);
  7. modules = select(2, pcall(getupvalue, mt.__index, 1)); --gets the ts module (haha totally not stolen from kiriot :p)
  8. elseif rawget(v, "Control") and type(rawget(v, "Control")) == "function" then
  9. controlfunc = rawget(v, "Control"); --control function used for walkspeed mult
  10. end
  11. end
  12. if modules and controlfunc then break; end
  13. end
  14. if not modules or (modules and not rawget(modules, "Network")) then
  15. print("Failed To Get TS Module"); -- :(
  16. return;
  17. end
  18. if not controlfunc then
  19. print("Failed To Get Control Function"); -- :(
  20. return;
  21. end
  22. local toggles = {
  23. aimbot = false,
  24. silentaim = false,
  25. teamcheck = false,
  26. vischeck = false,
  27. bodypart = "Head",
  28. hitchance = 1,
  29. fov = 0,
  30. norecoil = false,
  31. nospread = false,
  32. alwaysauto = false,
  33. fastfirerate = false,
  34. fly = false,
  35. flyspeed = 100,
  36. };
  37. local oldmult = 1.8;
  38. local ok = false;
  39. local chartable = getupvalue(modules.Characters.GetCharacter, 1);
  40. local players = game:GetService("Players");
  41. local runservice = game:GetService("RunService");
  42. local uis = game:GetService("UserInputService");
  43. local camera = workspace.CurrentCamera;
  44. local localplayer = players.LocalPlayer;
  45. local mouse = localplayer:GetMouse();
  46. local isholding = false;
  47. local chamsholder = Instance.new("Folder", game:GetService("CoreGui"));
  48.  
  49.  
  50.  
  51.  
  52. local function getclosesttocursor()
  53. local max, close = math.huge;
  54. for player, character in next, chartable do
  55. if player ~= localplayer and (toggles.teamcheck and not modules.Teams:ArePlayersFriendly(player, localplayer) or not toggles.teamcheck) and chartable[localplayer] then
  56. local chosenpart = (character and character:FindFirstChild("Hitbox") and character.Hitbox:FindFirstChild(toggles.bodypart));
  57. if chosenpart then --if part exist
  58. local pos, onscreen = camera:WorldToScreenPoint(chosenpart.Position);
  59. if onscreen then --if on screen (not to be confused with behind walls or not)
  60. local dist = Vector2.new(pos.X - mouse.X, pos.Y - mouse.Y).Magnitude;
  61. if dist <= max and dist <= toggles.fov then
  62. local part = camera:GetPartsObscuringTarget({chosenpart.Position}, {workspace.Characters, workspace.NonGeometry});
  63. if (toggles.vischeck and #part == 0 or not toggles.vischeck) then --gay but works
  64. max = dist;
  65. close = player;
  66. end
  67. end
  68. end
  69. end
  70. end
  71. end
  72. return close;
  73. end
  74.  
  75. do-- hooks
  76. local oldinit = modules.Projectiles.InitProjectile; --thanks coasts for method
  77. local oldfire = modules.Network.Fire;
  78. local oldlookvector = modules.Input.Reticle.LookVector;
  79. local oldwait = modules.Timer.Wait;
  80. local stopchanging = false; --ugly
  81. local originalfuncs = {}; -- PLEASE DONT BULLY ME FOR THIS
  82. modules.Projectiles.InitProjectile = function(self, ...)
  83. local args = {...};
  84. if args[4] == localplayer and toggles.silentaim and math.random(1, 100) <= toggles.hitchance then
  85. local char = chartable[getclosesttocursor()];
  86. local chosenpart = (char and char:FindFirstChild("Hitbox") and char.Hitbox:FindFirstChild(toggles.bodypart));
  87. if chosenpart then
  88. args[2] = chosenpart.Position - args[3];
  89. return oldinit(self, unpack(args));
  90. end
  91. end
  92. return oldinit(self, ...);
  93. end
  94. modules.Network.Fire = function(self, ...)
  95. local args = {...};
  96. if args[1] == "Item_Paintball" and args[2] == "Shoot" then
  97. if not stopchanging then
  98. originalfuncs[8], originalfuncs[9], originalfuncs[10] = getupvalue(2, 8), getupvalue(2, 9), getupvalue(2, 10);
  99. stopchanging = true;
  100. end
  101. setupvalue(2, 8, function(...) if toggles.norecoil then return; end return originalfuncs[8](...); end);
  102. setupvalue(2, 9, function(...) if toggles.norecoil then return; end return originalfuncs[9](...); end);
  103. setupvalue(2, 10, function(...) if toggles.norecoil then return; end return originalfuncs[10](...); end);
  104. -- PLEASE FORGIVE ME I ONLY DID IT BECAUSE HOOKFUNCTION GAY :pleading_face:
  105. end
  106. return oldfire(self, ...);
  107. end
  108. modules.Input.Reticle.LookVector = function(...)
  109. return (toggles.nospread and camera.CFrame.LookVector or oldlookvector(...));
  110. end
  111. modules.Timer.Wait = function(self, time)
  112. local Upvals = getupvalues(2);
  113. if toggles.fastfirerate then
  114. if type(Upvals[1]) == "table" and rawget(Upvals[1], "Equipped") and typeof(Upvals[7]) == "Instance" and Upvals[7]:IsA("IntValue") then
  115. return oldwait(self, 0);
  116. end
  117. end
  118. return oldwait(self, time);
  119. end
  120. end
  121. uis.InputBegan:Connect(function(key, gp)
  122. ok = gp;
  123. if not gp and key.UserInputType.Name == "MouseButton2" then
  124. isholding = true;
  125. end
  126. end)
  127. uis.InputEnded:Connect(function(key, gp)
  128. if not gp and key.UserInputType.Name == "MouseButton2" then
  129. isholding = false;
  130. end
  131. end)
  132. runservice.RenderStepped:Connect(function()
  133. math.randomseed(tick());
  134. if toggles.aimbot then
  135. if isholding and math.random(1, 100) <= toggles.hitchance then
  136. local char = chartable[getclosesttocursor()];
  137. local chosenpart = (char and char:FindFirstChild("Hitbox") and char.Hitbox:FindFirstChild(toggles.bodypart));
  138. if chosenpart then
  139. local pos, onscreen = camera:WorldToScreenPoint(chosenpart.Position);
  140. if onscreen then
  141. mousemoverel(pos.X - mouse.X, pos.Y - mouse.Y);
  142. end
  143. end
  144. end
  145. end
  146. end)
  147. runservice.Stepped:Connect(function()
  148. local flyvector = Vector3.new();
  149. if uis:IsKeyDown("W") then
  150. flyvector = flyvector + camera.CFrame.LookVector;
  151. elseif uis:IsKeyDown("S") then
  152. flyvector = flyvector - camera.CFrame.LookVector;
  153. elseif uis:IsKeyDown("A") then
  154. flyvector = flyvector - camera.CFrame.RightVector;
  155. elseif uis:IsKeyDown("D") then
  156. flyvector = flyvector + camera.CFrame.RightVector;
  157. elseif uis:IsKeyDown("Space") then
  158. flyvector = flyvector + camera.CFrame.UpVector;
  159. elseif uis:IsKeyDown("LeftControl") then
  160. flyvector = flyvector - camera.CFrame.UpVector;
  161. end
  162.  
  163. if toggles.fly and chartable[localplayer] and not ok then
  164. if flyvector.Unit.X == flyvector.Unit.X then
  165. chartable[localplayer]:WaitForChild("Root").Velocity = flyvector.Unit * toggles.flyspeed;
  166. end
  167. --chartable[localplayer]:WaitForChild("Root").Anchored = toggles.fly and flyvector == Vector3.new();
  168. end
  169. end)
  170. local library = loadstring(game:HttpGet("https://pastebin.com/raw/edJT9EGX"))();
  171.  
  172. local aimbot = library:CreateWindow("Aimbot");
  173. local weapons = library:CreateWindow("Weapons");
  174. local movement = library:CreateWindow("Movement");
  175.  
  176. aimbot:AddToggle({
  177. text = "Aimbot",
  178. state = false,
  179. callback = function(bool)
  180. toggles.aimbot = bool;
  181. end
  182. });
  183. aimbot:AddToggle({
  184. text = "Silent Aim",
  185. state = false,
  186. callback = function(bool)
  187. toggles.silentaim = bool;
  188. end
  189. });
  190. aimbot:AddList({
  191. text = "Aim Bone",
  192. values = {"Head", "Chest"},
  193. open = false,
  194. callback = function(part)
  195. toggles.bodypart = part;
  196. end
  197. });
  198. aimbot:AddSlider({
  199. text = "Hit Chance",
  200. min = 1,
  201. max = 100,
  202. callback = function(hc)
  203. toggles.hitchance = hc;
  204. end
  205. });
  206. aimbot:AddSlider({
  207. text = "FOV",
  208. min = 0,
  209. max = 800,
  210. callback = function(fov)
  211. toggles.fov = fov;
  212. end
  213. });
  214. aimbot:AddToggle({
  215. text = "Team Check",
  216. state = false,
  217. callback = function(bool)
  218. toggles.teamcheck = bool;
  219. end
  220. });
  221. aimbot:AddToggle({
  222. text = "Visible Check",
  223. state = false,
  224. callback = function(bool)
  225. toggles.vischeck = bool;
  226. end
  227. });
  228. weapons:AddToggle({
  229. text = "No Recoil",
  230. state = false,
  231. callback = function(bool)
  232. toggles.norecoil = bool;
  233. end
  234. });
  235. weapons:AddToggle({
  236. text = "No Spread",
  237. state = false,
  238. callback = function(bool)
  239. toggles.nospread = bool;
  240. end
  241. });
  242. weapons:AddToggle({
  243. text = "Fast Firerate",
  244. state = false,
  245. callback = function(bool)
  246. toggles.fastfirerate = bool;
  247. end
  248. });
  249. movement:AddSlider({
  250. text = "Sprint Multiplier",
  251. min = 0,
  252. max = 10,
  253. callback = function(value)
  254. setconstant(controlfunc, table.find(getconstants(controlfunc), oldmult), value);
  255. oldmult = value;
  256. end
  257. });
  258. movement:AddToggle({
  259. text = "Fly",
  260. state = false,
  261. callback = function(bool)
  262. toggles.fly = bool;
  263. end
  264. });
  265. movement:AddSlider({
  266. text = "Fly Speed",
  267. min = 100,
  268. max = 200,
  269. callback = function(speed)
  270. toggles.flyspeed = speed;
  271. end
  272. });
  273. library:Init();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement