Advertisement
urabigfatnoob

Untitled

Feb 25th, 2018
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.61 KB | None | 0 0
  1. --key l disconnect first function
  2. --remove future keys
  3.  
  4. plr = game.Players.LocalPlayer
  5. chr = plr.Character or plr.CharacterAdded:wait()
  6. torso = chr.Torso
  7. hrp = chr.HumanoidRootPart
  8. mouse = plr:GetMouse()
  9. teams = game:GetService('Teams')
  10. flying = false
  11. speed = Instance.new("Vector3Value",chr)
  12. camera = workspace.CurrentCamera
  13. speed.Value = Vector3.new(0,.1,0)
  14. w = false
  15. s = false
  16. purge = false
  17. debounce = false
  18.  
  19. function crmps()
  20. while true do
  21. plrs = game.Players;
  22. for _, v in pairs(plrs:GetChildren()) do
  23. if v.TeamColor ~= plrs.LocalPlayer.TeamColor and not v.Character.Head:FindFirstChild("SurfaceGui") then -- ~=
  24. for x = 0,5 do
  25. i = Instance.new("SurfaceGui",v.Character.Head)
  26. i.CanvasSize = Vector2.new(800,600)
  27. i.Adornee = v.Character.Head
  28. i.Face = x
  29. i.Enabled = true
  30. i.Active = true
  31. i.AlwaysOnTop = true
  32. h = Instance.new("Frame",i)
  33. h.Size = UDim2.new(1,0,1,0)
  34. h.AnchorPoint = Vector2.new(0, 0)
  35. h.BackgroundColor3 = Color3.new(0,0,1)
  36. h.BorderSizePixel = 0
  37. h.BackgroundTransparency = .25
  38. end
  39. end
  40. end
  41. wait(10);
  42. end
  43. end
  44. spawn(crmps);
  45.  
  46. function magnet(v)--enemy telelport function
  47. while purge == true do
  48. wait(1);
  49. v.Character.HumanoidRootPart.Transparency = 0
  50. v.Character.HumanoidRootPart.Anchored = true
  51. v.Character.HumanoidRootPart.CFrame = plr.Character.HumanoidRootPart.CFrame*CFrame.new(2,0,0)
  52. end
  53. end
  54.  
  55. torso.Touched:connect(function(p)
  56. if p and p.Parent~=chr and flying and p.CanCollide == true then
  57. p.CanCollide = false
  58. wait(5)
  59. p.CanCollide = true
  60. end
  61. end)
  62.  
  63. function fly ()
  64. bg = Instance.new("BodyGyro",hrp)
  65. bv = Instance.new("BodyVelocity",hrp)
  66. bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  67. bv.Velocity = Vector3.new(0,0,0)
  68. while flying do
  69. game:GetService('RunService').RenderStepped:wait()
  70. bv.Velocity = speed.Value
  71. bg.CFrame = CFrame.new(chr.Torso.Position,mouse.Hit.p) * CFrame.Angles(0,math.rad(-90),0)
  72. end
  73. bv:Destroy()
  74. bg:Destroy()
  75. end
  76.  
  77. mouse.KeyDown:connect(function(key)
  78. if key == 'w' then
  79. w = true
  80. while w == true do
  81. game:GetService('RunService').RenderStepped:wait()
  82. speed.Value = mouse.Hit.lookVector*100
  83. end
  84. elseif key == 'n' and flying then
  85. flying = false
  86. elseif key == 'n' and not flying then
  87. flying = true
  88. spawn(fly)
  89. elseif key == 's' then
  90. s = true
  91. while s == true do
  92. game:GetService('RunService').RenderStepped:wait()
  93. speed.Value = mouse.Hit.lookVector-mouse.Hit.lookVector*100
  94. end
  95. elseif key == 'q' and not purge then
  96. purge = true
  97. for _,v in pairs(game.Players:GetChildren()) do
  98. if v.Name ~= plr.Name and v.Team ~= teams.Americans and v.Team ~= teams.Visitors and v.Team ~= teams.Prisoners and purge == true then
  99. spawn(magnet(v));
  100. end
  101. end
  102. elseif key == 'q' and purge then
  103. purge = false
  104. elseif key == 'e' and mouse.Target~=nil then
  105. local t = mouse.Target
  106. local h = t.Parent:FindFirstChild("Humanoid")
  107. if h then
  108. h.Changed:connect(function()
  109. if h.Health>1 then
  110. camera.CameraSubject = torso
  111. end
  112. end)
  113. camera.CameraSubject = h.Parent.Torso
  114. end
  115. elseif key == 'z' then
  116. camera.CameraSubject = torso
  117. elseif key == 'r' and mouse.Target ~= nil then
  118. mouse.Target:Destroy()
  119. end
  120. end)
  121.  
  122. mouse.KeyUp:connect(function(key)
  123. if key == 'w' or key == 's' then
  124. w = false
  125. s = false
  126. wait()
  127. speed.Value = Vector3.new(0,.1,0)
  128. end
  129. end)
  130. --fin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement