I want to modify the default commands for Adonis admin. I want to make it compatible with my own anti-exploit.
That’s completely based on your anti-exploit. If it’s custom I highly doubt we can help you.
What do you mean by “default commands”? I don’t use Adonis so I’m not familiar- can you use things like ;fly by default? Give an example
:fly, :teleport, those kinds of default commands, i want these commands to change some values for a player so that my anit-exploit doesnt false ban
If you have the source of Adonis’s command modules (no clue if they’re open source or not) you could just make a whitelist for people who are currently using commands like fly.
mean, i dont think this is the best idea theres probably better ways than this, but when the anti exploit flags a user, you can check if they are a mod or admin / check the players id, and if its someone you dont want banned, just have nothing done to them
what if the person does not have permissions and someone just used fly or tp commands on them
i think there is, i editted the module but it doesnt work
@ryanadamdragon You can add a whitelist to all admins in Adonis Admin to make this work.
This uses the adonis API.
if _G.Adonis then
if _G.Adonis.CheckPlayer(player) then
-- stop anti cheat
end
end
what if its some random person that i gave fly commands?
I really like what you did there Coded, but here is something I added onto your code to make it better.
if _G.Adonis then
if _G.Adonis.CheckPlayer(player) then
-- if player is an admin, return and do nothing
return
elseif not _G.Adonis.CheckPlayer(player) then
-- if player is not an admin, run code below
end
end
or
if _G.Adonis and not _G.Adonis.CheckPlayer(player) then
-- if player is not an admin, code below runs
end
Hi, the solution doesn’t work for me.
Could you help me?
Thanks
Sorry I havnt found any solutions.
In your anti cheat you can have a admin table check for the person who was detected by the anti cheat if they are apart of the admin table then return end or when you run a command set an attribute in the player who the command was run on and in the anti cheat return end if they have that attribute before the punishment is issued
instead of modding the commands i suggest you instead whitelist the admins so if lets say a player is caught walkspeed hacking it would check if player is an admin by either using a table/name/UserId
and if they are it does nothing but if they arent you kick/ban them
heres a script that kinda shows you what to try to do
game:GetService("Players").PlayerAdded:Connect(function(player)
if player.Name == "YOURUSER" then
return
else
player:Kick("Your Reason")
end)
you can add a value named “banned” and tick it before the kick and have a datastore that saves the values and make it if the players have a value named banned and its ticked true then kick em