martinrampe13

Untitled

Jan 1st, 2023
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.05 KB | None | 0 0
  1. local Settings = {
  2. rewrittenmain = {
  3. Enabled = true,
  4. Key = "c",
  5. DOT = true,
  6. AIRSHOT = true,
  7. NOTIF = false,
  8. AUTOPRED = false,
  9. FOV = math.huge,
  10. RESOVLER = false
  11. }
  12. }
  13.  
  14. local SelectedPart = "HumanoidRootPart"
  15. local Prediction = true
  16. local PredictionValue = 0.1413
  17.  
  18.  
  19. local AnchorCount = 0
  20. local MaxAnchor = 50
  21.  
  22. local CC = game:GetService"Workspace".CurrentCamera
  23. local accomidationfactor = 0.11
  24. local mouse = game.Players.LocalPlayer:GetMouse()
  25. local placemarker = Instance.new("Part", game.Workspace)
  26. local enabled = false
  27. local Plr
  28.  
  29. function makemarker(Parent, Adornee, Color, Size, Size2)
  30. local e = Instance.new("BillboardGui", Parent)
  31. e.Name = "PP"
  32. e.Adornee = Adornee
  33. e.Size = UDim2.new(Size, Size2, Size, Size2)
  34. e.AlwaysOnTop = Settings.rewrittenmain.DOT
  35. local a = Instance.new("Frame", e)
  36. if Settings.rewrittenmain.DOT == true then
  37. a.Size = UDim2.new(1, 0, 1, 0)
  38. else
  39. a.Size = UDim2.new(0, 0, 0, 0)
  40. end
  41. if Settings.rewrittenmain.DOT == true then
  42. a.Transparency = 0
  43. a.BackgroundTransparency = 0
  44. else
  45. a.Transparency = 1
  46. a.BackgroundTransparency = 1
  47. end
  48. a.BackgroundColor3 = Color
  49. local g = Instance.new("UICorner", a)
  50. if Settings.rewrittenmain.DOT == false then
  51. g.CornerRadius = UDim.new(0, 0)
  52. else
  53. g.CornerRadius = UDim.new(1, 1)
  54. end
  55. return(e)
  56. end
  57.  
  58.  
  59. local data = game.Players:GetPlayers()
  60. function noob(player)
  61. local character
  62. repeat wait() until player.Character
  63. local handler = makemarker(guimain, player.Character:WaitForChild(SelectedPart), Color3.fromRGB(107, 184, 255), 0.3, 3)
  64. handler.Name = player.Name
  65. player.CharacterAdded:connect(function(Char) handler.Adornee = Char:WaitForChild(SelectedPart) end)
  66.  
  67.  
  68. spawn(function()
  69. while wait() do
  70. if player.Character then
  71. end
  72. end
  73. end)
  74. end
  75.  
  76. for i = 1, #data do
  77. if data[i] ~= game.Players.LocalPlayer then
  78. noob(data[i])
  79. end
  80. end
  81.  
  82. game.Players.PlayerAdded:connect(function(Player)
  83. noob(Player)
  84. end)
  85.  
  86. spawn(function()
  87. placemarker.Anchored = true
  88. placemarker.CanCollide = false
  89. if Settings.rewrittenmain.DOT == true then
  90. placemarker.Size = Vector3.new(8, 8, 8)
  91. else
  92. placemarker.Size = Vector3.new(0, 0, 0)
  93. end
  94. placemarker.Transparency = 0.75
  95. if Settings.rewrittenmain.DOT then
  96. makemarker(placemarker, placemarker, Color3.fromRGB(232, 186, 200), 0.40, 0)
  97. end
  98. end)
  99.  
  100. game.Players.LocalPlayer:GetMouse().KeyDown:Connect(function(k)
  101. if k == Settings.rewrittenmain.Key and Settings.rewrittenmain.Enabled then
  102. if enabled == true then
  103. enabled = false
  104. if Settings.rewrittenmain.NOTIF == true then
  105. Plr = getClosestPlayerToCursor()
  106. game.StarterGui:SetCore("SendNotification", {
  107. Title = "";
  108. Text = "Unlocked :)",
  109. Duration = 5
  110. })
  111. end
  112. else
  113. Plr = getClosestPlayerToCursor()
  114. enabled = true
  115. if Settings.rewrittenmain.NOTIF == true then
  116.  
  117. game.StarterGui:SetCore("SendNotification", {
  118. Title = "";
  119. Text = "Target: "..tostring(Plr.Character.Humanoid.DisplayName),
  120. Duration = 5
  121. })
  122.  
  123. end
  124. end
  125. end
  126. end)
  127.  
  128.  
  129.  
  130. function getClosestPlayerToCursor()
  131. local closestPlayer
  132. local shortestDistance = Settings.rewrittenmain.FOV
  133.  
  134. for i, v in pairs(game.Players:GetPlayers()) do
  135. if v ~= game.Players.LocalPlayer and v.Character and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("HumanoidRootPart") then
  136. local pos = CC:WorldToViewportPoint(v.Character.PrimaryPart.Position)
  137. local magnitude = (Vector2.new(pos.X, pos.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude
  138. if magnitude < shortestDistance then
  139. closestPlayer = v
  140. shortestDistance = magnitude
  141. end
  142. end
  143. end
  144. return closestPlayer
  145. end
  146.  
  147. local pingvalue = nil;
  148. local split = nil;
  149. local ping = nil;
  150.  
  151. game:GetService"RunService".Stepped:connect(function()
  152. if enabled and Plr.Character ~= nil and Plr.Character:FindFirstChild("HumanoidRootPart") then
  153. placemarker.CFrame = CFrame.new(Plr.Character.HumanoidRootPart.Position+(Plr.Character.HumanoidRootPart.Velocity*accomidationfactor))
  154. else
  155. placemarker.CFrame = CFrame.new(0, 9999, 0)
  156. end
  157. if Settings.rewrittenmain.AUTOPRED == true then
  158. pingvalue = game:GetService("Stats").Network.ServerStatsItem["Data Ping"]:GetValueString()
  159. split = string.split(pingvalue,'(')
  160. ping = tonumber(split[1])
  161. if ping < 130 then
  162. PredictionValue = 0.151
  163. elseif ping < 125 then
  164. PredictionValue = 0.149
  165. elseif ping < 110 then
  166. PredictionValue = 0.146
  167. elseif ping < 105 then
  168. PredictionValue = 0.138
  169. elseif ping < 90 then
  170. PredictionValue = 0.136
  171. elseif ping < 80 then
  172. PredictionValue = 0.134
  173. elseif ping < 70 then
  174. PredictionValue = 0.131
  175. elseif ping < 60 then
  176. PredictionValue = 0.1229
  177. elseif ping < 50 then
  178. PredictionValue = 0.1225
  179. elseif ping < 40 then
  180. PredictionValue = 0.1256
  181. end
  182. end
  183. end)
  184.  
  185. local mt = getrawmetatable(game)
  186. local old = mt.__namecall
  187. setreadonly(mt, false)
  188. mt.__namecall = newcclosure(function(...)
  189. local args = {...}
  190. if enabled and getnamecallmethod() == "FireServer" and args[2] == "UpdateMousePos" and Settings.rewrittenmain.Enabled and Plr.Character ~= nil then
  191.  
  192. -- args[3] = Plr.Character.HumanoidRootPart.Position+(Plr.Character.HumanoidRootPart.Velocity*accomidationfactor)
  193. --[[
  194. if Settings.rewrittenmain.AIRSHOT == true then
  195. if game.Workspace.Players[Plr.Name].Humanoid:GetState() == Enum.HumanoidStateType.Freefall then -- Plr.Character:WaitForChild("Humanoid"):GetState() == Enum.HumanoidStateType.Freefall
  196.  
  197. --// Airshot
  198. args[3] = Plr.Character.LeftFoot.Position+(Plr.Character.LeftFoot.Velocity*PredictionValue)
  199.  
  200. else
  201. args[3] = Plr.Character.HumanoidRootPart.Position+(Plr.Character.HumanoidRootPart.Velocity*PredictionValue)
  202.  
  203. end
  204. else
  205. args[3] = Plr.Character.HumanoidRootPart.Position+(Plr.Character.HumanoidRootPart.Velocity*PredictionValue)
  206. end
  207. ]]
  208. if Prediction == true then
  209.  
  210. args[3] = Plr.Character[SelectedPart].Position+(Plr.Character[SelectedPart].Velocity*PredictionValue)
  211.  
  212. else
  213.  
  214. args[3] = Plr.Character[SelectedPart].Position
  215.  
  216. end
  217.  
  218. return old(unpack(args))
  219. end
  220. return old(...)
  221. end)
  222.  
  223. game:GetService("RunService").RenderStepped:Connect(function()
  224. if Settings.rewrittenmain.RESOVLER == true and Plr.Character ~= nil and enabled and Settings.rewrittenmain.Enabled then
  225. if Settings.rewrittenmain.AIRSHOT == true and enabled and Plr.Character ~= nil then
  226.  
  227. if game.Workspace.Players[Plr.Name].Humanoid:GetState() == Enum.HumanoidStateType.Freefall then -- Plr.Character:WaitForChild("Humanoid"):GetState() == Enum.HumanoidStateType.Freefall
  228.  
  229. --// Airshot
  230.  
  231. --// Anchor Check
  232.  
  233. if Plr.Character ~= nil and Plr.Character.HumanoidRootPart.Anchored == true then
  234. AnchorCount = AnchorCount + 1
  235. if AnchorCount >= MaxAnchor then
  236. Prediction = false
  237. wait(2)
  238. AnchorCount = 0;
  239. end
  240. else
  241. Prediction = true
  242. AnchorCount = 0;
  243. end
  244.  
  245. SelectedPart = "LeftFoot"
  246.  
  247. else
  248. --// Anchor Check
  249.  
  250. if Plr.Character ~= nil and Plr.Character.HumanoidRootPart.Anchored == true then
  251. AnchorCount = AnchorCount + 1
  252. if AnchorCount >= MaxAnchor then
  253. Prediction = false
  254. wait(2)
  255. AnchorCount = 0;
  256. end
  257. else
  258. Prediction = true
  259. AnchorCount = 0;
  260. end
  261.  
  262. SelectedPart = "HumanoidRootPart"
  263.  
  264. end
  265. else
  266.  
  267. --// Anchor Check
  268.  
  269. if Plr.Character ~= nil and Plr.Character.HumanoidRootPart.Anchored == true then
  270. AnchorCount = AnchorCount + 1
  271. if AnchorCount >= MaxAnchor then
  272. Prediction = false
  273. wait(2)
  274. AnchorCount = 0;
  275. end
  276. else
  277. Prediction = true
  278. AnchorCount = 0;
  279. end
  280.  
  281. SelectedPart = "HumanoidRootPart"
  282. end
  283.  
  284. else
  285. SelectedPart = "HumanoidRootPart"
  286. end
  287. end)
Add Comment
Please, Sign In to add comment