Advertisement
Osemual

Untitled

Feb 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. local player = game:GetService("Players").LocalPlayer
  2. local character = player.Character
  3.  
  4. local shield = Instance.new("Part")
  5. shield.CanCollide = false
  6. shield.Material = "Neon"
  7. shield.Transparency = 0.5
  8. shield.Size = Vector3.new(10, 10, 10)
  9. shield.Name = "Shield"
  10. shield.Parent = character
  11.  
  12. local speed = 50
  13. game:GetService("RunService").RenderStepped:connect(function()
  14. shield.CFrame = character.Torso.CFrame*CFrame.Angles(math.rad((tick()*speed)%360), math.rad((tick()*speed)%360), math.rad((tick()*speed)%360))
  15. end)
  16.  
  17. function onKeyPress(inputObject, gameProcessedEvent)
  18. if inputObject.KeyCode == Enum.KeyCode.Q then
  19. local character = player.Character
  20.  
  21. local part = Instance.new("Part")
  22. part.Size = Vector3.new(6, 6, 6)
  23. part.Material = "Neon"
  24. part.Transparency = 0.5
  25. part.Parent = workspace
  26. part.CanCollide = false
  27.  
  28. part.Touched:connect(function(obj)
  29. if obj.Parent.Name == player.Name then
  30. --Do nothing
  31. else
  32. local humanoid = obj.Parent:FindFirstChild("Humanoid")
  33. if humanoid then
  34. humanoid.Health = 0
  35. end
  36. end
  37. end)
  38.  
  39. local range = 0
  40. local trans = 5
  41. game:GetService("RunService").RenderStepped:connect(function()
  42. if range < 100 then
  43. range = range + 3
  44. else
  45. part:remove()
  46. end
  47. part.Size = Vector3.new(6, 6, range)
  48. part.CFrame = character.Torso.CFrame * CFrame.new(0, 0, -5 -part.Size.Z/2)
  49. wait()
  50. end)
  51. end
  52. end
  53.  
  54. game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement