Universal Silent Aim - Pastebin.com (2025)

  1. --[[

  2. Information:

  3. - Inspired by Averiias silent aim, Script Made by @Emmanuelz7 on YT

  4. Credits to Douqle for UI

  5. ]]

  6. -- // Dependencies

  7. local _, AimingPage, _ = loadstring(game:HttpGet("https://raw.githubusercontent.com/Stefanuk12/Aiming/main/GUI.lua"))()

  8. local Aiming = loadstring(game:HttpGet("https://raw.githubusercontent.com/Stefanuk12/Aiming/main/Load.lua"))()("Module")

  9. local AimingChecks = Aiming.Checks

  10. local AimingSelected = Aiming.Selected

  11. local AimingSettingsIgnored = Aiming.Settings.Ignored

  12. local AimingSettingsIgnoredPlayers = Aiming.Settings.Ignored.Players

  13. local AimingSettingsIgnoredWhitelistMode = AimingSettingsIgnored.WhitelistMode

  14. -- // Services

  15. local UserInputService = game:GetService("UserInputService")

  16. -- // Config

  17. local Configuration = {

  18. -- // The ones under this you may change - if you are a normal user

  19. Enabled = true,

  20. Method = "Target,Hit",

  21. FocusMode = false, -- // Stays locked on to that player only. If true then uses the silent aim keybind, if a input type is entered, then that is used

  22. ToggleBind = false, -- // true = Toggle, false = Hold (to enable)

  23. Keybind = Enum.UserInputType.MouseButton2, -- // You can also have Enum.KeyCode.E, etc.

  24. -- // Do not change anything below here - if you are not a normal user

  25. CurrentlyFocused = nil,

  26. SupportedMethods = {

  27. __namecall = {"Raycast", "FindPartOnRay", "FindPartOnRayWithWhitelist", "FindPartOnRayWithIgnoreList"},

  28. __index = {"Target", "Hit", "X", "Y", "UnitRay"}

  29. },

  30. ExpectedArguments = {

  31. FindPartOnRayWithIgnoreList = {

  32. ArgCountRequired = 3,

  33. Args = {

  34. "Instance", "Ray", "table", "boolean", "boolean"

  35. }

  36. },

  37. FindPartOnRayWithWhitelist = {

  38. ArgCountRequired = 3,

  39. Args = {

  40. "Instance", "Ray", "table", "boolean"

  41. }

  42. },

  43. FindPartOnRay = {

  44. ArgCountRequired = 2,

  45. Args = {

  46. "Instance", "Ray", "Instance", "boolean", "boolean"

  47. }

  48. },

  49. Raycast = {

  50. ArgCountRequired = 3,

  51. Args = {

  52. "Instance", "Vector3", "Vector3", "RaycastParams"

  53. }

  54. }

  55. }

  56. }

  57. local IsToggled = false

  58. Aiming.SilentAim = Configuration

  59. -- // Functions

  60. local function CalculateDirection(Origin, Destination, Length)

  61. return (Destination - Origin).Unit * Length

  62. end

  63. --// Validate arguments passed through namecall

  64. local function ValidateArguments(Args, Method)

  65. --// Get Type Information from Method

  66. local TypeInformation = Configuration.ExpectedArguments[Method]

  67. if not TypeInformation then return false end

  68. --// Make new table for successful matches

  69. local Matches = 0

  70. --// Go through every argument passed

  71. for ArgumentPosition, Argument in next, Args do

  72. --// Check if argument type is a certain type

  73. if typeof(Argument) == TypeInformation.Args[ArgumentPosition] then

  74. Matches = Matches + 1

  75. end

  76. end

  77. --// Get information

  78. local ExpectedValid = #Args

  79. local GotValid = Matches

  80. --// Return whether or not arguments are valid

  81. return ExpectedValid == GotValid

  82. end

  83. -- // Additional checks you can add yourself, e.g. upvalue checks

  84. function Configuration.AdditionalCheck(metamethod, method, callingscript, ...)

  85. return true

  86. end

  87. -- // Checks if a certain method is enabled

  88. local stringsplit = string.split

  89. local stringlower = string.lower

  90. local tablefind = table.find

  91. local function IsMethodEnabled(Method, Given, PossibleMethods)

  92. -- // Split it all up

  93. PossibleMethods = PossibleMethods or stringsplit(Configuration.Method, ",")

  94. Given = Given or Method

  95. -- // Vars

  96. local LoweredMethod = stringlower(Method)

  97. local FoundI = tablefind(PossibleMethods, Method) or tablefind(PossibleMethods, LoweredMethod) -- // to cover stuff like target (lowercase)

  98. local Found = FoundI ~= nil

  99. local Matches = LoweredMethod == stringlower(Given)

  100. -- // Return

  101. return Found and Matches

  102. end

  103. -- // Allows you to easily toggle multiple methods on and off

  104. function Configuration.ToggleMethod(Method, State)

  105. -- // Vars

  106. local EnabledMethods = Configuration.Method:split(",")

  107. local FoundI = table.find(EnabledMethods, Method)

  108. -- //

  109. if (State) then

  110. if (not FoundI) then

  111. table.insert(EnabledMethods, Method)

  112. end

  113. else

  114. if (FoundI) then

  115. table.remove(EnabledMethods, FoundI)

  116. end

  117. end

  118. -- // Set

  119. Configuration.Method = table.concat(EnabledMethods, ",")

  120. end

  121. -- // Modify the position/cframe, add prediction yourself (use Aiming.Selected)

  122. function Configuration.ModifyCFrame(OnScreen)

  123. return OnScreen and AimingSelected.Position or AimingSelected.Part.CFrame

  124. end

  125. -- // Focuses a player

  126. local Backup = {table.unpack(AimingSettingsIgnoredPlayers)}

  127. function Configuration.FocusPlayer(Player)

  128. table.insert(AimingSettingsIgnoredPlayers, Player)

  129. AimingSettingsIgnoredWhitelistMode.Players = true

  130. end

  131. -- // Unfocuses a player

  132. function Configuration.Unfocus(Player)

  133. -- // Find it within ignored, and remove if found

  134. local PlayerI = table.find(AimingSettingsIgnoredPlayers, Player)

  135. if (PlayerI) then

  136. table.remove(AimingSettingsIgnoredPlayers, PlayerI)

  137. end

  138. -- // Disable whitelist mode

  139. AimingSettingsIgnoredWhitelistMode.Players = false

  140. end

  141. -- // Unfocuses everything

  142. function Configuration.UnfocusAll(Replacement)

  143. Replacement = Replacement or Backup

  144. AimingSettingsIgnored.Players = Replacement

  145. AimingSettingsIgnoredWhitelistMode.Players = false

  146. end

  147. -- //

  148. function Configuration.FocusHandler()

  149. if (Configuration.CurrentlyFocused) then

  150. Configuration.Unfocus(Configuration.CurrentlyFocused)

  151. Configuration.CurrentlyFocused = nil

  152. return

  153. end

  154. if (AimingChecks.IsAvailable()) then

  155. Configuration.FocusPlayer(AimingSelected.Instance)

  156. Configuration.CurrentlyFocused = AimingSelected.Instance

  157. end

  158. end

  159. -- // For the toggle and stuff

  160. local function CheckInput(Input, Expected)

  161. local InputType = Expected.EnumType == Enum.KeyCode and "KeyCode" or "UserInputType"

  162. return Input[InputType] == Expected

  163. end

  164. UserInputService.InputBegan:Connect(function(Input, GameProcessedEvent)

  165. -- // Make sure is not processed

  166. if (GameProcessedEvent) then

  167. return

  168. end

  169. -- // Check if matches bind

  170. local FocusMode = Configuration.FocusMode

  171. if (CheckInput(Input, Configuration.Keybind)) then

  172. if (Configuration.ToggleBind) then

  173. IsToggled = not IsToggled

  174. else

  175. IsToggled = true

  176. end

  177. if (FocusMode == true) then

  178. Configuration.FocusHandler()

  179. end

  180. end

  181. -- // FocusMode check

  182. if (typeof(FocusMode) == "Enum" and CheckInput(Input, FocusMode)) then

  183. Configuration.FocusHandler()

  184. end

  185. end)

  186. UserInputService.InputEnded:Connect(function(Input, GameProcessedEvent)

  187. -- // Make sure is not processed

  188. if (GameProcessedEvent) then

  189. return

  190. end

  191. -- // Check if matches bind

  192. if (CheckInput(Input, Configuration.Keybind) and not Configuration.ToggleBind) then

  193. IsToggled = false

  194. end

  195. end)

  196. -- // Hooks

  197. local __namecall

  198. __namecall = hookmetamethod(game, "__namecall", function(...)

  199. -- // Vars

  200. local args = {...}

  201. local self = args[1]

  202. local method = getnamecallmethod()

  203. local callingscript = getcallingscript()

  204. -- // Make sure everything is in order

  205. if (self == workspace and not checkcaller() and IsToggled and table.find(Configuration.SupportedMethods.__namecall, method) and IsMethodEnabled(method) and AimingChecks.IsAvailable() and Configuration.Enabled and ValidateArguments(args, method) and Configuration.AdditionalCheck("__namecall", method, callingscript, ...)) then

  206. -- // Raycast

  207. if (method == "Raycast") then

  208. -- // Modify args

  209. args[3] = CalculateDirection(args[2], Configuration.ModifyCFrame(false).Position, 1000)

  210. -- // Return

  211. return __namecall(unpack(args))

  212. end

  213. -- // The rest pretty much, modify args

  214. local Origin = args[2].Origin

  215. local Direction = CalculateDirection(Origin, AimingSelected.Part.Position, 1000)

  216. args[2] = Ray.new(Origin, Direction)

  217. -- // Return

  218. return __namecall(unpack(args))

  219. end

  220. -- //

  221. return __namecall(...)

  222. end)

  223. local __index

  224. __index = hookmetamethod(game, "__index", function(t, k)

  225. -- // Vars

  226. local callingscript = getcallingscript()

  227. -- // Make sure everything is in order

  228. if (t:IsA("Mouse") and not checkcaller() and IsToggled and AimingChecks.IsAvailable() and IsMethodEnabled(k) and Configuration.Enabled and Configuration.AdditionalCheck("__index", nil, callingscript, t, k)) then

  229. -- // Vars

  230. local LoweredK = k:lower()

  231. -- // Target

  232. if (LoweredK == "target") then

  233. return AimingSelected.Part

  234. end

  235. -- // Hit

  236. if (LoweredK == "hit") then

  237. return Configuration.ModifyCFrame(false)

  238. end

  239. -- // X/Y

  240. if (LoweredK == "x" or LoweredK == "y") then

  241. return Configuration.ModifyCFrame(true)[k]

  242. end

  243. -- // UnitRay

  244. if (LoweredK == "unitray") then

  245. local Origin = __index(t, k).Origin

  246. local Direction = CalculateDirection(Origin, Configuration.ModifyCFrame(false).Position)

  247. return Ray.new(Origin, Direction)

  248. end

  249. end

  250. -- // Return

  251. return __index(t, k)

  252. end)

  253. -- // GUI

  254. local SilentAimSection = AimingPage:addSection({

  255. title = "Silent Aim"

  256. })

  257. SilentAimSection:addToggle({

  258. title = "Enabled",

  259. default = Configuration.Enabled,

  260. callback = function(value)

  261. Configuration.Enabled = value

  262. end

  263. })

  264. SilentAimSection:addToggle({

  265. title = "Focus Mode",

  266. default = Configuration.FocusMode,

  267. callback = function(value)

  268. Configuration.FocusMode = value

  269. end

  270. })

  271. SilentAimSection:addToggle({

  272. title = "Toggle Bind",

  273. default = Configuration.ToggleBind,

  274. callback = function(value)

  275. Configuration.ToggleBind = value

  276. end

  277. })

  278. SilentAimSection:addKeybind({

  279. title = "Keybind",

  280. default = Configuration.Keybind,

  281. changedCallback = function(value)

  282. Configuration.Keybind = value

  283. end

  284. })

  285. SilentAimSection:addToggle({

  286. title = "Focus Mode (Uses Keybind)",

  287. default = Configuration.FocusMode,

  288. callback = function(value)

  289. Configuration.FocusMode = value

  290. end

  291. })

  292. SilentAimSection:addKeybind({

  293. title = "Focus Mode (Custom Bind)",

  294. changedCallback = function(value)

  295. Configuration.FocusMode = value

  296. end

  297. })

  298. -- // Adding each method

  299. local SilentAimMethodsSection = AimingPage:addSection({

  300. title = "Silent Aim: Methods"

  301. })

  302. for _, method in ipairs(Configuration.SupportedMethods.__index) do

  303. SilentAimMethodsSection:addToggle({

  304. title = method,

  305. default = IsMethodEnabled(method),

  306. callback = function(value)

  307. Configuration.ToggleMethod(method, value)

  308. end

  309. })

  310. end

  311. for _, method in ipairs(Configuration.SupportedMethods.__namecall) do

  312. SilentAimMethodsSection:addToggle({

  313. title = method,

  314. default = IsMethodEnabled(method),

  315. callback = function(value)

  316. Configuration.ToggleMethod(method, value)

  317. end

  318. })

  319. end

Universal Silent Aim - Pastebin.com (2025)

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Prof. Nancy Dach

Last Updated:

Views: 5956

Rating: 4.7 / 5 (77 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Prof. Nancy Dach

Birthday: 1993-08-23

Address: 569 Waelchi Ports, South Blainebury, LA 11589

Phone: +9958996486049

Job: Sales Manager

Hobby: Web surfing, Scuba diving, Mountaineering, Writing, Sailing, Dance, Blacksmithing

Introduction: My name is Prof. Nancy Dach, I am a lively, joyous, courageous, lovely, tender, charming, open person who loves writing and wants to share my knowledge and understanding with you.