At first, I'm really sorry if this question is against guidelines and wrote with no elementary code. Question: I want to learn how to encrypt my code and or obfuscate it.
What ways are to make simple encryption of an example code
function onPlayerRespawned(newPlayer) local pl = newPlayer:findFirstChild("Humanoid") if pl ~= nil then if game.Workspace:findFirstChild(pl.Parent.Name) ~= nil then pl.WalkSpeed = 78 end end end game.Workspace.ChildAdded:connect(onPlayerRespawned) --[[this script is just for example]]
I dont know about the obfuscator, but if you want a function that happens on players that spawn you should usePlayerAdded and CharacterAdded:
function onPlayerRespawned(newCharacter) newCharacter.Humanoid.WalkSpeed=78 end function onPlayerEntered(newPlayer) if newPlayer.Character then onPlayerRespawned(newPlayer.Character) end--Just in case the character already spawned before the CharacterAdded event was binded newPlayer.CharacterAdded:Connect(onPlayerRespawned) end game.Players.PlayerAdded:Connect(onPlayerEntered)
The problem with using workspace.ChildAdded is that anything is added it could happen to that thing. In your case, every NPC, that have a humanoid named "Humanoid" would have the same high walkspeed.
Yea i will do an encoding that computer will decode [read] with no problem but for human it will be impossible.