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"))
- MeshPart0 = Instance.new("MeshPart")
- BodyPosition1 = Instance.new("BodyPosition")
- Script2 = Instance.new("Script")
- NumberValue3 = Instance.new("NumberValue")
- Script4 = Instance.new("Script")
- Script5 = Instance.new("Script")
- SpecialMesh6 = Instance.new("SpecialMesh")
- BindableEvent7 = Instance.new("BindableEvent")
- Sound8 = Instance.new("Sound")
- Sound9 = Instance.new("Sound")
- Script10 = Instance.new("Script")
- BodyGyro11 = Instance.new("BodyGyro")
- MeshPart0.Name = "BlueShell"
- MeshPart0.Parent = mas
- MeshPart0.CFrame = CFrame.new(60.3269997, 2.5, -7.68099976, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- MeshPart0.Position = Vector3.new(60.3269997, 2.5, -7.68099976)
- MeshPart0.Size = Vector3.new(5.34600019, 5, 5.36199999)
- MeshPart0.TextureID = "rbxassetid://813414075"
- BodyPosition1.Parent = MeshPart0
- BodyPosition1.Position = Vector3.new(-264.600006, 215.598999, 330.799988)
- BodyPosition1.P = 20000
- BodyPosition1.MaxForce = Vector3.new(400000000, 0, 400000000)
- BodyPosition1.maxForce = Vector3.new(400000000, 0, 400000000)
- BodyPosition1.position = Vector3.new(-264.600006, 215.598999, 330.799988)
- Script2.Name = "FindTarget"
- Script2.Parent = MeshPart0
- table.insert(cors,sandbox(Script2,function()
- local part = script.Parent
- mode = 1
- active = false
- function moveTo(target)
- if mode == 1 then
- part.BodyPosition.position = target.Position + Vector3.new(0, script.Parent.AltDifference.Value, 0)
- elseif mode == 2 then
- if active == false then
- active = true
- for i = 1, 3 do
- script.Parent.BodyPosition.Position = target.Position + Vector3.new(0, script.Parent.AltDifference.Value, 24)
- wait(0.125)
- script.Parent.BodyPosition.Position = target.Position + Vector3.new(24, script.Parent.AltDifference.Value, 0)
- wait(0.125)
- script.Parent.BodyPosition.Position = target.Position + Vector3.new(0, script.Parent.AltDifference.Value, -24)
- wait(0.125)
- script.Parent.BodyPosition.Position = target.Position + Vector3.new(-24, script.Parent.AltDifference.Value, 0)
- wait(0.125)
- end
- part.BodyPosition.position = target.Position + Vector3.new(0, script.Parent.AltDifference.Value, 0)
- for i = 1, 10 do
- script.Parent.BodyGyro.CFrame = CFrame.Angles(math.rad(-45), math.rad(-180), math.rad(180))
- part.BodyPosition.position = target.Position + Vector3.new(0, script.Parent.AltDifference.Value, 0)
- wait(0.05)
- end
- script.Parent.BodyGyro.CFrame = CFrame.Angles(math.rad(-45), math.rad(0), math.rad(0))
- wait(0.5)
- script.Parent.GoToTarget.Disabled = false
- script.Parent.AltDifference.Value = -36
- part.BodyPosition.position = target.Position + Vector3.new(0, script.Parent.AltDifference.Value, 0)
- end
- end
- end
- function findNearestTorso(pos)
- local nearest = {
- torso = nil,
- distance = 100000
- }
- for _, object in ipairs(game.Workspace:GetChildren()) do
- if object:isA("Model") and object ~= script.Parent then
- local torso = object:findFirstChild("Torso")
- local human = object:findFirstChild("Humanoid")
- if torso and human and human.Health > 0 then
- local this = {
- torso = torso,
- distance = (torso.Position - pos).magnitude
- }
- if this.distance < nearest.distance then
- nearest = this
- end
- if this.distance < 50 then
- script.Parent.BodyPosition.MaxForce = Vector3.new(400000000, 400000000, 400000000)
- end
- if this.distance < 10 then
- mode = 2
- end
- end
- end
- end
- return nearest.torso, nearest.distance
- end
- while true do
- local torso = findNearestTorso(part.Position)
- if torso ~= nil then
- moveTo(torso)
- end
- wait()
- end
- end))
- NumberValue3.Name = "AltDifference"
- NumberValue3.Parent = MeshPart0
- NumberValue3.Value = 9
- Script4.Name = "Damage"
- Script4.Parent = MeshPart0
- table.insert(cors,sandbox(Script4,function()
- local damage = 75
- debris = game:GetService("Debris")
- function SplashDamage(r, p)
- local explosion = Instance.new('Explosion')
- explosion.BlastPressure = p -- Completely safe explosion
- explosion.BlastRadius = r
- explosion.ExplosionType = Enum.ExplosionType.NoCraters
- explosion.Position = script.Parent.Position
- explosion.Parent = game.Workspace
- local e = Instance.new("Part")
- e.Parent = workspace
- e.BrickColor = BrickColor.new("Dark blue")
- e.Anchored = true
- e.CanCollide = false
- e.Size = Vector3.new(1, 1, 1)
- e.Position = script.Parent.Position
- explosion.Hit:connect(function(part)
- local humanoid = part.Parent:FindFirstChild("Humanoid")
- if humanoid then
- if humanoid.Health > 0 and part.Parent:FindFirstChild("ForceField") == nil and humanoid:FindFirstChild("damaged") == nil then
- local d = script.damaged:Clone()
- d.Parent = humanoid
- debris:AddItem(d, 2)
- humanoid.Health = humanoid.Health - damage
- part.Parent:FindFirstChild("Torso").Velocity = Vector3.new(0, 200, 0)
- humanoid.Sit = true
- end
- end
- end)
- script.Mesh:Clone().Parent = e
- local s = script.Vanish:Clone()
- s.Parent = e
- s.Disabled = false
- debris:AddItem(script.Parent, 0.1)
- end
- function Explode(part)
- if part.Parent:FindFirstChild("Humanoid") then
- SplashDamage(5,0)
- end
- end
- script.Parent.Touched:connect(Explode)
- end))
- Script5.Name = "Vanish"
- Script5.Parent = Script4
- table.insert(cors,sandbox(Script5,function()
- for i = 1, 20 do
- script.Parent.Transparency = script.Parent.Transparency + 0.05
- wait(0.05)
- end
- script.Parent:Destroy()
- end))
- Script5.Disabled = true
- SpecialMesh6.Parent = Script4
- SpecialMesh6.Scale = Vector3.new(150, 150, 150)
- SpecialMesh6.MeshType = Enum.MeshType.Sphere
- BindableEvent7.Name = "damaged"
- BindableEvent7.Parent = Script4
- Sound8.Name = "Move"
- Sound8.Parent = MeshPart0
- Sound8.Looped = true
- Sound8.Playing = true
- Sound8.SoundId = "rbxassetid://785539625"
- Sound8.Volume = 1
- Sound9.Name = "Explosion"
- Sound9.Parent = MeshPart0
- Sound9.Looped = true
- Sound9.PlayOnRemove = true
- Sound9.SoundId = "rbxassetid://847757071"
- Sound9.Volume = 1
- Script10.Name = "GoToTarget"
- Script10.Parent = MeshPart0
- table.insert(cors,sandbox(Script10,function()
- local part = script.Parent
- function moveTo(target)
- part.BodyPosition.position = target.Position
- end
- function findNearestTorso(pos)
- local nearest = {
- torso = nil,
- distance = 10000
- }
- for _, object in ipairs(game.Workspace:GetChildren()) do
- if object:isA("Model") and object ~= script.Parent then
- local torso = object:findFirstChild("Torso")
- local human = object:findFirstChild("Humanoid")
- if torso and human and human.Health > 0 then
- local this = {
- torso = torso,
- distance = (torso.Position - pos).magnitude
- }
- if this.distance < nearest.distance then
- nearest = this
- end
- end
- end
- end
- return nearest.torso, nearest.distance
- end
- while true do
- local torso = findNearestTorso(part.Position)
- if torso ~= nil then
- moveTo(torso)
- end
- wait()
- end
- end))
- Script10.Disabled = true
- BodyGyro11.Parent = MeshPart0
- BodyGyro11.MaxTorque = Vector3.new(9.99999994e+32, 9.99999994e+32, 9.99999994e+32)
- BodyGyro11.P = 6000
- BodyGyro11.maxTorque = Vector3.new(9.99999994e+32, 9.99999994e+32, 9.99999994e+32)
- 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