Advertisement
HenloMyDude

spectator

Aug 24th, 2019
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1.  
  2.  
  3. plr = owner
  4. char = plr.Character
  5. players = game:GetService("Players")
  6.  
  7. function FindMe(name)
  8. for _,a in pairs(players:GetPlayers()) do
  9. if a.Name:sub(1,name:len()):lower()==name:lower() then
  10. return a
  11. end
  12. end
  13. end
  14.  
  15. NLS([[
  16.  
  17. plr = game.Players.LocalPlayer
  18. cam = workspace.CurrentCamera
  19.  
  20. players = game:GetService("Players")
  21.  
  22. function FindMe(name)
  23. for _,a in pairs(players:GetPlayers()) do
  24. if a.Name:sub(1,name:len()):lower()==name:lower() then
  25. return a
  26. end
  27. end
  28. end
  29.  
  30. plr.Chatted:connect(function(message)
  31. if message:sub(1,5) == "!spec" then
  32. cam.CameraSubject = FindMe(message:sub(7)).Character:FindFirstChildOfClass("Humanoid")
  33. end
  34. end)
  35.  
  36. ]],char)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement