Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not workspace:FindFirstChild("BindableEvent") then
- local Event = Instance.new("BindableEvent", workspace)
- end
- local function compareVector3(vec1, vec2)
- return (vec1.X > vec2.X) or (vec1.Y > vec2.Y) or (vec1.Z > vec2.Z)
- end
- local function clearAllHints()
- for _, hint in pairs(workspace:GetDescendants()) do
- if hint:IsA("Hint") then
- hint:Destroy()
- end
- end
- end
- local C = true
- local Player = game.Players.LocalPlayer
- local Mouse = Player:GetMouse()
- _G.Enabled = true
- Mouse.KeyDown:Connect(function(key)
- if key == "r" then
- C = false
- end
- if key == "e" then
- _G.Enabled = not _G.Enabled
- end
- end)
- while _G.Enabled do
- wait()
- clearAllHints()
- repeat wait() until game.Players.LocalPlayer.Character
- local you = game.Players.LocalPlayer.Character
- repeat wait() until you:FindFirstChild("HumanoidRootPart")
- local ownhrp = you.HumanoidRootPart
- local players = game.Players:GetPlayers()
- for i, player in pairs(players) do
- if player == game.Players.LocalPlayer then
- table.remove(players, i)
- end
- end
- local random = players[Random.new():NextInteger(1, #players)]
- if not random.Character then
- random.CharacterAdded:Wait()
- elseif not random.Character:FindFirstChild("HumanoidRootPart") then
- repeat
- wait()
- players = game.Players:GetPlayers()
- random = players[Random.new():NextInteger(1, #players)]
- until random.Character:FindFirstChild("HumanoidRootPart")
- end
- local randomhrp = random.Character.HumanoidRootPart
- ownhrp.CFrame = CFrame.new(randomhrp.Position + Vector3.new(2, 0, 2))
- Instance.new("Hint", workspace).Text = ">> " .. random.Name .. " <<"
- C = true
- while C do
- wait()
- if not random or not random.Character or not random.Character:FindFirstChild("HumanoidRootPart") then
- C = false
- end
- while compareVector3(random.Character.HumanoidRootPart.Velocity, Vector3.new(100,100,100)) do
- C = false
- break
- end
- while random.Character:FindFirstChildOfClass("Humanoid").Health <= 0 do
- C = false
- break
- end
- while game.Players.LocalPlayer.Character:FindFirstChildOfClass("Humanoid").Health <= 0 do
- C = true
- repeat wait() until game.Players.LocalPlayer.Character
- you = game.Players.LocalPlayer.Character
- repeat wait() until game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
- ownhrp = game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
- ownhrp.CFrame = CFrame.new(randomhrp.Position + Vector3.new(2, 0, 2))
- break
- end
- while not game.Players[random.Name] do
- C = false
- break
- end
- if C == false then
- workspace.Event:Fire()
- end
- end
- end
- while not _G.Enabled do
- clearAllHints()
- local h = Instance.new("Hint", workspace)
- h.Text = "Disabled"
- wait(1)
- clearAllHints()
- repeat wait(1) until _G.Enabled
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement