Nyemse / SPEARHEAD

A free weapon system for Roblox
GNU General Public License v3.0
19 stars 1 forks source link

Solution for item/weapon dropping server spam/exploiting #160

Open RamenForever opened 1 year ago

RamenForever commented 1 year ago

Spearhead Suggestion [LAG/SECURITY]

ANTI SERVER-CRASHING ITEM DROPPING SPAM

Make dropped items not render at certain distances or add some sort of measures to prevent players from dropping a bunch of weapons on the floor over and over again or games with spawners/item shops where they can emass and drop huge piles of weapons on the ground

Roblox physics is also super laggy and i can imagine this item dropping spam can be abused to lag or crash a server POSSIBLE IDEAS AND SOLUTIONS TO STOP DROP SPAM:Rate limiting drops, max dropped item render distance, spam detection, cool-down, drop-time, hold to drop, de-spawn rate timer or despawn rate (the more items you drop the faster they despawn), dropped-item alternate low-poly server models, physics sleep, or anything else you can think of to stop this

@Nyemse

DeletedArch commented 11 months ago

Identify a local variable called gunDropBool and initialize it with false create a new item in config called gunDropCooldown and set it with the time you like in seconds, you can access it later using config.gunDropCooldown

go to line 1113 and 1114 in CharacterClient and add this instead


if gunDropBool == false then
gunDropBool = true
Unequip(equipped)
playerDropGun:Fire()
task.wait(config.gunDropCooldown)
gunDropBool = false
else
-- Punish player here
end

-- of course this isn't 100% practical but it gives a rough idea about how it should be
a bit of tweaking and adding a heat system could do the job and also prevent unwanted spam