Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --key l disconnect first function
- --remove future keys
- plr = game.Players.LocalPlayer
- chr = plr.Character or plr.CharacterAdded:wait()
- torso = chr.Torso
- hrp = chr.HumanoidRootPart
- mouse = plr:GetMouse()
- teams = game:GetService('Teams')
- flying = false
- speed = Instance.new("Vector3Value",chr)
- camera = workspace.CurrentCamera
- speed.Value = Vector3.new(0,.1,0)
- w = false
- s = false
- purge = false
- debounce = false
- function crmps()
- while true do
- plrs = game.Players;
- for _, v in pairs(plrs:GetChildren()) do
- if v.TeamColor ~= plrs.LocalPlayer.TeamColor and not v.Character.Head:FindFirstChild("SurfaceGui") then -- ~=
- for x = 0,5 do
- i = Instance.new("SurfaceGui",v.Character.Head)
- i.CanvasSize = Vector2.new(800,600)
- i.Adornee = v.Character.Head
- i.Face = x
- i.Enabled = true
- i.Active = true
- i.AlwaysOnTop = true
- h = Instance.new("Frame",i)
- h.Size = UDim2.new(1,0,1,0)
- h.AnchorPoint = Vector2.new(0, 0)
- h.BackgroundColor3 = Color3.new(0,0,1)
- h.BorderSizePixel = 0
- h.BackgroundTransparency = .25
- end
- end
- end
- wait(10);
- end
- end
- spawn(crmps);
- function magnet(v)--enemy telelport function
- while purge == true do
- wait(1);
- v.Character.HumanoidRootPart.Transparency = 0
- v.Character.HumanoidRootPart.Anchored = true
- v.Character.HumanoidRootPart.CFrame = plr.Character.HumanoidRootPart.CFrame*CFrame.new(2,0,0)
- end
- end
- torso.Touched:connect(function(p)
- if p and p.Parent~=chr and flying and p.CanCollide == true then
- p.CanCollide = false
- wait(5)
- p.CanCollide = true
- end
- end)
- function fly ()
- bg = Instance.new("BodyGyro",hrp)
- bv = Instance.new("BodyVelocity",hrp)
- bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bv.Velocity = Vector3.new(0,0,0)
- while flying do
- game:GetService('RunService').RenderStepped:wait()
- bv.Velocity = speed.Value
- bg.CFrame = CFrame.new(chr.Torso.Position,mouse.Hit.p) * CFrame.Angles(0,math.rad(-90),0)
- end
- bv:Destroy()
- bg:Destroy()
- end
- mouse.KeyDown:connect(function(key)
- if key == 'w' then
- w = true
- while w == true do
- game:GetService('RunService').RenderStepped:wait()
- speed.Value = mouse.Hit.lookVector*100
- end
- elseif key == 'n' and flying then
- flying = false
- elseif key == 'n' and not flying then
- flying = true
- spawn(fly)
- elseif key == 's' then
- s = true
- while s == true do
- game:GetService('RunService').RenderStepped:wait()
- speed.Value = mouse.Hit.lookVector-mouse.Hit.lookVector*100
- end
- elseif key == 'q' and not purge then
- purge = true
- for _,v in pairs(game.Players:GetChildren()) do
- if v.Name ~= plr.Name and v.Team ~= teams.Americans and v.Team ~= teams.Visitors and v.Team ~= teams.Prisoners and purge == true then
- spawn(magnet(v));
- end
- end
- elseif key == 'q' and purge then
- purge = false
- elseif key == 'e' and mouse.Target~=nil then
- local t = mouse.Target
- local h = t.Parent:FindFirstChild("Humanoid")
- if h then
- h.Changed:connect(function()
- if h.Health>1 then
- camera.CameraSubject = torso
- end
- end)
- camera.CameraSubject = h.Parent.Torso
- end
- elseif key == 'z' then
- camera.CameraSubject = torso
- elseif key == 'r' and mouse.Target ~= nil then
- mouse.Target:Destroy()
- end
- end)
- mouse.KeyUp:connect(function(key)
- if key == 'w' or key == 's' then
- w = false
- s = false
- wait()
- speed.Value = Vector3.new(0,.1,0)
- end
- end)
- --fin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement