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"))
- Model0 = Instance.new("Model")
- Model1 = Instance.new("Model")
- Part2 = Instance.new("Part")
- CylinderMesh3 = Instance.new("CylinderMesh")
- Sound4 = Instance.new("Sound")
- Sound5 = Instance.new("Sound")
- Sound6 = Instance.new("Sound")
- Model7 = Instance.new("Model")
- Part8 = Instance.new("Part")
- PointLight9 = Instance.new("PointLight")
- Part10 = Instance.new("Part")
- PointLight11 = Instance.new("PointLight")
- Part12 = Instance.new("Part")
- CylinderMesh13 = Instance.new("CylinderMesh")
- Part14 = Instance.new("Part")
- CylinderMesh15 = Instance.new("CylinderMesh")
- Part16 = Instance.new("Part")
- CylinderMesh17 = Instance.new("CylinderMesh")
- Part18 = Instance.new("Part")
- Part19 = Instance.new("Part")
- CylinderMesh20 = Instance.new("CylinderMesh")
- Part21 = Instance.new("Part")
- CylinderMesh22 = Instance.new("CylinderMesh")
- Part23 = Instance.new("Part")
- CylinderMesh24 = Instance.new("CylinderMesh")
- Part25 = Instance.new("Part")
- CylinderMesh26 = Instance.new("CylinderMesh")
- Script27 = Instance.new("Script")
- Part28 = Instance.new("Part")
- Model0.Name = "Turret"
- Model0.Parent = mas
- Model1.Name = "Base"
- Model1.Parent = Model0
- Model1.PrimaryPart = Part2
- Part2.Name = "Rotor"
- Part2.Parent = Model1
- Part2.Material = Enum.Material.DiamondPlate
- Part2.BrickColor = BrickColor.new("Dark stone grey")
- Part2.Rotation = Vector3.new(-180, 0, 0)
- Part2.Anchored = true
- Part2.FormFactor = Enum.FormFactor.Custom
- Part2.Size = Vector3.new(1.80000007, 0.200000003, 1.79999995)
- Part2.CFrame = CFrame.new(1.28499699, 5.99133778, -124.175003, 1, 0, 1.19248806e-08, 0, -1, 0, 1.19248806e-08, 0, -1)
- Part2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part2.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part2.Position = Vector3.new(1.28499699, 5.99133778, -124.175003)
- Part2.Orientation = Vector3.new(0, 180, 180)
- Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
- CylinderMesh3.Parent = Part2
- Sound4.Name = "Launch"
- Sound4.Parent = Part2
- Sound4.SoundId = "rbxassetid://275560598"
- Sound4.Volume = 1
- Sound5.Name = "Locked"
- Sound5.Parent = Part2
- Sound5.SoundId = "http://www.roblox.com/asset/?id=103879773"
- Sound5.Volume = 0.10000000149012
- Sound5.Looped = true
- Sound6.Name = "Locking"
- Sound6.Parent = Part2
- Sound6.SoundId = "http://www.roblox.com/asset/?id=103825932"
- Sound6.Volume = 0.10000000149012
- Sound6.Looped = true
- Model7.Name = "Turret"
- Model7.Parent = Model1
- Model7.PrimaryPart = Part18
- Part8.Name = "Gun"
- Part8.Parent = Model7
- Part8.Material = Enum.Material.SmoothPlastic
- Part8.BrickColor = BrickColor.new("Artichoke")
- Part8.Transparency = 1
- Part8.Rotation = Vector3.new(-180, 0, 0)
- Part8.Anchored = true
- Part8.FormFactor = Enum.FormFactor.Custom
- Part8.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part8.CFrame = CFrame.new(1.33499801, 4.89133406, -122.975006, 1, 4.37113883e-08, -4.37113883e-08, 4.37113883e-08, -1, 1.19248806e-08, -4.37113883e-08, -1.19248824e-08, -1)
- Part8.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part8.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part8.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part8.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part8.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part8.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part8.Color = Color3.new(0.541176, 0.670588, 0.521569)
- Part8.Position = Vector3.new(1.33499801, 4.89133406, -122.975006)
- Part8.Orientation = Vector3.new(0, -180, 180)
- Part8.Color = Color3.new(0.541176, 0.670588, 0.521569)
- PointLight9.Name = "Muzzle"
- PointLight9.Parent = Part8
- PointLight9.Color = Color3.new(1, 0.666667, 0)
- PointLight9.Enabled = false
- PointLight9.Brightness = 0.5
- PointLight9.Range = 12
- PointLight9.Shadows = true
- PointLight9.Color = Color3.new(1, 0.666667, 0)
- Part10.Name = "Gun"
- Part10.Parent = Model7
- Part10.Material = Enum.Material.SmoothPlastic
- Part10.BrickColor = BrickColor.new("Artichoke")
- Part10.Transparency = 1
- Part10.Rotation = Vector3.new(-180, 0, 0)
- Part10.Anchored = true
- Part10.FormFactor = Enum.FormFactor.Custom
- Part10.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part10.CFrame = CFrame.new(1.33499599, 4.89133406, -122.975006, 1, 4.37113883e-08, -4.37113883e-08, 4.37113883e-08, -1, 1.19248806e-08, -4.37113883e-08, -1.19248824e-08, -1)
- Part10.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part10.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part10.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part10.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part10.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part10.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part10.Color = Color3.new(0.541176, 0.670588, 0.521569)
- Part10.Position = Vector3.new(1.33499599, 4.89133406, -122.975006)
- Part10.Orientation = Vector3.new(0, -180, 180)
- Part10.Color = Color3.new(0.541176, 0.670588, 0.521569)
- PointLight11.Name = "Muzzle"
- PointLight11.Parent = Part10
- PointLight11.Color = Color3.new(1, 0.666667, 0)
- PointLight11.Enabled = false
- PointLight11.Brightness = 0.5
- PointLight11.Range = 12
- PointLight11.Shadows = true
- PointLight11.Color = Color3.new(1, 0.666667, 0)
- Part12.Parent = Model7
- Part12.Material = Enum.Material.Metal
- Part12.Rotation = Vector3.new(90, 0, -180)
- Part12.Anchored = true
- Part12.FormFactor = Enum.FormFactor.Custom
- Part12.Size = Vector3.new(0.25, 0.699999988, 0.200000003)
- Part12.CFrame = CFrame.new(1.33499599, 4.89133406, -123.350006, -1, 4.37113883e-08, 1.19248824e-08, -1.19248824e-08, 5.21253064e-16, -1, -4.37113883e-08, -1, 0)
- Part12.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part12.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part12.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part12.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part12.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part12.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part12.Position = Vector3.new(1.33499599, 4.89133406, -123.350006)
- Part12.Orientation = Vector3.new(90, 180, 0)
- CylinderMesh13.Parent = Part12
- CylinderMesh13.Scale = Vector3.new(0.5, 1, 0.5)
- CylinderMesh13.Scale = Vector3.new(0.5, 1, 0.5)
- Part14.Parent = Model7
- Part14.Material = Enum.Material.DiamondPlate
- Part14.BrickColor = BrickColor.new("Dark stone grey")
- Part14.Rotation = Vector3.new(90, 0, -180)
- Part14.Anchored = true
- Part14.FormFactor = Enum.FormFactor.Custom
- Part14.Size = Vector3.new(0.25, 0.200000003, 0.200000003)
- Part14.CFrame = CFrame.new(1.33499599, 4.89133406, -123.800003, -1, 4.37113883e-08, 1.19248824e-08, -1.19248824e-08, 5.21253064e-16, -1, -4.37113883e-08, -1, 0)
- Part14.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part14.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part14.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part14.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part14.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part14.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part14.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part14.Position = Vector3.new(1.33499599, 4.89133406, -123.800003)
- Part14.Orientation = Vector3.new(90, 180, 0)
- Part14.Color = Color3.new(0.388235, 0.372549, 0.384314)
- CylinderMesh15.Parent = Part14
- Part16.Parent = Model7
- Part16.Material = Enum.Material.DiamondPlate
- Part16.BrickColor = BrickColor.new("Dark stone grey")
- Part16.Rotation = Vector3.new(90, 0, 90)
- Part16.Anchored = true
- Part16.FormFactor = Enum.FormFactor.Custom
- Part16.Size = Vector3.new(0.699999988, 0.599999905, 0.699999988)
- Part16.CFrame = CFrame.new(1.13499606, 4.89133406, -124.175003, 0, -1, 1.19248824e-08, 0, -1.19248824e-08, -1, 1, 0, 0)
- Part16.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part16.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part16.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part16.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part16.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part16.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part16.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part16.Position = Vector3.new(1.13499606, 4.89133406, -124.175003)
- Part16.Orientation = Vector3.new(90, -90, 0)
- Part16.Color = Color3.new(0.388235, 0.372549, 0.384314)
- CylinderMesh17.Parent = Part16
- Part18.Name = "Rotor"
- Part18.Parent = Model7
- Part18.Material = Enum.Material.SmoothPlastic
- Part18.BrickColor = BrickColor.new("Artichoke")
- Part18.Transparency = 1
- Part18.Rotation = Vector3.new(-180, 0, 0)
- Part18.Anchored = true
- Part18.FormFactor = Enum.FormFactor.Custom
- Part18.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part18.CFrame = CFrame.new(1.28499699, 4.89133406, -124.175003, 1, 4.37113883e-08, -4.37113883e-08, 4.37113883e-08, -1, 1.19248806e-08, -4.37113883e-08, -1.19248824e-08, -1)
- Part18.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part18.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part18.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part18.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part18.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part18.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part18.Color = Color3.new(0.541176, 0.670588, 0.521569)
- Part18.Position = Vector3.new(1.28499699, 4.89133406, -124.175003)
- Part18.Orientation = Vector3.new(0, -180, 180)
- Part18.Color = Color3.new(0.541176, 0.670588, 0.521569)
- Part19.Parent = Model7
- Part19.Material = Enum.Material.Metal
- Part19.Rotation = Vector3.new(-88.4300003, 32.3600006, 179.159988)
- Part19.Anchored = true
- Part19.FormFactor = Enum.FormFactor.Plate
- Part19.Size = Vector3.new(1.20000005, 0.100000001, 1.20000005)
- Part19.CFrame = CFrame.new(0.975300014, 4.93038607, -123.912231, -0.844599128, -0.0123738181, 0.535251737, 0.535393536, -0.019519804, 0.844374418, -1.43866487e-07, 0.999732375, 0.0231113452)
- Part19.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part19.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part19.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part19.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part19.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part19.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part19.Position = Vector3.new(0.975300014, 4.93038607, -123.912231)
- Part19.Orientation = Vector3.new(-57.5999985, 87.5299988, 92.0899963)
- CylinderMesh20.Parent = Part19
- CylinderMesh20.Scale = Vector3.new(0.280000001, 1, 0.280000001)
- CylinderMesh20.Scale = Vector3.new(0.280000001, 1, 0.280000001)
- Part21.Parent = Model7
- Part21.Material = Enum.Material.Metal
- Part21.Rotation = Vector3.new(-88.4300003, 32.3600006, 179.159988)
- Part21.Anchored = true
- Part21.FormFactor = Enum.FormFactor.Plate
- Part21.Size = Vector3.new(1, 0.200000003, 1)
- Part21.CFrame = CFrame.new(0.974668026, 4.92942286, -123.862244, -0.844599128, -0.0123738181, 0.535251737, 0.535393536, -0.019519804, 0.844374418, -1.43866487e-07, 0.999732375, 0.0231113452)
- Part21.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part21.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part21.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part21.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part21.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part21.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part21.Position = Vector3.new(0.974668026, 4.92942286, -123.862244)
- Part21.Orientation = Vector3.new(-57.5999985, 87.5299988, 92.0899963)
- CylinderMesh22.Parent = Part21
- CylinderMesh22.Scale = Vector3.new(0.280000001, 1, 0.280000001)
- CylinderMesh22.Scale = Vector3.new(0.280000001, 1, 0.280000001)
- Part23.Parent = Model7
- Part23.Material = Enum.Material.Neon
- Part23.BrickColor = BrickColor.new("Maroon")
- Part23.Transparency = 0.5
- Part23.Rotation = Vector3.new(-88.4300003, 32.3600006, 179.159988)
- Part23.Anchored = true
- Part23.CanCollide = false
- Part23.FormFactor = Enum.FormFactor.Plate
- Part23.Size = Vector3.new(0.100000001, 249.100021, 0.100000001)
- Part23.CFrame = CFrame.new(-0.565246999, 2.50018311, 0.554248989, -0.844599128, -0.0123738181, 0.535251737, 0.535393536, -0.019519804, 0.844374418, -1.43866487e-07, 0.999732375, 0.0231113452)
- Part23.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part23.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part23.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part23.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part23.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part23.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part23.Color = Color3.new(0.458824, 0, 0)
- Part23.Position = Vector3.new(-0.565246999, 2.50018311, 0.554248989)
- Part23.Orientation = Vector3.new(-57.5999985, 87.5299988, 92.0899963)
- Part23.Color = Color3.new(0.458824, 0, 0)
- CylinderMesh24.Parent = Part23
- CylinderMesh24.Scale = Vector3.new(0.280000001, 1, 0.280000001)
- CylinderMesh24.Scale = Vector3.new(0.280000001, 1, 0.280000001)
- Part25.Parent = Model7
- Part25.Material = Enum.Material.Metal
- Part25.Rotation = Vector3.new(90, 0, -180)
- Part25.Anchored = true
- Part25.FormFactor = Enum.FormFactor.Custom
- Part25.Size = Vector3.new(0.449999988, 0.400000006, 0.300000012)
- Part25.CFrame = CFrame.new(1.33499599, 4.89133406, -123.550003, -1, 4.37113883e-08, 1.19248824e-08, -1.19248824e-08, 5.21253064e-16, -1, -4.37113883e-08, -1, 0)
- Part25.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.Position = Vector3.new(1.33499599, 4.89133406, -123.550003)
- Part25.Orientation = Vector3.new(90, 180, 0)
- CylinderMesh26.Parent = Part25
- CylinderMesh26.Scale = Vector3.new(0.5, 1, 0.5)
- CylinderMesh26.Scale = Vector3.new(0.5, 1, 0.5)
- Script27.Name = "Mastery"
- Script27.Parent = Model0
- table.insert(cors,sandbox(Script27,function()
- sp = script.Parent
- r = game:GetService('RunService')
- Objs = {
- base = sp:WaitForChild('Base'),
- turret = sp.Base:WaitForChild('Turret'),
- }
- Set = {
- ExplosionRadius = 3,
- Damage = 5,
- Cooldown = 0.25,
- MaximumRange = 200,
- MinimumRange = 2,
- LockOnTime = 1.5,
- TeamColor = BrickColor.new ('Toothpaste'),
- Groups = {},
- UserIds = {},
- Spread = 1,
- }
- Var = {
- Target = nil,
- FirstLock = 0,
- RequiredLock = nil,
- }
- Sounds = {
- launch = Objs.base.PrimaryPart:WaitForChild('Launch'),
- locking = Objs.base.PrimaryPart:WaitForChild('Locking'),
- locked = Objs.base.PrimaryPart:WaitForChild('Locked'),
- }
- function castray(cframeFirst, cframeSecond, ignoreObject, distanceToCast)
- local newRay = Ray.new(cframeFirst.p, (cframeSecond.p - cframeFirst.p).unit * distanceToCast)
- local hitObject, positionHit = workspace:FindPartOnRay(newRay, ignoreObject)
- return positionHit, hitObject
- end
- function Find(t,item,mode)
- if mode == 'userid' then
- for i,name in pairs (t) do
- if name == item then
- return true
- end
- end
- elseif mode == 'group' then
- for i,id in pairs (t) do
- if item:GetRankInGroup(id) > 0 then
- return true
- end
- end
- end
- return false
- end
- function Fire(CFrame1,CFrame2)
- Sounds.launch:Play()
- local ray = Instance.new('Part',workspace)
- game:GetService('Debris'):AddItem(ray,0.1)
- ray.FormFactor = Enum.FormFactor.Custom
- ray.TopSurface = 0
- ray.BottomSurface = 0
- ray.Anchored = true
- ray.CanCollide = false
- ray.Material = Enum.Material.Neon
- ray.BrickColor = BrickColor.new('Gold')
- ray.Size = Vector3.new(0.2,(CFrame1.p - CFrame2.p).magnitude,0.2)
- ray.CFrame = CFrame.new((CFrame1.p + CFrame2.p)/2,CFrame1.p) * CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)
- local mesh = Instance.new('CylinderMesh',ray)
- mesh.Scale = Vector3.new(0.25,1,0.25)
- end
- function Explode(pos)
- for i,v in pairs (game.Players:GetPlayers()) do
- if v.TeamColor ~= Set.TeamColor then
- if v:DistanceFromCharacter (pos) <= Set.ExplosionRadius then
- v.Character.Humanoid:TakeDamage(Set.Damage)
- end
- end
- end
- end
- function CheckTarget(player)
- if player.TeamColor ~= Set.TeamColor or Find(Set.UserIds,player.Name,'userid') == true or Find(Set.Groups,player,'group') == true then
- if player:DistanceFromCharacter(Objs.turret.PrimaryPart.Position) <= Set.MaximumRange then
- if player:DistanceFromCharacter(Objs.turret.PrimaryPart.Position) >= Set.MinimumRange then
- if player.Character.Humanoid.Health > 0 then
- local pos, hit = castray(Objs.turret.Gun.CFrame, player.Character.Torso.CFrame, Objs.turret, Set.MaximumRange)
- if (pos - player.Character.Torso.Position).magnitude <= Set.ExplosionRadius then
- return true
- end
- end
- end
- end
- end
- return false
- end
- function AquireTarget()
- local targets = {}
- for i,player in pairs (game.Players:GetPlayers()) do
- if CheckTarget(player) == true then
- table.insert(targets,player.Character)
- end
- end
- if #targets > 0 then
- Var.Target = targets[math.random(1,#targets)]
- else
- Var.Target = nil
- end
- end
- r.Stepped:connect(function()
- if Var.Target ~= nil then
- local direction = Objs.base.PrimaryPart.CFrame:pointToObjectSpace(Var.Target.Torso.Position)
- local direction2 = Objs.turret.PrimaryPart.CFrame:pointToObjectSpace(Var.Target.Torso.Position)
- local spiny = math.atan2(direction.x, direction.z) + math.pi
- local spinx = math.atan2(direction2.y,direction.y)
- Objs.base:SetPrimaryPartCFrame(Objs.base.PrimaryPart.CFrame * CFrame.Angles(0, spiny, 0))
- Objs.turret:SetPrimaryPartCFrame(Objs.turret.PrimaryPart.CFrame * CFrame.Angles(math.rad(spinx), 0, 0))
- end
- end)
- spawn(function()
- while r.Stepped:wait() do
- if Var.Target == nil then
- for i,sound in pairs (Sounds) do
- if i ~= 'turn' and i ~= 'launch' then
- if sound.IsPlaying == true then sound:Stop() end
- wait()
- end
- end
- AquireTarget()
- else
- if Var.RequiredLock == nil then
- Var.RequiredLock = tick() + Set.LockOnTime
- end
- Var.FirstLock = tick()
- if Sounds.locking.IsPlaying == false then Sounds.locking:Play() end
- if Var.FirstLock > Var.RequiredLock then
- Sounds.locking:Stop()
- if Sounds.locked.IsPlaying == false then Sounds.locked:Play() end
- Var.RequiredLock = nil
- Var.FirstLock = 0
- while sp and wait(Set.Cooldown) and Var.Target ~= nil and CheckTarget(game.Players:GetPlayerFromCharacter(Var.Target)) == true do
- for i,gun in pairs (Objs.turret:GetChildren()) do
- if gun.Name == 'Gun' then
- local pos, hit = castray(gun.CFrame, Var.Target.Torso.CFrame, Objs.turret, Set.MaximumRange)
- gun.Muzzle.Enabled = true
- local spread = CFrame.new(math.random(-Set.Spread,Set.Spread),math.random(-Set.Spread,Set.Spread),math.random(-Set.Spread,Set.Spread))
- local tpos = CFrame.new(pos) * spread
- Fire(gun.CFrame,tpos)
- Explode(tpos.p)
- gun.Muzzle.Enabled = false
- wait()
- end
- end
- end
- Sounds.locked:Stop()
- Var.Target = nil
- end
- end
- end
- end)
- end))
- Part28.Name = "Baseplate"
- Part28.Parent = mas
- Part28.BrickColor = BrickColor.new("Dark stone grey")
- Part28.Anchored = true
- Part28.Locked = true
- Part28.FormFactor = Enum.FormFactor.Symmetric
- Part28.Size = Vector3.new(512, 20, 512)
- Part28.CFrame = CFrame.new(0, -10, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part28.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part28.Position = Vector3.new(0, -10, 0)
- Part28.Color = Color3.new(0.388235, 0.372549, 0.384314)
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- 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