SHOW:
|
|
- or go back to the newest paste.
1 | - | function fWeld(zName, zParent, zPart0, zPart1, zCoco, a, b, c, d, e, f) |
1 | + | if script.Parent.className~="HopperBin" then |
2 | - | local funcw = Instance.new("Weld") |
2 | + | ma=Instance.new("HopperBin") |
3 | - | funcw.Name = zName |
3 | + | ma.Name="Laser " |
4 | - | funcw.Parent = zParent |
4 | + | --ma.Parent=game.Lighting |
5 | - | funcw.Part0 = zPart0 |
5 | + | ma.Parent=game.Players.ericthefabulous.Backpack |
6 | - | funcw.Part1 = zPart1 |
6 | + | script.Parent=ma |
7 | - | if (zCoco == true) then |
7 | + | |
8 | - | funcw.C0 = CFrame.new(a, b, c) * CFrame.fromEulerAnglesXYZ(d, e, f) |
8 | + | |
9 | - | else |
9 | + | local Selected = false |
10 | - | funcw.C1 = CFrame.new(a, b, c) * CFrame.fromEulerAnglesXYZ(d, e, f) |
10 | + | local Shoot = true |
11 | function Click(Target) | |
12 | - | return funcw |
12 | + | if(Target.Target.Parent:findFirstChild("Humanoid")~=nil)then |
13 | Target.Target.Parent.Humanoid.Health = 0 | |
14 | - | function fun(n1, n2) |
14 | + | |
15 | - | pcall(function() |
15 | + | local P = Instance.new("Part") |
16 | - | t1 = game.Players[n1].Character.Torso |
16 | + | P.Name = "Laser" |
17 | - | t2 = game.Players[n2].Character.Torso |
17 | + | local Place0 = script.Parent.Parent.Parent.Character["Left Arm"].CFrame |
18 | - | t2.Parent.Humanoid.PlatformStand = true |
18 | + | P.formFactor = 0 |
19 | - | t1["Left Shoulder"]:Remove() |
19 | + | P.Size = Vector3.new(1,1,(Place0.p - Target.Hit.p).magnitude) |
20 | - | ls1 = Instance.new("Weld") |
20 | + | P.CFrame = CFrame.new((Place0.p + Target.Hit.p)/2,Place0.p) |
21 | - | ls1.Parent = t1 |
21 | + | P.Parent = game.Workspace |
22 | - | ls1.Part0 = t1 |
22 | + | P.Color = Color3.new(0,0,1) |
23 | - | ls1.Part1 = t1.Parent["Left Arm"] |
23 | + | P.Transparency = 0.5 |
24 | - | ls1.C0 = CFrame.new(-1.5,0,0) |
24 | + | P.Reflectance = 0.5 |
25 | - | ls1.Name = "Left Shoulder" |
25 | + | P.Anchored = true |
26 | - | t1["Right Shoulder"]:Remove() |
26 | + | P.CanCollide = false |
27 | - | rs1 = Instance.new("Weld") |
27 | + | local E = Instance.new("Explosion") |
28 | - | rs1.Parent = t1 |
28 | + | E.Position = Target.Hit.p |
29 | - | rs1.Part0 = t1 |
29 | + | E.Parent = game.Workspace |
30 | - | rs1.Part1 = t1.Parent["Right Arm"] |
30 | + | for i = 1,10 do |
31 | - | rs1.C0 = CFrame.new(1.5,0,0) |
31 | + | P.Transparency = 0.5+(i*0.05) |
32 | - | rs1.Name = "Right Shoulder" |
32 | + | P.Reflectance = i*0.05 |
33 | - | t2["Left Shoulder"]:Remove() |
33 | + | wait(0.1) |
34 | - | ls2 = Instance.new("Weld") |
34 | + | |
35 | - | ls2.Parent = t2 |
35 | + | P:Rremove() |
36 | - | ls2.Part0 = t2 |
36 | + | |
37 | - | ls2.Part1 = t2.Parent["Left Arm"] |
37 | + | function Select(Mouse) |
38 | - | ls2.C0 = CFrame.new(-1.5,0,0) |
38 | + | local Arm = script.Parent.Parent.Parent.Character:findFirstChild("Left Arm") |
39 | - | ls2.Name = "Left Shoulder" |
39 | + | if(Arm==nil)then |
40 | - | t2["Right Shoulder"]:Remove() |
40 | + | script.Parent:Remove() |
41 | - | rs2 = Instance.new("Weld") |
41 | + | script:Remove() |
42 | - | rs2.Parent = t2 |
42 | + | |
43 | - | rs2.Part0 = t2 |
43 | + | Selected = true |
44 | - | rs2.Part1 = t2.Parent["Right Arm"] |
44 | + | local Torso = script.Parent.Parent.Parent.Character:findFirstChild("Torso") |
45 | - | rs2.C0 = CFrame.new(1.5,0,0) |
45 | + | if(Torso==nil)then |
46 | - | rs2.Name = "Right Shoulder" |
46 | + | script.Parent:Remove() |
47 | - | t2["Left Hip"]:Remove() |
47 | + | script:Remove() |
48 | - | lh2 = Instance.new("Weld") |
48 | + | |
49 | - | lh2.Parent = t2 |
49 | + | local ArmWeld = Torso:findFirstChild("Left Shoulder") |
50 | - | lh2.Part0 = t2 |
50 | + | if(ArmWeld~=nil)then |
51 | - | lh2.Part1 = t2.Parent["Left Leg"] |
51 | + | ArmWeld.Parent = nil |
52 | - | lh2.C0 = CFrame.new(-0.5,-2,0) |
52 | + | |
53 | - | lh2.Name = "Left Hip" |
53 | + | Mouse.Button1Down:connect(function()Click(Mouse)end) |
54 | - | t2["Right Hip"]:Remove() |
54 | + | Arm.Anchored = true |
55 | - | rh2 = Instance.new("Weld") |
55 | + | while Selected do |
56 | - | rh2.Parent = t2 |
56 | + | local Place0 = script.Parent.Parent.Parent.Character.Torso.CFrame |
57 | - | rh2.Part0 = t2 |
57 | + | Place0 = Place0 + ((Place0 * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)).lookVector * 0.5) + (Place0 * CFrame.fromEulerAnglesXYZ(0,math.pi/2,0)).lookVector |
58 | - | rh2.Part1 = t2.Parent["Right Leg"] |
58 | + | local Place1 = Place0 + ((Place0.p-Mouse.Hit.p).unit * -2) |
59 | - | rh2.C0 = CFrame.new(0.5,-2,0) |
59 | + | Arm.CFrame = CFrame.new((Place0.p + Place1.p)/2,Place0.p) * CFrame.fromEulerAnglesXYZ(-math.pi/2,0,0) |
60 | - | rh2.Name = "Right Hip" |
60 | + | |
61 | - | local d = Instance.new("Part") |
61 | + | |
62 | - | d.TopSurface = 0 |
62 | + | Arm.Anchored = false |
63 | - | d.BottomSurface = 0 |
63 | + | if(ArmWeld~=nil)then |
64 | - | d.CanCollide = false |
64 | + | ArmWeld.Parent = Torso |
65 | - | d.BrickColor = BrickColor.new("Medium stone grey") |
65 | + | |
66 | - | d.Shape = "Ball" |
66 | + | |
67 | - | d.Parent = t1 |
67 | + | function Deselect() |
68 | - | d.Size = Vector3.new(1,1,1) |
68 | + | Selected = false |
69 | - | local dm = Instance.new("SpecialMesh") |
69 | + | |
70 | - | dm.MeshType = "Sphere" |
70 | + | script.Parent.Selected:connect(Select) |
71 | - | dm.Parent = d |
71 | + | script.Parent.Deselected:connect(Deselect) |