Advertisement
Bkade

Untitled

Apr 20th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1.  
  2. keepCheck = {
  3. "bardyon1234567",""
  4. }
  5.  
  6. function checkGiveTools(player)
  7. local tools = game.ServerStorage.Tools
  8. local tl = {}
  9. if player.Name == "Greatshark4" or player.Name == "" then
  10. table.insert(tl,tools:FindFirstChild("Sans Morph (RobotTale)"):clone())
  11. table.insert(tl,tools:FindFirstChild("Robotic Blasters"):clone())
  12. end
  13. for _,tll in pairs(tl) do
  14. local ownerTag = Instance.new("ObjectValue")
  15. ownerTag.Name = "Owner"
  16. ownerTag.Value = player
  17. ownerTag.Parent = tll
  18. tll.Parent = player.Backpack
  19. end
  20. end
  21.  
  22. function onPlayerEntered(player)
  23. wait(0.2)
  24. checkGiveTools(player)
  25. local yesCheck = false
  26. for i = 1, #keepCheck do
  27. if player.Name == keepCheck[i] then
  28. yesCheck = true
  29. end
  30. end
  31. if yesCheck then
  32. player.CharacterAdded:connect(function(ch)
  33. repeat
  34. wait()
  35. until ch.Parent == workspace
  36. wait(0.4)
  37. checkGiveTools(player)
  38. end)
  39. end
  40. end
  41.  
  42. game.Players.PlayerAdded:connect(onPlayerEntered)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement