Advertisement
Guest User

Script in keybind [made By FindFirstFall]

a guest
Apr 21st, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. local UIS = game:GetService("UserInputService")
  2.  
  3. UIS.InputBegan:Connect(function(input,gameProcessed)
  4. if input.UserInputType == Enum.UserInputType.Keyboard then
  5. if input.KeyCode == Enum.KeyCode.E then
  6. if UIS:GetFocusedTextBox() == nil then
  7. for i,v in pairs(game.Workspace.NPCS:GetChildren()) do
  8. local mag = (v.LowerTorso.Position-game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude
  9. if mag <= 10 then
  10. for i = 1,0.8,-0.05 do
  11. wait()
  12. script.Parent.ImageColor3 = Color3.new(i,i,i)
  13. end
  14. wait()
  15. for i = 0.0,1,0.05 do
  16. wait()
  17. script.Parent.ImageColor3 = Color3.new(i,i,i)
  18. end
  19. v.NPCTalk:FireServer()
  20. end
  21. end
  22. end
  23. end
  24. end
  25. end)
  26.  
  27. while wait() do
  28. script.Parent.Visible = false
  29. for i,v in pairs(game.Workspace.NPCS:GetChildren()) do
  30. local mag = (v.LowerTorso.Position-game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude
  31. if mag <= 10 then
  32. local WSP = game.Workspace.CurrentCamera:WorldToScreenPoint(v.LowerTorso.Position)
  33. script.Parent.Visible = true
  34. script.Parent.Position = UDim2.new(0,WSP.X,0,WSP.Y)
  35. script.Parent.TextLabel.Text = "to chat with ..."..v.Name
  36. end
  37. end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement