Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- READ CAREFULLY!
- --Anti Afk
- Hint: Say afk.on to turn on, say afk.off to turn off
- localplr = game.Players.LocalPlayer
- localplr.Chatted:connect(function(msg)
- msg = msg:lower()
- if (msg == "afk.on") and (localplr.Character.Parent == workspace) then
- AnimBackup = localplr.Character.Animate:Clone()
- localplr.Character.Parent = game.Lighting
- elseif (msg == "afk.off") and (localplr.Character.Parent == game.Lighting) then
- localplr.Character.Parent = workspace
- localplr.Character:MakeJoints()
- AnimBackup.Parent = localplr.Character
- end
- end)
- --Type your key on "Key Goes Here".
- localplr = game.Players.LocalPlayer
- keyToggle = "key goes here" -- make sure the key is in all caps
- function onKeyPress(actionName, userInputState, inputObject)
- if (userInputState == Enum.UserInputState.Begin) and (localplr.Character.Parent == workspace) then
- animBackup = localplr.Character.Animate:Clone()
- localplr.Character.Parent = game.Lighting
- elseif (userInputState == Enum.UserInputState.Begin) and (localplr.Character.Parent == game.Lighting) then
- localplr.Character.Parent = workspace
- localplr.Character:MakeJoints()
- animBackup.Parent = localplr.Character
- end
- end
- game.ContextActionService:BindAction("keyPress", onKeyPress, false, Enum.KeyCode[KeyToggle])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement