local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Player = game.Players.LocalPlayer
local WeaponMethods = require(game.ReplicatedStorage.GunModule)
local WeaponStats = require(game.ReplicatedStorage.GunStats)
local Tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
local GunData = WeaponStats[Tool.Name]

while  true do
  for _,v in ipairs(game.Players:GetPlayers()) do
   ReplicatedStorage.FireEvent:FireServer(CurrentGun, v.Character.Head.Position, Vector3.new(0.15, 0.15, 57.58), CFrame.new(1492.65, 79.09, -3802.98, 0.99, 0.00, 0.10, -2.32e-10, 0.99, -0.03, -0.10, 0.03,  0.99), v.Character.Head, GunData, v.Character.Head.Position, false)
   wait()
end
end

So this script right here lets the exploiter kill everyone on the map when they equip a gun. How would I go about patching this for my game?

3 comments

0

Raycast check on the server that way they can't hit people they cannot shoot

0

Would you be able to help me make a raycasting check? I'm not very experience with raycast.

0

never trust the client. let the server handle where the bullets land & limit what the client can send to the server