ProxProtect - ProximityPrompt Hold Validation
ProxProtect is a lightweight utility module designed to protect your ProximityPrompts from client side tampering.
It is specifically designed to prevent exploiters from modifying the HoldDuration property to trigger prompts instantly or faster than intended by the developer.
Why was this created?
I had decided to create this module not just for myself but for others due to the amount of tampering ProximityPrompt’s seem to experience.
I’ve seen this happen in many games which lead to an unfair advantage. I.e opening crates immediately or ATM hacking.
What does ProxProtect really do?
ProxProtect actively detects and prevents tamped changes to HoldDuration by:
- Prevents setting
HoldDurationto0or a lower number. - Monitoring Prompt Hold duration by using
os.clock(). - Full server-side authoritative values.
- Compares the hold time against the prompt’s
HoldDuration - Applies an optional tolerance window to account for client latency
Invalid triggers never reach your intended interaction logic.
How to use ProxProtect
You can find the module here!
ProxProtect’s installation process is incredibly simple and similar to the standard ProximityPrompt practice.
NOTE: ProxProtect only secures SERVER scripted ProximityPrompts. This module should not be used on the client.
local proxProtect = require("path/to/module")
-- // Initialise the new proximityPrompt
local prompt = proxProtect.new(script.Parent.ProximityPrompt)
-- // Fires on *valid* triggers
prox.Triggered:Connect(function(plr)
-- your logic goes here.
end)
-- // Detecting invalid triggers by users
-- // By not including this means nothing will happen at all
prox.OnInvalidTrigger:Connect(function(plr)
-- LoadCharacter, logging, etc..
end)
What if I need to change a Prompts Property?
You can still access all of the ProximityPrompts functions and properties by using: prompt.Prompt
NOTE: if you decide to setup a .Triggered connection using prompt.Prompt.Triggered then ProxProtect will not work!
Below is a showcase of how ProxProtect works:
https://streamable.com/rbqmzd
You can also watch it directly via https://streamable.com/rbqmzd
Feedback
This was my first ever attempt at creating an OOP based module and I am completely open for constructive criticism to make my future work better!
- Yes
- No
- Maybe for future work