Advertisement
Guest User

Treasure hunt simulator script

a guest
Feb 13th, 2018
22,584
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. local minval = 750
  2. local shovel = "Large Shovel"
  3.  
  4. function check()
  5. for i,v in pairs(game.Players.LocalPlayer:GetChildren()) do
  6. if v:IsA('Tool') then
  7. v.Parent = v.Character
  8. end
  9. end
  10. end
  11. check()
  12. local children = game.Workspace.SandBlocks:GetChildren()
  13. for i =1, #children do
  14. if children[i] ~= nil then
  15. if children[i]:findFirstChild("Reward") then
  16. if children[i].Reward.Value >= minval then
  17. children[i].CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  18. children[i].CanCollide = false
  19. print(children[i].Name)
  20. wait(.3)
  21. game.Players.LocalPlayer.Character[shovel].RemoteClick:FireServer(workspace.SandBlocks[children[i].Name])
  22.  
  23. end
  24. end
  25. end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement