Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait(0.01)
- local player = game.Players.LocalPlayer
- local pos = script.Parent.Position
- local mouse = player:GetMouse()
- script.Parent.ClickDetector.MouseHoverEnter:connect(function(player)
- if player:DistanceFromCharacter(pos) < 15 then
- player.PlayerGui.Interaction.Int.InteractInfo.Visible = true
- player.PlayerGui.Interaction.Int.hover:Play()
- end
- end)
- script.Parent.ClickDetector.MouseHoverLeave:connect(function(player)
- local pos = script.Parent.Position
- local player = game.Players.LocalPlayer
- player.PlayerGui.Interaction.Int.InteractInfo.Visible = false
- end)
- mouse.KeyDown:connect(function(key)
- if key:lower() == "e" and player:DistanceFromCharacter(pos) < 15 then
- script.Parent:Destroy()
- player.PlayerGui.Interaction.Int.InteractInfo.Visible = false
- player.PlayerGui.Interaction.Int.pick:Play()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement