Advertisement
Guest User

Untitled

a guest
Apr 18th, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. wait(0.01)
  2. local player = game.Players.LocalPlayer
  3. local pos = script.Parent.Position
  4. local mouse = player:GetMouse()
  5. script.Parent.ClickDetector.MouseHoverEnter:connect(function(player)
  6. if player:DistanceFromCharacter(pos) < 15 then
  7. player.PlayerGui.Interaction.Int.InteractInfo.Visible = true
  8. player.PlayerGui.Interaction.Int.hover:Play()
  9. end
  10. end)
  11. script.Parent.ClickDetector.MouseHoverLeave:connect(function(player)
  12. local pos = script.Parent.Position
  13. local player = game.Players.LocalPlayer
  14. player.PlayerGui.Interaction.Int.InteractInfo.Visible = false
  15. end)
  16. mouse.KeyDown:connect(function(key)
  17. if key:lower() == "e" and player:DistanceFromCharacter(pos) < 15 then
  18. script.Parent:Destroy()
  19. player.PlayerGui.Interaction.Int.InteractInfo.Visible = false
  20. player.PlayerGui.Interaction.Int.pick:Play()
  21. end
  22. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement