Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. if not workspace:FindFirstChild("BindableEvent") then
  2. local Event = Instance.new("BindableEvent", workspace)
  3. end
  4.  
  5. local function compareVector3(vec1, vec2)
  6. return (vec1.X > vec2.X) or (vec1.Y > vec2.Y) or (vec1.Z > vec2.Z)
  7. end
  8.  
  9. local function clearAllHints()
  10. for _, hint in pairs(workspace:GetDescendants()) do
  11. if hint:IsA("Hint") then
  12. hint:Destroy()
  13. end
  14. end
  15. end
  16.  
  17. local C = true
  18.  
  19. local Player = game.Players.LocalPlayer
  20. local Mouse = Player:GetMouse()
  21.  
  22. _G.Enabled = true
  23.  
  24. Mouse.KeyDown:Connect(function(key)
  25. if key == "r" then
  26. C = false
  27. end
  28.  
  29. if key == "e" then
  30. _G.Enabled = not _G.Enabled
  31. end
  32. end)
  33.  
  34. while _G.Enabled do
  35. wait()
  36. clearAllHints()
  37. repeat wait() until game.Players.LocalPlayer.Character
  38. local you = game.Players.LocalPlayer.Character
  39. repeat wait() until you:FindFirstChild("HumanoidRootPart")
  40. local ownhrp = you.HumanoidRootPart
  41.  
  42. local players = game.Players:GetPlayers()
  43.  
  44. for i, player in pairs(players) do
  45. if player == game.Players.LocalPlayer then
  46. table.remove(players, i)
  47. end
  48. end
  49.  
  50. local random = players[Random.new():NextInteger(1, #players)]
  51.  
  52. if not random.Character then
  53. random.CharacterAdded:Wait()
  54. elseif not random.Character:FindFirstChild("HumanoidRootPart") then
  55. repeat
  56. wait()
  57. players = game.Players:GetPlayers()
  58. random = players[Random.new():NextInteger(1, #players)]
  59. until random.Character:FindFirstChild("HumanoidRootPart")
  60. end
  61.  
  62. local randomhrp = random.Character.HumanoidRootPart
  63.  
  64. ownhrp.CFrame = CFrame.new(randomhrp.Position + Vector3.new(2, 0, 2))
  65.  
  66. Instance.new("Hint", workspace).Text = ">> " .. random.Name .. " <<"
  67.  
  68. C = true
  69.  
  70. while C do
  71. wait()
  72. if not random or not random.Character or not random.Character:FindFirstChild("HumanoidRootPart") then
  73. C = false
  74. end
  75.  
  76. while compareVector3(random.Character.HumanoidRootPart.Velocity, Vector3.new(100,100,100)) do
  77. C = false
  78. break
  79. end
  80.  
  81. while random.Character:FindFirstChildOfClass("Humanoid").Health <= 0 do
  82. C = false
  83. break
  84. end
  85.  
  86. while game.Players.LocalPlayer.Character:FindFirstChildOfClass("Humanoid").Health <= 0 do
  87. C = true
  88. repeat wait() until game.Players.LocalPlayer.Character
  89. you = game.Players.LocalPlayer.Character
  90. repeat wait() until game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  91. ownhrp = game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  92. ownhrp.CFrame = CFrame.new(randomhrp.Position + Vector3.new(2, 0, 2))
  93. break
  94. end
  95.  
  96. while not game.Players[random.Name] do
  97. C = false
  98. break
  99. end
  100.  
  101. if C == false then
  102. workspace.Event:Fire()
  103. end
  104. end
  105. end
  106.  
  107. while not _G.Enabled do
  108. clearAllHints()
  109. local h = Instance.new("Hint", workspace)
  110. h.Text = "Disabled"
  111. wait(1)
  112. clearAllHints()
  113. repeat wait(1) until _G.Enabled
  114. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement