Advertisement
xaviersvt

Untitled

Aug 21st, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer
  2. local Mouse = plr:GetMouse()
  3. local UIS = game:GetService("UserInputService")
  4. local Remote = game:GetService("ReplicatedStorage"):WaitForChild("ScrapEvent")
  5.  
  6. while wait() do
  7.     for i,v in pairs(game.Workspace.WorkspaceFolder:GetChildren()) do
  8.         v:WaitForChild("SelectionBox").Visible = false
  9.         if Mouse.Target == v then
  10.             v:WaitForChild("SelectionBox").Visible = true
  11.             Mouse.KeyDown:Connect(function(Key,GPE)
  12.                 if not GPE then
  13.                     if Key == "e" then
  14.                         Remote.Collect:FireServer(v)
  15.                         end
  16.                 end
  17.             end)
  18.         end
  19.     end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement