Artic's Anti-Teleport - Detection teleport system and punishing players

Artic’s Anti-Teleport [R15 Characters]

Hello Developers!


Today I’d like to introduce you my Anti-Teleport script. Basically all the documentation of script will be included in next script (Artic’s Anti-Teleport) I’ll post it under this of this short introduction. I made this an open source so everyone can contribute to open source at GitHub. The model is going to be free to use for everyone, get it in your inventory for free here:


What this Anti-Teleport does and how it works?

Artic’s Anti-Teleport detection system is getting localplayer’s 1. position and later every few seconds it gets it’s 2. position then it calculates the difference of it’s position or gets that named magnitude. We set this variable named as MaxMagnitudeDifference. When anti-teleport system detects suspicious magnitude and even if player is touching the material it adds a value to that named ‘caughts’ value which we can set it’s highest value in variable MaxCounterValue.

IMPORTANT: MaxMagnitudeDifference can be different in some games which it’s localplayer’s movement speed is not on default value. So make sure to change that if you have some kind of speed game also I do not recommend taking this Anti-Teleport system if you have some teleports in your game.

Here is an image example:


Now I’ll place my main script under here.
Make sure to place the script in ServerScriptService.

Script:

local MaxMagnitudeDifference = 100 -- This value represents the max value of the magnitude difference

local MaxCounterValue = 3 -- This value represents the max value how many times can script caught player as exploiting


--
--               _   _      _                      _   _     _______   _                       _   
--    /\        | | (_)    ( )         /\         | | (_)   |__   __| | |                     | |  
--   /  \   _ __| |_ _  ___|/ ___     /  \   _ __ | |_ _ ______| | ___| | ___ _ __   ___  _ __| |_ 
--  / /\ \ | '__| __| |/ __| / __|   / /\ \ | '_ \| __| |______| |/ _ \ |/ _ \ '_ \ / _ \| '__| __|
-- / ____ \| |  | |_| | (__  \__ \  / ____ \| | | | |_| |      | |  __/ |  __/ |_) | (_) | |  | |_ 
--/_/    \_\_|   \__|_|\___| |___/ /_/    \_\_| |_|\__|_|      |_|\___|_|\___| .__/ \___/|_|   \__|
--                                                                           | |                   
--                                                                           |_|                   
--

--  Artic's Anti-Teleport is free software: you can redistribute it and/or modify
--  it under the terms of the GNU General Public License as published by
--  the Free Software Foundation, either version 3 of the License, or
--  (at your option) any later version.

--  Artic's Anti-Teleport is distributed in the hope that it will be useful,
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--  GNU General Public License for more details.

--  You should have received a copy of the GNU General Public License
--  along with Artic's Anti-Teleport. If not, see <https://www.gnu.org/licenses/>.

game:GetService("Players").PlayerAdded:Connect(function(player)
	local LocalPlayerPosition = Instance.new("IntValue") -- This is just a value without any special meaning
	LocalPlayerPosition.Parent = script
	LocalPlayerPosition.Name = player.Name.."Position"
	
	local Counter = Instance.new("IntValue") -- This Value represents caughts from server value
	Counter.Parent = script[player.Name.."Position"]
	Counter.Name = "Counter"
	
	
	local Timer = Instance.new("IntValue") -- This is a timer counter
	Timer.Parent = script[player.Name.."Position"]
	Timer.Name = "Time"
	
	player.CharacterAdded:Connect(function(character)
		
       local function WeldToHuman(A,B)  --Attach Part for some reasons of any HumanoidRootPart exploiting
        B.CFrame = A.CFrame
        local  Weld = Instance.new("Weld")
        Weld.Part0 = A
        Weld.C0 = A.CFrame:Inverse()
        Weld.Part1 = B
        Weld.C1 = B.CFrame:Inverse()
        Weld.Parent = A
        return Weld
       end

        WeldToHuman(character:FindFirstChild("HumanoidRootPart"),Instance.new("Part",character))
        character:WaitForChild("Part").Transparency = 1
        character:WaitForChild("Part").Locked = true
		
		while true do
		 Timer.Value = Timer.Value + 1
			local function YaxisExists()
               if (character:FindFirstChild('HumanoidRootPart')) ~= nil then --Check if HumanoidRootPart exists in player
                 return "HumanoidRootPartExists" -- Return string that HumanoidRootPart exists
              else
	           if (character:FindFirstChild("Part")) ~= nil then --Check if Part exists in player
	             return "PartExists" -- Return string that part exists
	           end
  	        end
           return false -- Return false which means no-one of those exists
          end

          local success, message = pcall(YaxisExists)
		
	if success ~= false then	-- If none of these is true then automatically kick him from game
		if message == "HumanoidRootPartExists" then	 --If HumanoidRootPart exists do
		  local LocalPositionBefore = character:FindFirstChild("HumanoidRootPart").Position --Get player position before
		  wait(5)
		  local LocalPositionAfter = character:FindFirstChild("HumanoidRootPart").Position -- Get player position after
		
		  local Mag = (LocalPositionBefore-LocalPositionAfter).Magnitude--Get the magnitude
	   	
		   if Mag >= MaxMagnitudeDifference then -- if magnitude is higher than our variable go next
			  Counter.Value = Counter.Value + 1
			 if Counter.Value >= MaxCounterValue then -- if server caughts are higher or equal to our variable go next
				if (Counter.Value/Timer.Value) <= 50 then -- if caughts devided by in game time is lower or equal to 50% go next
				   if character:FindFirstChild("Humanoid").FloorMaterial ~= Enum.Material.Air then -- Prevent roblox physics flungs
				 warn("Player: "..player.Name.."was caught teleporting")
				 script[player.Name.."Position"]:Destroy()
				 player:kick("Player: "..player.Name.. " was caught exploiting")
				 break
				else
					Counter.Value = 0 -- if caughts devided by in game time is not lower or equals to 50% set caughts to 0
				   end
				end
			 end     
		   end
		   if message == "PartExists" then	-- if Part exists
			local LocalPositionBefore = character:FindFirstChild("Part").Position --Get part position before
			wait(5)
            local LocalPositionAfter = character:FindFirstChild("Part").Position -- Get part position after
		
		    local Mag = (LocalPositionBefore-LocalPositionAfter).Magnitude --Calculate the magnitude
		    
		     if Mag >= MaxMagnitudeDifference then-- if magnitude is higher than our variable go next
			   Counter.Value = Counter.Value + 1
			  if Counter.Value >= MaxCounterValue then -- if server caughts are higher or equal to our variable go next
				 if (Counter.Value/Timer.Value) <= 50 then -- if caughts devided by in game time is lower or equal to 50% go next
				   if character:FindFirstChild("Humanoid").FloorMaterial ~= Enum.Material.Air then -- Prevent roblox physics flungs
				   warn("Player: "..player.Name.."was caught teleporting")
				   script[player.Name.."Position"]:Destroy()
				   player:kick("Player: "..player.Name.. " was caught exploiting")
				   break
				 else
					Counter.Value = 0 -- if caughts devided by in game time is not lower or equals to 50% set caughts to 0
				end
			   end
			  end     
		     end
		   end
		  end
	        else
	          warn("Player: "..player.Name.."was caught teleporting")
	          script[player.Name.."Position"]:Destroy()
	          player:kick("Player: "..player.Name.. " was caught exploiting")
	          break
	        end
		end
	end)
end)

I use a GNU General Public License v3.0 in this script in which you have permissions to:

:white_check_mark: Commercial use
:white_check_mark: Modification
:white_check_mark: Distribution
:white_check_mark: Patent use
:white_check_mark: Private use

:x: Liability
:x: Warranty


If you have any better idea on what could of been better contribute your ideas to me in GitHub.
You came to an end, I’d like to say a big thank you for reading my code (if so).
I hope you are having an amazing day today :slight_smile:

Stay creative everyone! :herb:

29 Likes

I honestly dislike the idea of “Kicking” an exploiter. I prefer to do a smaller punishment, like guns doing less damage or slowing the player down. If the exploiter keeps exploiting then the player is hidden to everyone and the player can’t interact with anything.

4 Likes

I mean I created the whole detection for exploiting teleport players. If you’d like to have a different punishment, be free to take the model and rescript it for your game because I can’t really see your game or explorer I can’t do much. Have a nice day. :slightly_smiling_face:

5 Likes

I like the concept I’ve previously made one almost identical. I don’t plan to use it but I will leave a suggestion, you should have a bool value for each player - which allows them immunity from sanctions for a brief period. For example, if it is true the player is not flagged for having been teleported.

This way games that include teleports, and so on; can grant access then revoke it during the period of the teleport.

5 Likes

Great suggestion, maybe I’ll add this feature as well. Thank you for your reply :slight_smile:

1 Like

I would like to note, I jumped off the side of the map, and the script falsely kicked me for “exploiting”, it also had a error as well.

3 Likes

Hello thank you for your bug report reply, going to fix it when I get home. Sorry about the misunderstanding bug.

1 Like

No problem! I just wanted to report the issue, otherwise I tested it in playstudio and forced my character to teleport and it kicked me as intended, maybe take away counting the Y position or some other math with the players Y velocity, not sure 100%, but it either kicked me from falling, or because I “Teleported” back to spawn when I died. (Roblox seems to have a 0.01 time frame right before you respawn, you can notice this and its kinda like the game teleports you in this frame, which couldve also stumped your script, so you may want to put a check for player deaths/respawning)

2 Likes

This actually looks really cool dude! I suggest you sell this. It can be a real hit if you add anti-speed (move 80 studs within a certain time, or anti-fly. Also make it so it lags players back, because laggy players could easily be kicked with the current kick system, unless you already full-proofed that… If you lag them back, then they can’t use the exploit and they aren’t teleported anywhere.

4 Likes

Yeah kicking an exploiter is pretty stupid bad business just disables their damage and stuff and when i used to exploit in epic minigames it usually just doesnt let you into the minigames

Do you think you could make it teleport the player back to where they were before they teleported instead of kicking them?

1 Like

Don’t recommend this anticheat, the worst is the Arctic Anti-Fly, that thing barely works even on a baseplate.

Firstly I’d thank you for misspelling my last name. My last name is ‘Artic’ that’s why the name is not the Arctic. I agree that this might not be the best anti-cheat available but still, Artic Anti-Fly works pretty well if you know how to set it up. Make sure you DM me if you have any additional questions before you negatively impact my threads. Thank you.

3 Likes

How can you even point it out straight forward? The post you are replying to was dead from 10 months! Roblox’s programming language has gone through certainly alot of changes. You didnt even “report” the errors to the creator in DM’s. + what do you mean by “dont recommend” the creator didnt even mentioned about recommended to be used.

3 Likes

Try to make the script disabled when testing in roblox studio
or teleporters.

I tried this anti-fly in early 2020, I just just recently re-visited this page. I remember fiddling with this one. The devforum is a place that constantly complains about anticheats anyway, I’m just letting future readers to be aware about this one not being as reliable as they are hoping it will be.

2 Likes

After the character dies and respawns, it kicks me.

Now that’s how you know the anticheat is working.