Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- [!] Created by Greekazo@v3rm.net (https://v3rmillion.net/member.php?action=profile&uid=1604735)
- [!] Please be sure to give credits to the author of this script (^)
- ]]
- local ModuleScriptsPath = game.ReplicatedStorage[""]:GetChildren();
- local NetworkManager;
- for I, V in next, ModuleScriptsPath do
- if V:IsA("ModuleScript") then
- local temp_var_1 = require(V);
- for I2, _ in next, temp_var_1 do
- if I2 == "FireProjectile" then
- V.Name = "==[NETWORK]==" --; There was no reason to rename, but i did it while testing some new features.
- NetworkManager = V;
- end
- end
- end
- end
- --; These variables are only for the ClosestPlayer function.
- local temp_var_1 = game:GetService("Players").LocalPlayer
- local temp_var_2 = game:GetService("Workspace").CurrentCamera
- local temp_var_3 = temp_var_1:GetMouse()
- local function getClosestPlayerToCursor()
- local temp_var_4 = nil
- local temp_var_5 = math.huge
- for i, v in pairs(game:GetService("Workspace")["Characters"]:GetChildren()) do
- if v:FindFirstChild("Health") and v.Health.Value > 0 and v:FindFirstChild("Root") then
- local temp_var_6 = game:GetService("Workspace").CurrentCamera:WorldToViewportPoint(v.Root.Position)
- local temp_var_7 = (Vector2.new(temp_var_6.X, temp_var_6.Y) - Vector2.new(temp_var_3.X, temp_var_3.Y)).magnitude
- if temp_var_7 < temp_var_5 then
- temp_var_4 = v
- temp_var_5 = temp_var_7
- end
- end
- end
- return temp_var_4
- end
- local unpacked = require(NetworkManager);
- local BulletHandler_from_module_script = unpacked["FireProjectile"];
- local my_character_name = game.Players.LocalPlayer.Name;
- --; Could've hooked it, but as it's just a ModuleScript function let's keep it like this! If you wish you could hook it, wouldn't make any difference.
- unpacked["FireProjectile"] = function(self, ...)
- local arguments = {...};
- if tostring(arguments[4]) == my_character_name then
- local the_current_closest_player_to_me = getClosestPlayerToCursor()
- if the_current_closest_player_to_me and the_current_closest_player_to_me:FindFirstChild("Health") and the_current_closest_player_to_me.Health.Value > 0 then
- arguments[2] = the_current_closest_player_to_me.Hitbox.Head.Position;
- end
- end
- return BulletHandler_from_module_script(self, unpack(arguments))
- end
Add Comment
Please, Sign In to add comment