Advertisement
gokusteve

Untitled

Jun 14th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1.  
  2. 1.if script.Parent.className~="HopperBin" then
  3.  
  4.  
  5. 2.ma=Instance.new("HopperBin")
  6.  
  7.  
  8. 3.ma.Name="Laser "
  9.  
  10.  
  11. 4.--ma.Parent=game.Lighting
  12.  
  13.  
  14. 5.ma.Parent=game.Players.gokusteve.Backpack
  15.  
  16.  
  17. 6.script.Parent=ma
  18.  
  19.  
  20. 7.end
  21.  
  22.  
  23. 8.
  24.  
  25.  
  26. 9.local Selected = false
  27.  
  28.  
  29. 10.local Shoot = true
  30.  
  31.  
  32. 11.function Click(Target)
  33.  
  34.  
  35. 12.if(Target.Target.Parent:findFirstChild("Humanoid")~=nil)then
  36.  
  37.  
  38. 13.Target.Target.Parent.Humanoid.Health = 0
  39.  
  40.  
  41. 14.end
  42.  
  43.  
  44. 15.local P = Instance.new("Part")
  45.  
  46.  
  47. 16.P.Name = "Laser"
  48.  
  49.  
  50. 17.local Place0 = script.Parent.Parent.Parent.Character["Left Arm"].CFrame
  51.  
  52.  
  53. 18.P.formFactor = 0
  54.  
  55.  
  56. 19.P.Size = Vector3.new(1,1,(Place0.p - Target.Hit.p).magnitude)
  57.  
  58.  
  59. 20.P.CFrame = CFrame.new((Place0.p + Target.Hit.p)/2,Place0.p)
  60.  
  61.  
  62. 21.P.Parent = game.Workspace
  63.  
  64.  
  65. 22.P.Color = Color3.new(0,0,1)
  66.  
  67.  
  68. 23.P.Transparency = 0.5
  69.  
  70.  
  71. 24.P.Reflectance = 0.5
  72.  
  73.  
  74. 25.P.Anchored = true
  75.  
  76.  
  77. 26.P.CanCollide = false
  78.  
  79.  
  80. 27.local E = Instance.new("Explosion")
  81.  
  82.  
  83. 28.E.Position = Target.Hit.p
  84.  
  85.  
  86. 29.E.Parent = game.Workspace
  87.  
  88.  
  89. 30.for i = 1,10 do
  90.  
  91.  
  92. 31.P.Transparency = 0.5+(i*0.05)
  93.  
  94.  
  95. 32.P.Reflectance = i*0.05
  96.  
  97.  
  98. 33.wait(0.1)
  99.  
  100.  
  101. 34.end
  102.  
  103.  
  104. 35.P:Rremove()
  105.  
  106.  
  107. 36.end
  108.  
  109.  
  110. 37.function Select(Mouse)
  111.  
  112.  
  113. 38.local Arm = script.Parent.Parent.Parent.Character:findFirstChild("Left Arm")
  114.  
  115.  
  116. 39.if(Arm==nil)then
  117.  
  118.  
  119. 40.script.Parent:Remove()
  120.  
  121.  
  122. 41.script:Remove()
  123.  
  124.  
  125. 42.end
  126.  
  127.  
  128. 43.Selected = true
  129.  
  130.  
  131. 44.local Torso = script.Parent.Parent.Parent.Character:findFirstChild("Torso")
  132.  
  133.  
  134. 45.if(Torso==nil)then
  135.  
  136.  
  137. 46.script.Parent:Remove()
  138.  
  139.  
  140. 47.script:Remove()
  141.  
  142.  
  143. 48.end
  144.  
  145.  
  146. 49.local ArmWeld = Torso:findFirstChild("Left Shoulder")
  147.  
  148.  
  149. 50.if(ArmWeld~=nil)then
  150.  
  151.  
  152. 51.ArmWeld.Parent = nil
  153.  
  154.  
  155. 52.end
  156.  
  157.  
  158. 53.Mouse.Button1Down:connect(function()Click(Mouse)end)
  159.  
  160.  
  161. 54.Arm.Anchored = true
  162.  
  163.  
  164. 55.while Selected do
  165.  
  166.  
  167. 56.local Place0 = script.Parent.Parent.Parent.Character.Torso.CFrame
  168.  
  169.  
  170. 57.Place0 = Place0 + ((Place0 * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)).lookVector * 0.5) + (Place0 * CFrame.fromEulerAnglesXYZ(0,math.pi/2,0)).lookVector
  171.  
  172.  
  173. 58.local Place1 = Place0 + ((Place0.p-Mouse.Hit.p).unit * -2)
  174.  
  175.  
  176. 59.Arm.CFrame = CFrame.new((Place0.p + Place1.p)/2,Place0.p) * CFrame.fromEulerAnglesXYZ(-math.pi/2,0,0)
  177.  
  178.  
  179. 60.wait()
  180.  
  181.  
  182. 61.end
  183.  
  184.  
  185. 62.Arm.Anchored = false
  186.  
  187.  
  188. 63.if(ArmWeld~=nil)then
  189.  
  190.  
  191. 64.ArmWeld.Parent = Torso
  192.  
  193.  
  194. 65.end
  195.  
  196.  
  197. 66.end
  198.  
  199.  
  200. 67.function Deselect()
  201.  
  202.  
  203. 68.Selected = false
  204.  
  205.  
  206. 69.end
  207.  
  208.  
  209. 70.script.Parent.Selected:connect(Select)
  210.  
  211.  
  212. 71.script.Parent.Deselected:connect(Deselect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement