Advertisement
Upscalefanatic3

Dead Mist 2 GUI

Feb 11th, 2018
3,660
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1.  
  2.  
  3. local player=game:GetService'Players'.LocalPlayer
  4.  
  5. local function createTorsoRayCast(RandomPos)
  6.  
  7. if RandomPos == nil then
  8.  
  9. local hit, position = workspace:FindPartOnRayWithIgnoreList(Ray.new(player.Character.HumanoidRootPart.Position + player.Character.HumanoidRootPart.CFrame.lookVector * 4, Vector3.new(0, -999, 0)), {}, true)
  10.  
  11. if hit then
  12.  
  13. return position
  14.  
  15. else
  16.  
  17. return nil
  18.  
  19. end
  20.  
  21. else
  22.  
  23. local hit, position = workspace:FindPartOnRayWithIgnoreList(Ray.new(player.Character.HumanoidRootPart.Position + Vector3.new(math.random(-3, 3), 0, math.random(-3, 3)), Vector3.new(0, -999, 0)), {}, true)
  24.  
  25. if hit then
  26.  
  27. return position
  28.  
  29. else
  30.  
  31. return nil
  32.  
  33. end
  34.  
  35. end
  36.  
  37. end
  38. game.ReplicatedStorage.DropItem:FireServer({'Item Name','Pristine'}, createTorsoRayCast(),workspace.conf.Value)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement