Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- Weld2 = Instance.new("Weld")
- Weld3 = Instance.new("Weld")
- Weld4 = Instance.new("Weld")
- Weld5 = Instance.new("Weld")
- Weld6 = Instance.new("Weld")
- Weld7 = Instance.new("Weld")
- Weld8 = Instance.new("Weld")
- Weld9 = Instance.new("Weld")
- Weld10 = Instance.new("Weld")
- Weld11 = Instance.new("Weld")
- Weld12 = Instance.new("Weld")
- Part13 = Instance.new("Part")
- SpecialMesh14 = Instance.new("SpecialMesh")
- Part15 = Instance.new("Part")
- SpecialMesh16 = Instance.new("SpecialMesh")
- Part17 = Instance.new("Part")
- SpecialMesh18 = Instance.new("SpecialMesh")
- Part19 = Instance.new("Part")
- SpecialMesh20 = Instance.new("SpecialMesh")
- Part21 = Instance.new("Part")
- SpecialMesh22 = Instance.new("SpecialMesh")
- Part23 = Instance.new("Part")
- SpecialMesh24 = Instance.new("SpecialMesh")
- Part25 = Instance.new("Part")
- SpecialMesh26 = Instance.new("SpecialMesh")
- Part27 = Instance.new("Part")
- SpecialMesh28 = Instance.new("SpecialMesh")
- Part29 = Instance.new("Part")
- SpecialMesh30 = Instance.new("SpecialMesh")
- Part31 = Instance.new("Part")
- SpecialMesh32 = Instance.new("SpecialMesh")
- Part33 = Instance.new("Part")
- SpecialMesh34 = Instance.new("SpecialMesh")
- Script35 = Instance.new("Script")
- LocalScript36 = Instance.new("LocalScript")
- Script37 = Instance.new("Script")
- Tool0.Name = "Medigun"
- Tool0.Parent = mas
- Tool0.GripPos = Vector3.new(0, -0.5, -0.5)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.BrickColor = BrickColor.new("Bright red")
- Part1.Rotation = Vector3.new(0.049999997, 0, 0)
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.Size = Vector3.new(1, 1, 1)
- Part1.CFrame = CFrame.new(-19, 2.00478721, 3.00000024, 1, 0, 0, 0, 0.999999702, -0.000796274282, 0, 0.000796274282, 0.999999702)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Color = Color3.new(0.768628, 0.156863, 0.109804)
- Part1.Position = Vector3.new(-19, 2.00478721, 3.00000024)
- Part1.Orientation = Vector3.new(0.049999997, 0, 0)
- Part1.Color = Color3.new(0.768628, 0.156863, 0.109804)
- Weld2.Parent = Part1
- Weld2.C0 = CFrame.new(0, 0, 0, 0.000796274282, -0.999999702, 0, 0.999999702, 0.000796274282, 0, 0, 0, 1)
- Weld2.Part0 = Part1
- Weld2.Part1 = Part13
- Weld3.Parent = Part1
- Weld3.C0 = CFrame.new(0, 0, 0, 0.000796274282, -0.999999702, 0, 0.999999702, 0.000796274282, 0, 0, 0, 1)
- Weld3.Part0 = Part1
- Weld3.Part1 = Part15
- Weld4.Parent = Part1
- Weld4.C0 = CFrame.new(0.75, 0.5, 0.5, 1, 0, 0, 0, 0.696706712, -0.717356086, 0, 0.717356086, 0.696706712)
- Weld4.Part0 = Part1
- Weld4.Part1 = Part17
- Weld5.Parent = Part1
- Weld5.C0 = CFrame.new(-0.75, 0.5, 0.5, 1, 0, 0, 0, 0.696706712, -0.717356086, 0, 0.717356086, 0.696706712)
- Weld5.Part0 = Part1
- Weld5.Part1 = Part19
- Weld6.Parent = Part1
- Weld6.C0 = CFrame.new(0, 0.949999988, 0.949999988, 0.000796274282, -0.999999702, 0, 0.999999702, 0.000796274282, 0, 0, 0, 1)
- Weld6.Part0 = Part1
- Weld6.Part1 = Part21
- Weld7.Parent = Part1
- Weld7.C0 = CFrame.new(0, 0, -0.600000024, 1, 0, 0, 0, 0.000796274282, -0.999999702, 0, 0.999999702, 0.000796274282)
- Weld7.Part0 = Part1
- Weld7.Part1 = Part23
- Weld8.Parent = Part1
- Weld8.C0 = CFrame.new(0, 0, -2, 1, 0, 0, 0, 0.000796274282, -0.999999702, 0, 0.999999702, 0.000796274282)
- Weld8.Part0 = Part1
- Weld8.Part1 = Part27
- Weld9.Parent = Part1
- Weld9.C0 = CFrame.new(0, -0.75, -0.449999988, 1, 0, 0, 0, 0.921060979, 0.389418334, 0, -0.389418334, 0.921060979)
- Weld9.Part0 = Part1
- Weld9.Part1 = Part29
- Weld10.Parent = Part1
- Weld10.C0 = CFrame.new(0, -1.35000002, -0.300000012, 1, 0, 0, 0, 0.921060979, 0.389418334, 0, -0.389418334, 0.921060979)
- Weld10.Part0 = Part1
- Weld10.Part1 = Part31
- Weld11.Parent = Part1
- Weld11.C0 = CFrame.new(0, 0, 0.5, 1, 0, 0, 0, 0.000796274282, -0.999999702, 0, 0.999999702, 0.000796274282)
- Weld11.Part0 = Part1
- Weld11.Part1 = Part33
- Weld12.Parent = Part1
- Weld12.C0 = CFrame.new(0, 0, -1.5, 1, 0, 0, 0, 0.000796274282, -0.999999702, 0, 0.999999702, 0.000796274282)
- Weld12.Part0 = Part1
- Weld12.Part1 = Part25
- Part13.Name = "H1"
- Part13.Parent = Tool0
- Part13.BrickColor = BrickColor.new("Dark stone grey")
- Part13.Rotation = Vector3.new(0.049999997, 0, 89.9499969)
- Part13.CanCollide = false
- Part13.FormFactor = Enum.FormFactor.Symmetric
- Part13.Size = Vector3.new(1, 1, 1)
- Part13.CFrame = CFrame.new(-19, 2.00478721, 3.00000024, 0.000796274282, -0.999999702, 0, 0.999999404, 0.000796274049, -0.000796274282, 0.000796274049, 6.34052753e-07, 0.999999702)
- Part13.BottomSurface = Enum.SurfaceType.Smooth
- Part13.TopSurface = Enum.SurfaceType.Smooth
- Part13.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part13.Position = Vector3.new(-19, 2.00478721, 3.00000024)
- Part13.Orientation = Vector3.new(0.049999997, 0, 89.9499969)
- Part13.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh14.Parent = Part13
- SpecialMesh14.Scale = Vector3.new(0.75, 1.25, 0.75)
- SpecialMesh14.Scale = Vector3.new(0.75, 1.25, 0.75)
- Part15.Name = "H2"
- Part15.Parent = Tool0
- Part15.BrickColor = BrickColor.new("Dark stone grey")
- Part15.Rotation = Vector3.new(0.049999997, 0, 89.9499969)
- Part15.CanCollide = false
- Part15.FormFactor = Enum.FormFactor.Symmetric
- Part15.Size = Vector3.new(1, 1, 1)
- Part15.CFrame = CFrame.new(-19, 2.00478721, 3.00000024, 0.000796274282, -0.999999702, 0, 0.999999404, 0.000796274049, -0.000796274282, 0.000796274049, 6.34052753e-07, 0.999999702)
- Part15.BottomSurface = Enum.SurfaceType.Smooth
- Part15.TopSurface = Enum.SurfaceType.Smooth
- Part15.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part15.Position = Vector3.new(-19, 2.00478721, 3.00000024)
- Part15.Orientation = Vector3.new(0.049999997, 0, 89.9499969)
- Part15.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh16.Parent = Part15
- SpecialMesh16.Scale = Vector3.new(0.349999994, 1.75, 0.349999994)
- SpecialMesh16.Scale = Vector3.new(0.349999994, 1.75, 0.349999994)
- Part17.Name = "H3"
- Part17.Parent = Tool0
- Part17.BrickColor = BrickColor.new("Dark stone grey")
- Part17.Rotation = Vector3.new(45.8799973, 0, 0)
- Part17.CanCollide = false
- Part17.FormFactor = Enum.FormFactor.Symmetric
- Part17.Size = Vector3.new(1, 1, 1)
- Part17.CFrame = CFrame.new(-18.25, 2.50438881, 3.50039816, 1, 0, 0, 0, 0.696135342, -0.717910588, 0, 0.717910588, 0.696135342)
- Part17.BottomSurface = Enum.SurfaceType.Smooth
- Part17.TopSurface = Enum.SurfaceType.Smooth
- Part17.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part17.Position = Vector3.new(-18.25, 2.50438881, 3.50039816)
- Part17.Orientation = Vector3.new(45.8799973, 0, 0)
- Part17.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh18.Parent = Part17
- SpecialMesh18.Scale = Vector3.new(0.25, 1.5, 0.25)
- SpecialMesh18.Scale = Vector3.new(0.25, 1.5, 0.25)
- Part19.Name = "H4"
- Part19.Parent = Tool0
- Part19.BrickColor = BrickColor.new("Dark stone grey")
- Part19.Rotation = Vector3.new(45.8799973, 0, 0)
- Part19.CanCollide = false
- Part19.FormFactor = Enum.FormFactor.Symmetric
- Part19.Size = Vector3.new(1, 1, 1)
- Part19.CFrame = CFrame.new(-19.75, 2.50438881, 3.50039816, 1, 0, 0, 0, 0.696135342, -0.717910588, 0, 0.717910588, 0.696135342)
- Part19.BottomSurface = Enum.SurfaceType.Smooth
- Part19.TopSurface = Enum.SurfaceType.Smooth
- Part19.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part19.Position = Vector3.new(-19.75, 2.50438881, 3.50039816)
- Part19.Orientation = Vector3.new(45.8799973, 0, 0)
- Part19.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh20.Parent = Part19
- SpecialMesh20.Scale = Vector3.new(0.25, 1.5, 0.25)
- SpecialMesh20.Scale = Vector3.new(0.25, 1.5, 0.25)
- Part21.Name = "H5"
- Part21.Parent = Tool0
- Part21.BrickColor = BrickColor.new("Dark stone grey")
- Part21.Rotation = Vector3.new(0.049999997, 0, 89.9499969)
- Part21.CanCollide = false
- Part21.FormFactor = Enum.FormFactor.Symmetric
- Part21.Size = Vector3.new(1, 1, 1)
- Part21.CFrame = CFrame.new(-19, 2.95403051, 3.95075631, 0.000796274282, -0.999999702, 0, 0.999999404, 0.000796274049, -0.000796274282, 0.000796274049, 6.34052753e-07, 0.999999702)
- Part21.BottomSurface = Enum.SurfaceType.Smooth
- Part21.TopSurface = Enum.SurfaceType.Smooth
- Part21.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part21.Position = Vector3.new(-19, 2.95403051, 3.95075631)
- Part21.Orientation = Vector3.new(0.049999997, 0, 89.9499969)
- Part21.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh22.Parent = Part21
- SpecialMesh22.Scale = Vector3.new(0.25, 1.5, 0.25)
- SpecialMesh22.Scale = Vector3.new(0.25, 1.5, 0.25)
- Part23.Name = "H6"
- Part23.Parent = Tool0
- Part23.BrickColor = BrickColor.new("Dark stone grey")
- Part23.Rotation = Vector3.new(90, 0, 0)
- Part23.CanCollide = false
- Part23.FormFactor = Enum.FormFactor.Symmetric
- Part23.Size = Vector3.new(1, 1, 1)
- Part23.CFrame = CFrame.new(-19, 2.005265, 2.40000033, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part23.BottomSurface = Enum.SurfaceType.Smooth
- Part23.TopSurface = Enum.SurfaceType.Smooth
- Part23.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part23.Position = Vector3.new(-19, 2.005265, 2.40000033)
- Part23.Orientation = Vector3.new(90, 0, 0)
- Part23.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh24.Parent = Part23
- SpecialMesh24.Scale = Vector3.new(1.25, 0.75, 1.25)
- SpecialMesh24.Scale = Vector3.new(1.25, 0.75, 1.25)
- Part25.Name = "H7"
- Part25.Parent = Tool0
- Part25.BrickColor = BrickColor.new("Dark stone grey")
- Part25.Rotation = Vector3.new(90, 0, 0)
- Part25.CanCollide = false
- Part25.FormFactor = Enum.FormFactor.Symmetric
- Part25.Size = Vector3.new(1, 1, 1)
- Part25.CFrame = CFrame.new(-19, 2.00598168, 1.50000072, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part25.BottomSurface = Enum.SurfaceType.Smooth
- Part25.TopSurface = Enum.SurfaceType.Smooth
- Part25.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part25.Position = Vector3.new(-19, 2.00598168, 1.50000072)
- Part25.Orientation = Vector3.new(90, 0, 0)
- Part25.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh26.Parent = Part25
- SpecialMesh26.Scale = Vector3.new(0.850000024, 1.5, 0.850000024)
- SpecialMesh26.Scale = Vector3.new(0.850000024, 1.5, 0.850000024)
- Part27.Name = "H8"
- Part27.Parent = Tool0
- Part27.BrickColor = BrickColor.new("Dark stone grey")
- Part27.Rotation = Vector3.new(90, 0, 0)
- Part27.CanCollide = false
- Part27.FormFactor = Enum.FormFactor.Symmetric
- Part27.Size = Vector3.new(1, 1, 1)
- Part27.CFrame = CFrame.new(-19, 2.00637984, 1.00000083, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part27.BottomSurface = Enum.SurfaceType.Smooth
- Part27.TopSurface = Enum.SurfaceType.Smooth
- Part27.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part27.Position = Vector3.new(-19, 2.00637984, 1.00000083)
- Part27.Orientation = Vector3.new(90, 0, 0)
- Part27.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh28.Parent = Part27
- SpecialMesh28.Scale = Vector3.new(1.14999998, 0.649999976, 1.14999998)
- SpecialMesh28.Scale = Vector3.new(1.14999998, 0.649999976, 1.14999998)
- Part29.Name = "H9"
- Part29.Parent = Tool0
- Part29.BrickColor = BrickColor.new("Dark stone grey")
- Part29.Rotation = Vector3.new(-22.8699989, 0, 0)
- Part29.CanCollide = false
- Part29.FormFactor = Enum.FormFactor.Symmetric
- Part29.Size = Vector3.new(1, 1, 1)
- Part29.CFrame = CFrame.new(-19, 1.25514579, 2.54940319, 1, 0, 0, 0, 0.921370745, 0.388684809, 0, -0.388684809, 0.921370745)
- Part29.BottomSurface = Enum.SurfaceType.Smooth
- Part29.TopSurface = Enum.SurfaceType.Smooth
- Part29.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part29.Position = Vector3.new(-19, 1.25514579, 2.54940319)
- Part29.Orientation = Vector3.new(-22.8699989, 0, 0)
- Part29.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh30.Parent = Part29
- SpecialMesh30.Scale = Vector3.new(0.349999994, 1, 0.5)
- SpecialMesh30.MeshType = Enum.MeshType.Brick
- SpecialMesh30.Scale = Vector3.new(0.349999994, 1, 0.5)
- Part31.Name = "H10"
- Part31.Parent = Tool0
- Part31.BrickColor = BrickColor.new("Dark stone grey")
- Part31.Rotation = Vector3.new(-22.8699989, 0, 0)
- Part31.CanCollide = false
- Part31.FormFactor = Enum.FormFactor.Symmetric
- Part31.Size = Vector3.new(1, 1, 1)
- Part31.CFrame = CFrame.new(-19, 0.655026436, 2.69892526, 1, 0, 0, 0, 0.921370745, 0.388684809, 0, -0.388684809, 0.921370745)
- Part31.BottomSurface = Enum.SurfaceType.Smooth
- Part31.TopSurface = Enum.SurfaceType.Smooth
- Part31.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part31.Position = Vector3.new(-19, 0.655026436, 2.69892526)
- Part31.Orientation = Vector3.new(-22.8699989, 0, 0)
- Part31.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh32.Parent = Part31
- SpecialMesh32.Scale = Vector3.new(0.349999994, 0.25, 0.75)
- SpecialMesh32.MeshType = Enum.MeshType.Brick
- SpecialMesh32.Scale = Vector3.new(0.349999994, 0.25, 0.75)
- Part33.Name = "H11"
- Part33.Parent = Tool0
- Part33.BrickColor = BrickColor.new("Dark stone grey")
- Part33.Rotation = Vector3.new(90, 0, 0)
- Part33.CanCollide = false
- Part33.FormFactor = Enum.FormFactor.Symmetric
- Part33.Size = Vector3.new(1, 1, 1)
- Part33.CFrame = CFrame.new(-19, 2.00438905, 3.5, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Part33.BottomSurface = Enum.SurfaceType.Smooth
- Part33.TopSurface = Enum.SurfaceType.Smooth
- Part33.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part33.Position = Vector3.new(-19, 2.00438905, 3.5)
- Part33.Orientation = Vector3.new(90, 0, 0)
- Part33.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh34.Parent = Part33
- SpecialMesh34.Scale = Vector3.new(0.860000014, 1.5, 0.860000014)
- SpecialMesh34.Scale = Vector3.new(0.860000014, 1.5, 0.860000014)
- Script35.Name = "WeldScript"
- Script35.Parent = Tool0
- table.insert(cors,sandbox(Script35,function()
- print("TOOL EVENT: " .. script.Parent.Parent.Parent.Name:upper() .. "'s " .. script.Parent.Name:upper() .. " Loaded")
- local hand = script.Parent.Handle
- local h1 = script.Parent.H1
- local h2 = script.Parent.H2
- local h3 = script.Parent.H3
- local h4 = script.Parent.H4
- local h5 = script.Parent.H5
- local h6 = script.Parent.H6
- local h7 = script.Parent.H7
- local h8 = script.Parent.H8
- local h9 = script.Parent.H9
- local h10 = script.Parent.H10
- local h11 = script.Parent.H11
- local medipack = Instance.new("Part")
- medipack.formFactor = 0
- medipack.TopSurface = 0
- medipack.BottomSurface = 0
- medipack.Size = Vector3.new(2,2,1)
- medipack.BrickColor = BrickColor.new(1)
- medipack.Name = "Medipack"
- medipack.Locked = true
- local decal = Instance.new("Decal")
- decal.Face = "Back"
- decal.Texture = "http://www.roblox.com/asset/?id=5235213"
- decal.Parent = medipack
- local parts = {}
- local c = script.Parent:GetChildren()
- local equipped = false
- for i = 1, #c do
- if c[i].className == "Part" then
- table.insert(parts, c[i])
- end
- end
- function onWeld()
- local c = hand:GetChildren()
- for i = 1, #c do
- if c[i].className == "Weld" then
- c[i]:Remove()
- end
- end
- for i = 1, #parts do
- parts[i].Parent = script.Parent
- end
- local w = Instance.new("Weld")
- w.Parent = hand
- w.Part0 = hand
- w.Part1 = h1
- w.C0 = CFrame.fromEulerAnglesXYZ(0,0,1.57)
- local w = Instance.new("Weld")
- w.Parent = hand
- w.Part0 = hand
- w.Part1 = h2
- w.C0 = CFrame.fromEulerAnglesXYZ(0,0,1.57)
- local w = Instance.new("Weld")
- w.Parent = hand
- w.Part0 = hand
- w.Part1 = h3
- w.C0 = CFrame.new(0.75,0.5,0.5) * CFrame.fromEulerAnglesXYZ(0.8,0,0)
- local w = Instance.new("Weld")
- w.Parent = hand
- w.Part0 = hand
- w.Part1 = h4
- w.C0 = CFrame.new(-0.75,0.5,0.5) * CFrame.fromEulerAnglesXYZ(0.8,0,0)
- local w = Instance.new("Weld")
- w.Parent = hand
- w.Part0 = hand
- w.Part1 = h5
- w.C0 = CFrame.new(0,0.95,0.95) * CFrame.fromEulerAnglesXYZ(0,0,1.57)
- local w = Instance.new("Weld")
- w.Parent = hand
- w.Part0 = hand
- w.Part1 = h6
- w.C0 = CFrame.new(0,0,-0.6) * CFrame.fromEulerAnglesXYZ(1.57,0,0)
- local w = Instance.new("Weld")
- w.Parent = hand
- w.Part0 = hand
- w.Part1 = h7
- w.C0 = CFrame.new(0,0,-1.5) * CFrame.fromEulerAnglesXYZ(1.57,0,0)
- local w = Instance.new("Weld")
- w.Parent = hand
- w.Part0 = hand
- w.Part1 = h8
- w.C0 = CFrame.new(0,0,-2) * CFrame.fromEulerAnglesXYZ(1.57,0,0)
- local w = Instance.new("Weld")
- w.Parent = hand
- w.Part0 = hand
- w.Part1 = h9
- w.C0 = CFrame.new(0,-0.75,-0.45) * CFrame.fromEulerAnglesXYZ(-0.4,0,0)
- local w = Instance.new("Weld")
- w.Parent = hand
- w.Part0 = hand
- w.Part1 = h10
- w.C0 = CFrame.new(0,-1.35,-0.3) * CFrame.fromEulerAnglesXYZ(-0.4,0,0)
- local w = Instance.new("Weld")
- w.Parent = hand
- w.Part0 = hand
- w.Part1 = h11
- w.C0 = CFrame.new(0,0,0.5) * CFrame.fromEulerAnglesXYZ(1.57,0,0)
- end
- function onEquip()
- equipped = true
- medipack.Parent = script.Parent
- local w = Instance.new("Weld")
- w.Parent = script.Parent.Parent.Torso
- w.Part0 = w.Parent
- w.Part1 = medipack
- w.C0 = CFrame.new(0,0,1)
- end
- function onUnequip()
- equipped = false
- medipack.Parent = nil
- end
- script.Parent.Equipped:connect(onWeld)
- script.Parent.Unequipped:connect(onWeld)
- script.Parent.Equipped:connect(onEquip)
- script.Parent.Unequipped:connect(onUnequip)
- end))
- LocalScript36.Name = "LocalHeal"
- LocalScript36.Parent = Tool0
- table.insert(cors,sandbox(LocalScript36,function()
- local beam = Instance.new("Part")
- beam.formFactor = 0
- beam.Transparency = 0.3
- beam.CanCollide = false
- beam.Anchored = true
- beam.Locked = true
- beam.Name = "Beam"
- beam.Size = Vector3.new(1,1,1)
- local m = Instance.new("SpecialMesh")
- m.Parent = beam
- local h = Instance.new("Hint")
- --
- local uber = 0
- local ubercharging = false
- local healing = ""
- local healingnow = false
- local equipped = false
- local abletouber = true
- function healPlayer(human)
- local player = game.Players:GetPlayerFromCharacter(human)
- if player ~= nil and player.Neutral == false and player.TeamColor ~= game.Players:GetPlayerFromCharacter(script.Parent.Parent).TeamColor then
- spark()
- end
- healing = human
- healingnow = true
- print("TOOL EVENT: " .. script.Parent.Parent.Name:upper() .. " is HEALING " .. human.Name:upper())
- beam.Parent = script.Parent
- beam.BrickColor = game.Players:GetPlayerFromCharacter(script.Parent.Parent).TeamColor
- while healingnow == true do
- if (healing.Torso.Position - script.Parent.H8.Position).magnitude <= 25 then
- beam.CFrame = CFrame.new((human.Torso.Position + script.Parent.H8.Position) / 2, human.Torso.Position) * CFrame.fromEulerAnglesXYZ(1.57,0,0)
- m.Scale = (m.Scale - Vector3.new(0,m.Scale.y,0)) + Vector3.new(0,1,0)
- m.Scale = m.Scale + Vector3.new(0,(human.Torso.Position - script.Parent.H8.Position).magnitude - 1,0)
- human.Humanoid.Health = human.Humanoid.Health + 0.5
- if uber < 1000 and abletouber == true then
- uber = uber + 1
- end
- h.Text = "Ubercharge: ("
- for i = 1, math.floor(uber / 100) do
- h.Text = h.Text .. "|"
- end
- for i = 1, 10 - math.floor(uber / 100) do
- h.Text = h.Text .. "."
- end
- h.Text = h.Text .. ")"
- else
- healingnow = false
- healing = ""
- ubercharging = false
- beam.Parent = nil
- spark()
- break
- end
- wait(0.01)
- end
- end
- function spark()
- print("TOOL EVENT: " .. script.Parent.Parent.Name:upper() .. " has SPARKED with " .. script.Parent.Name:upper())
- local s = Instance.new("Sparkles")
- s.Color = Color3.new(1,0,0)
- s.Parent = script.Parent.Handle
- wait(0.1)
- s:Remove()
- end
- function onButton1Down(mouse)
- if mouse.Target == nil then
- return
- end
- if mouse.Target.Parent == nil then
- return
- end
- if mouse.Target.Parent:FindFirstChild("Humanoid") ~= nil then
- healPlayer(mouse.Target.Parent)
- else
- spark()
- end
- end
- function onButton1Up()
- healingnow = false
- healing = ""
- ubercharging = false
- m.Scale = (m.Scale - Vector3.new(0,m.Scale.y,0)) + Vector3.new(0,1,0)
- beam.Parent = nil
- end
- function onKeyDown(key)
- key:lower()
- if key == "u" then
- if uber == 1000 then
- abletouber = false
- local things = {}
- uber = 0
- print("TOOL EVENT: " .. script.Parent.Parent.Name:upper() .. " is UBERCHARGING")
- h.Text = "Ubercharge: ("
- for i = 1, math.floor(uber / 100) do
- h.Text = h.Text .. "|"
- end
- for i = 1, 10 - math.floor(uber / 100) do
- h.Text = h.Text .. "."
- end
- h.Text = h.Text .. ")"
- local c = script.Parent.Parent:GetChildren()
- for i = 1, #c do
- if c[i].className == "Part" then
- c[i].Reflectance = c[i].Reflectance + 0.5
- table.insert(things, c[i])
- end
- end
- local ff = Instance.new("ForceField")
- table.insert(things, ff)
- ff.Parent = script.Parent.Parent
- if healing ~= "" then
- local b = healing:GetChildren()
- for i = 1, #b do
- if b[i].className == "Part" then
- b[i].Reflectance = b[i].Reflectance + 0.5
- table.insert(things, b[i])
- end
- end
- local sf = Instance.new("ForceField")
- sf.Parent = healing
- table.insert(things, sf)
- end
- wait(10)
- local c = things
- for i = 1, #c do
- if c[i].className == "Part" then
- c[i].Reflectance = c[i].Reflectance - 0.5
- elseif c[i].className == "ForceField" then
- c[i]:Remove()
- end
- end
- abletouber = true
- end
- end
- end
- function onEquip(mouse)
- h.Parent = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
- h.Text = "Ubercharge: ("
- for i = 1, math.floor(uber / 100) do
- h.Text = h.Text .. "|"
- end
- for i = 1, 10 - math.floor(uber / 100) do
- h.Text = h.Text .. "."
- end
- h.Text = h.Text .. ")"
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- mouse.Button1Up:connect(onButton1Up)
- mouse.KeyDown:connect(onKeyDown)
- end
- function onUnequip()
- h.Parent = nil
- healing = ""
- healingnow = false
- ubercharging = false
- beam.Parent = nil
- m.Scale = (m.Scale - Vector3.new(0,m.Scale.y,0)) + Vector3.new(0,1,0)
- end
- script.Parent.Equipped:connect(onEquip)
- script.Parent.Unequipped:connect(onUnequip)
- while true do
- for i = 1, 5 do
- m.Scale = m.Scale + Vector3.new(0.1,0,0.1)
- wait(0.1)
- end
- for i = 1, 5 do
- m.Scale = m.Scale - Vector3.new(0.1,0,0.1)
- wait(0.1)
- end
- end
- end))
- Script37.Name = "PUT THIS IN THE WEAPON"
- Script37.Parent = Tool0
- table.insert(cors,sandbox(Script37,function()
- local debounce = false
- function getPlayer(humanoid)
- local players = game.Players:children()
- for i = 1, #players do
- if players[i].Character.Humanoid == humanoid then return players[i] end
- end
- return nil
- end
- function onTouch(part)
- local human = part.Parent:findFirstChild("Humanoid")
- if (human ~= nil) and debounce == false then
- debounce = true
- local player = getPlayer(human)
- if (player == nil) then return end
- script.Parent:clone().Parent = player.Backpack
- wait(2)
- debounce = false
- end
- end
- script.Parent.Parent.Touched:connect(onTouch)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement