cr8brooo

Untitled

Dec 13th, 2017
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. local Me = game.Players.LocalPlayer
  2. Attkin = false
  3.  
  4. if script.Parent.className ~= "HopperBin" then
  5. local h = Instance.new("HopperBin", Me.Backpack)
  6. h.Name = "Fire/Shadow"
  7. script.Parent = h
  8. end
  9.  
  10. local bin = script.Parent
  11. me2 = Me.Character
  12.  
  13. function RC(Pos, Dir, Max, Ignore)
  14. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999)), Ignore)
  15. end
  16.  
  17. function RayC(Start, En, MaxDist, Ignore)
  18. return RC(Start, (En - Start), MaxDist, Ignore)
  19. end
  20.  
  21. function onSelected(mouse)
  22. mouse.Button1Down:connect(function()
  23. shot = Instance.new("Part")
  24. shot.Parent = me2
  25. shot.CanCollide = false
  26. shot.Anchored = true
  27. shot.Size = Vector3.new(2, 2, 2)
  28. shot.Transparency = 0.5
  29. shot.BrickColor = BrickColor.new("Black")
  30. local mesh = Instance.new("SpecialMesh")
  31. mesh.Parent = shot
  32. mesh.MeshType = "Sphere"
  33. local start = CFrame.new(me2.Torso.Position) + Vector3.new(0, 3, 0)
  34. local ending = mouse.Hit.p
  35. local face = CFrame.new(start.p, ending)
  36. shot.CFrame = face
  37. local magn = (start.p - ending).magnitude
  38. local lastP = start.p
  39. for i = 4, 300, 8 do
  40. face = face * CFrame.new(0, 0, -8)
  41. shot.CFrame = face
  42. local mag = (lastP - face.p).magnitude
  43. local t = Instance.new("Part",me2)
  44. t.Anchored = true
  45. t.BrickColor = BrickColor.new("Really black")
  46. t.formFactor = "Custom"
  47. t.Size = Vector3.new(1, 1, 1)
  48. local mm = Instance.new("BlockMesh",t)
  49. mm.Scale = Vector3.new(1, 1, mag)
  50. t.CFrame = CFrame.new(lastP, face.p) * CFrame.new(0, 0, -mag/2)
  51. coroutine.resume(coroutine.create(function()
  52. wait(0.05)
  53. for i = 0, 1, 0.1 do
  54. t.Transparency = i
  55. mm.Scale = Vector3.new(0.4-0.4*i, 0.4-0.4*i, mag)
  56. wait()
  57. end
  58. t:remove()
  59. end))
  60. local hit, pos = RayC(lastP, face.p, 14, me2)
  61. if hit then
  62. local h = hit.Parent:findFirstChild("Humanoid")
  63. if h then
  64. h.Health = h.Health - math.random(15, 35)
  65. end
  66. shot:remove()
  67. break
  68. end
  69. lastP = face.p
  70. wait()
  71. end
  72. shot:remove()
  73. end)
  74. mouse.KeyDown:connect(function(key)
  75. if key == "f" then
  76. shot = Instance.new("Part")
  77. shot.Parent = me2
  78. shot.CanCollide = false
  79. shot.Anchored = true
  80. shot.Size = Vector3.new(2, 2, 2)
  81. shot.Transparency = 0.5
  82. shot.BrickColor = BrickColor.new("Bright red")
  83. local fire = Instance.new("Fire")
  84. fire.Parent = shot
  85. local mesh = Instance.new("SpecialMesh")
  86. mesh.Parent = shot
  87. mesh.MeshType = "Sphere"
  88. local start = CFrame.new(me2.Torso.Position) + Vector3.new(0, 3, 0)
  89. local ending = mouse.Hit.p
  90. local face = CFrame.new(start.p, ending)
  91. shot.CFrame = face
  92. local magn = (start.p - ending).magnitude
  93. local lastP = start.p
  94. for i = 4, 300, 8 do
  95. face = face * CFrame.new(0, 0, -8)
  96. shot.CFrame = face
  97. local mag = (lastP - face.p).magnitude
  98. local t = Instance.new("Part",me2)
  99. t.Anchored = true
  100. t.BrickColor = BrickColor.new("Really red")
  101. t.formFactor = "Custom"
  102. t.Size = Vector3.new(1, 1, 1)
  103. local mm = Instance.new("BlockMesh",t)
  104. mm.Scale = Vector3.new(1, 1, mag)
  105. t.CFrame = CFrame.new(lastP, face.p) * CFrame.new(0, 0, -mag/2)
  106. coroutine.resume(coroutine.create(function()
  107. wait(0.05)
  108. for i = 0, 1, 0.1 do
  109. t.Transparency = i
  110. mm.Scale = Vector3.new(0.4-0.4*i, 0.4-0.4*i, mag)
  111. wait()
  112. end
  113. t:remove()
  114. end))
  115. local hit, pos = RayC(lastP, face.p, 14, me2)
  116. if hit then
  117. local h = hit.Parent:findFirstChild("Humanoid")
  118. if h then
  119. h.Health = h.Health - math.random(15, 35)
  120. end
  121. shot:remove()
  122. break
  123. end
  124. lastP = face.p
  125. wait()
  126. end
  127. shot:remove()
  128. end
  129. end)
  130. end
  131.  
  132. function onDesel(mouse)
  133. end
  134.  
  135. bin.Selected:connect(onSelected)
  136. bin.Deselected:connect(onDesel)
Add Comment
Please, Sign In to add comment