Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Created with PenguinAnonymous's compiler
- --PenguinAnonymous is not responsible for damages caused to your game
- --This plugin does not remove things
- --PenguinAnonymous cannot be held resonsible for manual deletion for the purpose of testing
- --Keep in mind, any items that cause errors in compilation will be skipped and documented within the last line of the disclaimer comments
- --Thank you for using my plugin and enjoy :)
- --It is free to use
- --If you use this plugin to create your own, please give me credit
- --Z_V edited my plugin to look like his own and published it without giving me credit, and that makes me very angry
- --Errors:
- local runDummyScript = function(f,scri)
- local oldenv = getfenv(f)
- local newenv = setmetatable({}, {
- __index = function(_, k)
- if k:lower() == 'script' then
- return scri
- else
- return oldenv[k]
- end
- end
- })
- setfenv(f, newenv)
- ypcall(function() f() end)
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "CompiledModel"
- o1 = Instance.new("Tool")
- o2 = Instance.new("Script")
- o3 = Instance.new("Script")
- o4 = Instance.new("Animation")
- o5 = Instance.new("Animation")
- o6 = Instance.new("LocalScript")
- o7 = Instance.new("Script")
- o8 = Instance.new("Script")
- o9 = Instance.new("Script")
- o10 = Instance.new("SpecialMesh")
- o11 = Instance.new("SpecialMesh")
- o12 = Instance.new("Script")
- o13 = Instance.new("Script")
- o14 = Instance.new("Sound")
- o15 = Instance.new("Sound")
- o16 = Instance.new("Sound")
- o17 = Instance.new("Sound")
- o18 = Instance.new("Sound")
- o19 = Instance.new("Sound")
- o20 = Instance.new("Sound")
- o21 = Instance.new("Sound")
- o22 = Instance.new("Sound")
- o23 = Instance.new("Sound")
- o24 = Instance.new("Sound")
- o25 = Instance.new("Sound")
- o26 = Instance.new("Sound")
- o27 = Instance.new("Sound")
- o28 = Instance.new("Sound")
- o29 = Instance.new("Sound")
- o30 = Instance.new("Sound")
- o31 = Instance.new("Sound")
- o32 = Instance.new("SpecialMesh")
- o33 = Instance.new("SpecialMesh")
- o34 = Instance.new("SpecialMesh")
- o35 = Instance.new("SpecialMesh")
- o36 = Instance.new("ParticleEmitter")
- o37 = Instance.new("Script")
- o38 = Instance.new("Script")
- o39 = Instance.new("Vector3Value")
- o40 = Instance.new("Sound")
- o41 = Instance.new("BillboardGui")
- o42 = Instance.new("ImageLabel")
- o43 = Instance.new("Script")
- o44 = Instance.new("BodyForce")
- o45 = Instance.new("Script")
- o46 = Instance.new("Script")
- o47 = Instance.new("Script")
- o48 = Instance.new("Vector3Value")
- o49 = Instance.new("Part")
- o50 = Instance.new("Sound")
- o51 = Instance.new("Sound")
- o52 = Instance.new("Sound")
- o53 = Instance.new("ParticleEmitter")
- o54 = Instance.new("ParticleEmitter")
- o55 = Instance.new("ParticleEmitter")
- o56 = Instance.new("ParticleEmitter")
- o57 = Instance.new("ParticleEmitter")
- o1.Name = "Mlg"
- o1.Parent = game.Players.timetodie23232223.Backpack
- o1.ToolTip = "Shots Fired"
- o2.Name = "Welding"
- o2.Parent = o1
- o2.Disabled = true
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- function Weld(x,y)
- local W = Instance.new("Weld")
- W.Part0 = x
- W.Part1 = y
- local CJ = CFrame.new(x.Position)
- local C0 = x.CFrame:inverse()*CJ
- local C1 = y.CFrame:inverse()*CJ
- W.C0 = C0
- W.C1 = C1
- W.Parent = x
- end
- function Get(A)
- if A.className == "Part" then
- Weld(script.Parent.Handle, A)
- A.Anchored = false
- else
- local C = A:GetChildren()
- for i=1, #C do
- Get(C[i])
- end
- end
- end
- function Finale()
- Get(script.Parent)
- end
- script.Parent.Equipped:connect(Finale)
- script.Parent.Unequipped:connect(Finale)
- Finale()
- end,o2)
- end))
- o3.Name = "Weld"
- o3.Parent = o1
- o3.Disabled = true
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- local prev
- local parts = script.Parent:GetChildren()
- for i = 1,#parts do
- --remove any of the following parts that say "(parts[i].className == [className])" if you want to exclude that particular className type from the Weld
- if ((parts[i].className == "Part") or (parts[i].Name == "Handle") or (parts[i].className == "TrussPart") or (parts[i].className == "VehicleSeat") or (parts[i].className == "SkateboardPlatform")) then
- if (prev ~= nil) then
- local weld = Instance.new("Weld")
- weld.Part0 = prev
- weld.Part1 = parts[i]
- weld.C0 = prev.CFrame:inverse()
- weld.C1 = parts[i].CFrame:inverse()
- weld.Parent = prev
- parts[i].Anchored = false
- end
- prev = parts[i]
- end
- end
- wait(3)
- end,o3)
- end))
- o4.Name = "PullPin"
- o4.Parent = o1
- o4.AnimationId = "http://www.roblox.com/asset/?id=88743592"
- o5.Name = "Throwing"
- o5.Parent = o1
- o5.AnimationId = "http://www.roblox.com/asset/?id=88743566"
- o6.Name = "Launcher"
- o6.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- print 'Hello world!'
- Tool = script.Parent
- thrown = true
- VELOCITY = 150
- local Pull_Pin
- local Pull_Pin
- function Nade()
- local model = Instance.new("Model")
- model.Name = "Nade"
- babacaca=Tool.Weld:clone()
- model.Parent = game.Workspace
- nade = Tool.Handle:clone()
- -- nade1 = Tool.Handle1:clone()
- -- nade2 = Tool.Handle2:clone()
- -- nade3 = Tool.Handle3:clone()
- -- nade4 = Tool.Handle4:clone()
- nade.Parent = model
- -- nade1.Parent = model
- -- nade2.Parent = model
- -- nade3.Parent = model
- -- nade4.Parent= model
- nade.CanCollide = true
- --nade1.CanCollide = true
- --nade2.CanCollide = true
- --nade3.CanCollide = true
- --nade4.CanCollide= true
- -- nade1.Transparency=1
- --nade2.Transparency=1
- -- nade4.Transparency=1
- babacaca.Parent=model
- babacaca.Disabled=false
- local script = Tool.NadeScript:clone()
- script.Disabled = false
- script.Parent = nade
- return model
- end
- function lob(mousepos)
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local head = Tool:findFirstChild("Handle")
- if head == nil then return end
- local dir = mousepos - head.Position
- dir = computeDirection(dir)
- local launch = head.Position + 1 * dir
- local delta = mousepos - launch
- local dy = delta.y
- local new_delta = Vector3.new(delta.x, 0, delta.z)
- delta = new_delta
- local dx = delta.magnitude
- local unit_delta = delta.unit
- local g = (-9.81 * 5)
- local theta = computeLaunchAngle(dx, dy, g)
- local vy = math.sin(theta)
- local xz = math.cos(theta)
- local vx = unit_delta.x * xz
- local vz = unit_delta.z * xz
- local missile = Nade()
- missile.Handle.Position = launch
- missile.Handle.Velocity = Vector3.new(vx, vy, vz) * VELOCITY
- local creator_tag = Instance.new("ObjectValue")
- creator_tag.Value = vPlayer
- creator_tag.Name = "creator"
- creator_tag.Parent = missile.Handle
- script.Parent.Handle.Throw:play()
- script.Parent.Handle.Transparency=1
- script.Parent.Part.Transparency=1
- --script.Parent.Handle1.Transparency=1
- --script.Parent.Handle2.Transparency=1
- --script.Parent.Handle3.Transparency=1
- --script.Parent.Handle4.Transparency=1
- end
- function computeLaunchAngle(dx, dy, grav)
- -- http://en.wikipedia.org/wiki/Trajectory_of_a_projectile
- local g = math.abs(grav)
- local inRoot = (VELOCITY*VELOCITY*VELOCITY*VELOCITY) - (g * ((g*dx*dx) + (2*dy*VELOCITY*VELOCITY)))
- if inRoot <= 0 then
- return .25 * math.pi
- end
- local root = math.sqrt(inRoot)
- local inATan1 = ((VELOCITY*VELOCITY) + root) / (g*dx)
- local inATan2 = ((VELOCITY*VELOCITY) - root) / (g*dx)
- local answer1 = math.atan(inATan1)
- local answer2 = math.atan(inATan2)
- if answer1 < answer2 then return answer1 end
- return answer2
- end
- function computeDirection(vec)
- local lenSquared = vec.magnitude * vec.magnitude
- local invSqrt = 1 / math.sqrt(lenSquared)
- return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
- end
- function onThrow()
- if thrown == true then return end
- thrown = true
- local character = Tool.Parent
- local humanoid = character.Humanoid
- if humanoid == nil then return end
- local targetPos = humanoid.TargetPoint
- Pull_Pin:Play()
- wait(.15)
- --Pull_pin() -- Pin will be pulled at the same time the anim shows the "pulling the pin" part.
- wait(.35)
- Throwing:Play()
- --Make_Nade()
- lob(targetPos)
- --wait(0)
- wait(.1)
- Throwing:Stop()
- Pull_Pin:Stop()
- wait(1)
- script.Parent.Handle.Transparency=0
- script.Parent.Part.Transparency=0
- thrown = false
- --script.Parent:Remove()
- end
- function onEquipped()
- local Pull = script.Parent.PullPin -- PULL PIN & THROW + ANIMATIONS!
- local Throw = script.Parent.Throwing
- Pull_Pin = script.Parent.Parent.Humanoid:LoadAnimation(Pull)
- Throwing = script.Parent.Parent.Humanoid:LoadAnimation(Throw)
- end
- function onUnequipped()
- end
- thrown = false
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
- Tool.Activated:connect(onThrow)
- end,o6)
- end))
- o7.Name = "WELD"
- o7.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- -- Created by Quenty (@Quenty, follow me on twitter).
- -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
- -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
- --[[ INSTRUCTIONS
- - Place in the model
- - Make sure model is anchored
- - That's it. It will weld the model and all children.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
- This script is designed to be used is a regular script. In a local script it will weld, but it will not attempt to handle ancestory changes.
- ]]
- --[[ DOCUMENTATION
- - Will work in tools. If ran more than once it will not create more than one weld. This is especially useful for tools that are dropped and then picked up again.
- - Will work in PBS servers
- - Will work as long as it starts out with the part anchored
- - Stores the relative CFrame as a CFrame value
- - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
- - Utilizes a recursive algorith to find all parts in the model
- - Will reweld on script reparent if the script is initially parented to a tool.
- - Welds as fast as possible
- ]]
- -- qPerfectionWeld.lua
- -- Created 10/6/2014
- -- Author: Quenty
- -- Version 1.0.3
- -- Updated 10/14/2014 - Updated to 1.0.1
- --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
- -- Updated 10/14/2014 - Updated to 1.0.2
- --- Fixed bug fix.
- -- Updated 10/14/2014 - Updated to 1.0.3
- --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
- local NEVER_BREAK_JOINTS = false -- If you set this to true it will never break joints (this can create some welding issues, but can save stuff like hinges).
- local function CallOnChildren(Instance, FunctionToCall)
- -- Calls a function on each of the children of a certain object, using recursion.
- FunctionToCall(Instance)
- for _, Child in next, Instance:GetChildren() do
- CallOnChildren(Child, FunctionToCall)
- end
- end
- local function GetNearestParent(Instance, ClassName)
- -- Returns the nearest parent of a certain class, or returns nil
- local Ancestor = Instance
- repeat
- Ancestor = Ancestor.Parent
- if Ancestor == nil then
- return nil
- end
- until Ancestor:IsA(ClassName)
- return Ancestor
- end
- local function GetBricks(StartInstance)
- local List = {}
- -- if StartInstance:IsA("BasePart") then
- -- List[#List+1] = StartInstance
- -- end
- CallOnChildren(StartInstance, function(Item)
- if Item:IsA("BasePart") then
- List[#List+1] = Item;
- end
- end)
- return List
- end
- local function Modify(Instance, Values)
- -- Modifies an Instance by using a table.
- assert(type(Values) == "table", "Values is not a table");
- for Index, Value in next, Values do
- if type(Index) == "number" then
- Value.Parent = Instance
- else
- Instance[Index] = Value
- end
- end
- return Instance
- end
- local function Make(ClassType, Properties)
- -- Using a syntax hack to create a nice way to Make new items.
- return Modify(Instance.new(ClassType), Properties)
- end
- local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
- local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
- local function HasWheelJoint(Part)
- for _, SurfaceName in pairs(Surfaces) do
- for _, HingSurfaceName in pairs(HingSurfaces) do
- if Part[SurfaceName].Name == HingSurfaceName then
- return true
- end
- end
- end
- return false
- end
- local function ShouldBreakJoints(Part)
- --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
- -- definitely some edge cases.
- if NEVER_BREAK_JOINTS then
- return false
- end
- if HasWheelJoint(Part) then
- return false
- end
- local Connected = Part:GetConnectedParts()
- if #Connected == 1 then
- return false
- end
- for _, Item in pairs(Connected) do
- if HasWheelJoint(Item) then
- return false
- elseif not Item:IsDescendantOf(script.Parent) then
- return false
- end
- end
- return true
- end
- local function WeldTogether(Part0, Part1, JointType, WeldParent)
- --- Weld's 2 parts together
- -- @param Part0 The first part
- -- @param Part1 The second part (Dependent part most of the time).
- -- @param [JointType] The type of joint. Defaults to weld.
- -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
- -- @return The weld created.
- JointType = JointType or "Weld"
- local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
- local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
- Modify(NewWeld, {
- Name = "qCFrameWeldThingy";
- Part0 = Part0;
- Part1 = Part1;
- C0 = CFrame.new();--Part0.CFrame:inverse();
- C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
- Parent = Part1;
- })
- if not RelativeValue then
- RelativeValue = Make("CFrameValue", {
- Parent = Part1;
- Name = "qRelativeCFrameWeldValue";
- Archivable = true;
- Value = NewWeld.C1;
- })
- end
- return NewWeld
- end
- local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
- -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
- -- @param MainPart The part to weld the model to (can be in the model).
- -- @param [JointType] The type of joint. Defaults to weld.
- -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
- for _, Part in pairs(Parts) do
- if ShouldBreakJoints(Part) then
- Part:BreakJoints()
- end
- end
- for _, Part in pairs(Parts) do
- if Part ~= MainPart then
- WeldTogether(MainPart, Part, JointType, MainPart)
- end
- end
- if not DoNotUnanchor then
- for _, Part in pairs(Parts) do
- Part.Anchored = false
- end
- MainPart.Anchored = false
- end
- end
- local function PerfectionWeld()
- local Tool = GetNearestParent(script, "Tool")
- local Parts = GetBricks(script.Parent)
- local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or script.Parent:IsA("Model") and script.Parent.PrimaryPart or Parts[1]
- if PrimaryPart then
- WeldParts(Parts, PrimaryPart, "Weld", false)
- else
- warn("qWeld - Unable to weld part")
- end
- return Tool
- end
- local Tool = PerfectionWeld()
- if Tool and script.ClassName == "Script" then
- --- Don't bother with local scripts
- script.Parent.AncestryChanged:connect(function()
- PerfectionWeld()
- end)
- end
- -- Created by Quenty (@Quenty, follow me on twitter).
- end,o7)
- end))
- o8.Name = "NadeScript"
- o8.Parent = o1
- o8.Disabled = true
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- script.Parent.ParticleEmitter.Enabled=true
- wait(3)
- local dud = math.random(1,10)
- if dud == 10 then
- script.Parent.ParticleEmitter.Enabled=false
- script.Parent.Activate2.Enabled=false
- script.Parent.Activate.Enabled=false
- script.Parent.dud.Enabled=true
- script.Parent.dudsound:play()
- wait(10)
- script.Parent.dud.Enabled=false
- wait(5)
- script.Parent:Remove()
- end
- script.Parent.Activate.Enabled=true
- script.LAAAAA:Play()
- script.Parent.zap.Enabled=true
- wait(2)
- script.Parent.ParticleEmitter.Enabled=false
- script.Parent.Activate2.Enabled=true
- script.Parent.Activate.Enabled=false
- script.Parent.Anchored=true
- script.Parent.Transparency=1
- script.LAAAAA:Stop()
- --IM FIRIN MA LASEOR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- a=script:GetChildren()
- for i=1,#a do
- if a[i].ClassName=="Sound" and a[i].Name~="LAAAAA" and a[i].Name~="Blam" then
- a[i]:Play()
- end
- end
- --big radius
- a=script.attract:Clone()
- a.Parent=script.Parent
- a.Disabled=false
- caca=script.magic:clone()
- caca.Parent=script.Parent
- caca.Enabled=true
- bc=Instance.new("Part")
- bc.TopSurface=0
- bc.BottomSurface=0
- bc.Anchored=false
- bc.CanCollide=false
- bc.formFactor="Custom"
- bc.Size=Vector3.new(1,1,1)
- bc.CFrame=CFrame.new(script.Parent.CFrame.p)*CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)
- bc.Name="poop"
- bc.BrickColor=BrickColor.new "White"
- ac=script.MAMAMesh:clone()
- ac.Parent = bc
- bc.Parent=game.Workspace
- --end radius thing
- --baca
- --bacamaca
- ba=Instance.new("Part")
- ba.TopSurface=0
- ba.BottomSurface=0
- ba.Anchored=false
- ba.CanCollide=false
- ba.formFactor="Custom"
- ba.Size=Vector3.new(1,0.1,1)
- ba.CFrame=CFrame.new(script.Parent.CFrame.p)*CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)
- ba.Name="Effect"
- ba.BrickColor=BrickColor.new "White"
- ao=script.RingMesh:clone()
- ao.Parent = ba
- ba.Parent=game.Workspace
- fo=Instance.new("BodyPosition")
- fo.maxForce= Vector3.new (99999999999999999,99999999999999999,99999999999999999)
- fo.position = ba.Position
- fo.Parent = ba
- aa=Instance.new("BodyAngularVelocity")
- aa.P=3000
- aa.maxTorque=aa.maxTorque*30
- aa.angularvelocity=Vector3.new(math.random(-70,70)/3,math.random(-70,70)/3,math.random(-70,70)/5)*100
- aa.Parent=ba
- -- spinning thing
- baa=Instance.new("Part")
- baa.TopSurface=0
- baa.BottomSurface=0
- baa.Anchored=false
- baa.CanCollide=false
- baa.formFactor="Custom"
- baa.Size=Vector3.new(1,0.1,1)
- baa.CFrame=CFrame.new(script.Parent.CFrame.p)*CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)
- baa.Name="Effect"
- baa.BrickColor=BrickColor.new "White"
- aao=script.RingMesh:clone()
- aao.Parent = baa
- baa.Parent=game.Workspace
- foo=Instance.new("BodyPosition")
- foo.maxForce= Vector3.new (99999999999999999,99999999999999999,99999999999999999)
- foo.position = baa.Position
- foo.Parent = baa
- aaa=Instance.new("BodyAngularVelocity")
- aaa.P=3000
- aaa.maxTorque=aaa.maxTorque*30
- aaa.angularvelocity=Vector3.new(math.random(-70,70)/3,math.random(-70,70)/3,math.random(-70,70)/5)*100
- aaa.Parent=baa
- --spinning thing 2
- baaa=Instance.new("Part")
- baaa.TopSurface=0
- baaa.BottomSurface=0
- baaa.Anchored=false
- baaa.CanCollide=false
- baaa.formFactor="Custom"
- baaa.Size=Vector3.new(1,0.1,1)
- baaa.CFrame=CFrame.new(script.Parent.CFrame.p)*CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)
- baaa.Name="Effect"
- baaa.BrickColor=BrickColor.new "White"
- aaao=script.RingMesh:clone()
- aaao.Parent = baaa
- baaa.Parent=game.Workspace
- fooo=Instance.new("BodyPosition")
- fooo.maxForce= Vector3.new (99999999999999999,99999999999999999,99999999999999999)
- fooo.position = baaa.Position
- fooo.Parent = baaa
- aaaa=Instance.new("BodyAngularVelocity")
- aaaa.P=3000
- aaaa.maxTorque=aaaa.maxTorque*30
- aaaa.angularvelocity=Vector3.new(math.random(-70,70)/3,math.random(-70,70)/3,math.random(-70,70)/5)*100
- aaaa.Parent=baaa
- --spinning thing 3
- c=Instance.new("Part")
- c.TopSurface=0
- c.BottomSurface=0
- c.Anchored=true
- c.CanCollide=false
- c.formFactor="Symmetric"
- c.Size=Vector3.new(1,1,1)
- c.CFrame=CFrame.new(script.Parent.CFrame.p)*CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)
- c.Name="Effect"
- c.BrickColor=BrickColor.new "Bright yellow"
- o=script.MAMAMesh:clone()
- o.Parent = c
- c.Parent=game.Workspace
- q=Instance.new("Part")
- q.TopSurface=0
- q.BottomSurface=0
- q.Anchored=true
- q.CanCollide=false
- q.formFactor="Symmetric"
- q.Size=Vector3.new(1,1,1)
- q.CFrame=CFrame.new(script.Parent.CFrame.p)*CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)
- q.Name="Effect2"
- q.BrickColor=BrickColor.new "Bright yellow"
- b=script.MAMAMesh:clone()
- b.Parent = q
- q.Parent=game.Workspace
- no =Instance.new ("PointLight")
- no.Range=60
- no.Brightness=9999999999999999999
- no.Parent=q
- e=Instance.new("Part")
- e.TopSurface=0
- e.BottomSurface=0
- e.Anchored=true
- e.CanCollide=false
- e.formFactor="Plate"
- e.Size=Vector3.new(20,.4,20)
- e.CFrame=CFrame.new(script.Parent.CFrame.p)*CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)
- e.Name="Effect die!!!"
- e.BrickColor=BrickColor.new "White"
- r=script.RingMesh:clone()
- r.Parent=e
- e.Parent=game.Workspace
- coroutine.resume(coroutine.create(function(mesh) for l=1, 180 do aaao.Parent.Transparency=l/180 aaao.Scale=aaao.Scale+Vector3.new(20/l,20/l,0.1) wait() end aaao.Parent.Parent=nil end),aaao)
- coroutine.resume(coroutine.create(function(mesh) for l=1, 180 do aao.Parent.Transparency=l/180 aao.Scale=aao.Scale+Vector3.new(20/l,20/l,0.1) wait() end aao.Parent.Parent=nil end),aao)
- coroutine.resume(coroutine.create(function(mesh) for l=1, 180 do ao.Parent.Transparency=l/180 ao.Scale=ao.Scale+Vector3.new(20/l,20/l,0.1) wait() end ao.Parent.Parent=nil end),ao)
- coroutine.resume(coroutine.create(function(mesh) for l=1, 50 do o.Parent.Transparency=l/90 o.Scale=o.Scale+Vector3.new(20/l,20/l,25) wait() end end),o)
- coroutine.resume(coroutine.create(function(mesh) for l=1, 50 do b.Parent.Transparency=l/50 b.Scale=b.Scale+Vector3.new(80/l,80/l,10) wait() end b.Parent.Parent=nil end),b)
- coroutine.resume(coroutine.create(function(mesh) for l=1, 60 do r.Parent.Transparency=l/60 r.Scale=r.Scale+Vector3.new(60/l,60/l,.02) wait() end r.Parent.Parent=nil end),r)
- coroutine.resume(coroutine.create(function(mesh) for l=1, 60 do ac.Parent.Transparency=l/20 ac.Scale=ac.Scale+Vector3.new(200/l,200/l,50) wait() end ac.Parent.Parent=nil end),ac)
- wait(1.4)
- coroutine.resume(coroutine.create(function(mesh) for l=1, 50 do o.Parent.Transparency=l/50 o.Scale=o.Scale+Vector3.new(-20/l,-20/l,30) wait() end o.Parent.Parent=nil end),o)
- wait(3)
- wait(4.5)
- script.Parent.attract.Disabled=true
- for i=1,5 do
- a=script.Blam:Clone()
- a.Parent=script
- a:play()
- game:GetService("Debris"):AddItem(a,6)
- end
- for i = 1,35 do
- local puff = Instance.new("Part")
- script.Parent.Anchored=true
- script.ya:clone().Parent=puff
- puff.CanCollide = false
- puff.Anchored = false
- puff.Name = "smoke"
- puff.Transparency = 1
- puff.BrickColor = BrickColor.new("New Yeller")
- puff.formFactor = "Custom"
- puff.TopSurface = 0
- puff.BottomSurface = 0
- puff.Size = Vector3.new(4,4,4)
- --[[ local erasee = script.smoke:clone()
- erasee.Parent = puff
- erasee.Enabled = true]]--
- local erase = script.Fade:clone()
- erase.Parent = puff
- erase.Disabled = false
- puff.Parent = game.Workspace
- --puff.Velocity= Vector3.new(math.random(0,800),math.random(-800,800),math.random(-800,800))
- puff.CFrame = script.Parent.CFrame + Vector3.new((math.random(-1,1)),(math.random(-1,1)),(math.random(-1,1)))
- local a = puff.Position
- local b = script.Parent.Position
- local dir = (a - b).unit
- puff.Velocity = dir * 50
- puff.Velocity = puff.Velocity+Vector3.new(0,math.random(20,150),0)
- end
- for i = 1,35 do
- local puff = Instance.new("Part")
- script.Parent.Anchored=true
- script.ya:clone().Parent=puff
- puff.CanCollide = false
- puff.Anchored = false
- puff.Name = "smoke2"
- puff.Transparency = 1
- puff.BrickColor = BrickColor.new("New Yeller")
- puff.formFactor = "Custom"
- puff.TopSurface = 0
- puff.BottomSurface = 0
- puff.Size = Vector3.new(4,4,4)
- --[[ local erasee = script.smoke:clone()
- erasee.Parent = puff
- erasee.Enabled = true]]--
- local erase = script.Fade:clone()
- erase.Parent = puff
- erase.Disabled = false
- puff.Parent = game.Workspace
- --puff.Velocity= Vector3.new(math.random(-800,800),math.random(-800,800),math.random(-800,800))
- puff.CFrame = script.Parent.CFrame + Vector3.new((math.random(-1,1)),(math.random(-1,1)),(math.random(-1,1)))
- local a = puff.Position
- local b = script.Parent.Position
- local dir = (a - b).unit
- puff.Velocity = dir*0
- puff.Velocity = puff.Velocity+Vector3.new(math.random(-250,250),0,math.random(-250,250))
- end
- for i = 1,25 do
- local puffa = Instance.new("Part")
- script.Parent.Anchored=true
- --script.ya:clone().Parent=puff
- puffa.CanCollide = false
- puffa.Anchored = false
- puffa.Name = "debris"
- puffa.Transparency = 0
- puffa.BrickColor = BrickColor.new("Brown")
- puffa.formFactor = "Custom"
- puffa.TopSurface = 0
- puffa.BottomSurface = 0
- puffa.Size = Vector3.new(math.random(0.6,3),math.random(0.6,3),math.random(0.6,3))
- game:GetService("Debris"):AddItem(puffa,5)
- puffa.Parent=game.Workspace
- puffa.CFrame = script.Parent.CFrame + Vector3.new((math.random(-1,1)),(math.random(-1,1)),(math.random(-1,1)))
- puffa.Velocity = puffa.Velocity+Vector3.new(math.random(-50,50),math.random(100,200),math.random(-50,50))
- puffa.RotVelocity = puffa.RotVelocity+Vector3.new(math.random(-50,50),math.random(100,200),math.random(-50,50))
- end
- function onPlayerBlownUp2(part)
- if part.Anchored==false then
- local f = Instance.new("Fire")
- f.Parent = part
- f.Size = part:getMass()
- f.Heat = part:getMass()
- a=script.fireableno:Clone()
- a.Parent=f
- a.Disabled=false
- game:GetService("Debris"):AddItem(f,15)
- end
- end
- script.Parent.Anchored=true
- script.Parent.Transparency=1
- local exp = Instance.new("Explosion")
- exp.BlastRadius = 180 --super wussy units
- exp.BlastPressure = 3000000 -- final bam
- exp.Position = script.Parent.Position
- exp.Parent = game.Workspace
- script.Parent.Anchored=true
- script.Parent.Transparency=1
- script.Parent.magic.Enabled=false
- exp.Hit:connect(function(part) onPlayerBlownUp2(part) end)
- script.Parent.Activate2.Enabled=false
- c=Instance.new("Part")
- c.TopSurface=0
- c.BottomSurface=0
- c.Anchored=true
- c.CanCollide=false
- c.formFactor="Symmetric"
- c.Size=Vector3.new(1,1,1)
- c.CFrame=CFrame.new(script.Parent.CFrame.p)*CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)
- c.Name="Effect"
- c.BrickColor=BrickColor.new "Bright yellow"
- o=script.MAMAMesh:clone()
- o.Parent = c
- c.Parent=game.Workspace
- e=Instance.new("Part")
- e.TopSurface=0
- e.BottomSurface=0
- e.Anchored=true
- e.CanCollide=false
- e.formFactor="Plate"
- e.Size=Vector3.new(20,.4,20)
- e.CFrame=CFrame.new(script.Parent.CFrame.p)*CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)
- e.Name="Effect die!!!"
- e.BrickColor=BrickColor.new "White"
- r=script.RingMesh:clone()
- r.Parent=e
- e.Parent=game.Workspace
- function onPlayerBlownUp(part)
- if part.Anchored==false then
- local b = part.Parent:findFirstChild("Humanoid")
- if b ~= nil then
- local a = game.Players:GetPlayerFromCharacter(b.Parent)
- if a~= nil then
- local lol = a.PlayerGui:findFirstChild("shake")
- if lol == nil then
- local ad = script.shake:Clone()
- ad.Parent=a.PlayerGui
- ad.Disabled=false
- local ad = script.Blur:Clone()
- ad.Disabled=false
- ad.Parent=a.PlayerGui
- end
- end
- end
- end
- end
- coroutine.resume(coroutine.create(function(mesh) for l=1, 60 do r.Parent.Transparency=l/60 r.Scale=r.Scale+Vector3.new(60/l,60/l,.02) wait() end r.Parent.Parent=nil end),r)
- coroutine.resume(coroutine.create(function(mesh) for l=1, 50 do o.Parent.Transparency=l/90 o.Scale=o.Scale+Vector3.new(20/l,20/l,250) wait() end end),o)
- script.Parent.zap.Enabled=false
- local a = Instance.new("Explosion")
- a.Position=script.Parent.Position
- a.Parent=game.Workspace
- a.BlastPressure=0
- a.BlastRadius=1000
- script.light.Disabled=false
- a.Hit:connect(function(part) onPlayerBlownUp(part) end)
- script.Parent.Activate2.Enabled=false
- local i = 0
- local x = script.Parent.Position.x
- local y = script.Parent.Position.y
- local z = script.Parent.Position.z
- for i = 1, 60,1 do
- local ex = Instance.new("Explosion")
- ex.Parent = script.Parent
- ex.Name = "Brick"
- ex.BlastPressure = 100000
- ex.BlastRadius = 900
- ex.DestroyJointRadiusPercent = 0.1
- ex.Position=Vector3.new(100*math.cos(math.rad(i*6)) + x, y, 100*math.sin(math.rad(i*6)) + z)
- ex.Hit:connect(function(part) onPlayerBlownUp(part) end)
- --wait()
- end
- wait(1.4)
- coroutine.resume(coroutine.create(function(mesh) for l=1, 50 do o.Parent.Transparency=l/50 o.Scale=o.Scale+Vector3.new(-20/l,-20/l,300) wait() end o.Parent.Parent=nil end),o)
- wait(15)
- script.Berserk:stop()
- script.Parent.Parent:Remove()
- end,o8)
- end))
- o9.Name = "Fade"
- o9.Parent = o8
- o9.Disabled = true
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- wait(3)
- a=script.Parent:FindFirstChild("Fire")
- if a ~= nil then
- a.Enabled=false
- end
- wait(2)
- script.Parent.Parent:remove()
- end,o9)
- end))
- o10.Name = "TMesh"
- o10.Parent = o8
- o10.MeshId = "http://www.roblox.com/asset/?id=1051557"
- o10.Scale = Vector3.new(12, 9, 12)
- o10.MeshType = Enum.MeshType.FileMesh
- o11.Name = "SpikeMesh"
- o11.Parent = o8
- o11.MeshId = "http://www.roblox.com/asset/?id=1033714"
- o11.Scale = Vector3.new(7, 16, 7)
- o11.MeshType = Enum.MeshType.FileMesh
- o12.Name = "Fade0"
- o12.Parent = o8
- o12.Disabled = true
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- wait()
- script.Parent.BrickColor = BrickColor.new("New Yeller")
- script.Parent.Transparency = script.Parent.Transparency + 0.05
- script.Parent.Mesh0.Scale = script.Parent.Mesh0.Scale + Vector3.new(0.92,0.92,0)
- wait(.01)
- script.Parent.BrickColor = BrickColor.new("New Yeller")
- script.Parent.Transparency = script.Parent.Transparency + 0.0
- script.Parent.Mesh0.Scale = script.Parent.Mesh0.Scale + Vector3.new(0.92,0.92,0.)
- wait(.01)
- script.Parent.BrickColor = BrickColor.new("Deep orange")
- script.Parent.Transparency = script.Parent.Transparency + 0.0
- script.Parent.Mesh0.Scale = script.Parent.Mesh0.Scale + Vector3.new(0.92,0.92,0)
- wait(.1)
- script.Parent.BrickColor = BrickColor.new("Deep orange")
- script.Parent.Transparency = script.Parent.Transparency + 0.0
- script.Parent.Mesh0.Scale = script.Parent.Mesh0.Scale + Vector3.new(0.94,0.942,0.)
- wait(.1)
- wait(.01)
- script.Parent.BrickColor = BrickColor.new("Deep orange")
- script.Parent.Transparency = script.Parent.Transparency + 0.05
- script.Parent.Mesh0.Scale = script.Parent.Mesh0.Scale + Vector3.new(0.943,0.943,0.)
- wait(.01)
- script.Parent.BrickColor = BrickColor.new("Deep orange")
- script.Parent.Transparency = script.Parent.Transparency + 0.0
- script.Parent.Mesh0.Scale = script.Parent.Mesh0.Scale + Vector3.new(0.943,0.943,0.)
- wait(.01)
- script.Parent.BrickColor = BrickColor.new("White")
- script.Parent.Transparency = script.Parent.Transparency + 0.0
- script.Parent.Mesh0.Scale = script.Parent.Mesh0.Scale + Vector3.new(0.943,0.943,0.)
- wait(.1)
- script.Parent.BrickColor = BrickColor.new("White")
- script.Parent.Transparency = script.Parent.Transparency + 0.00
- script.Parent.Mesh0.Scale = script.Parent.Mesh0.Scale + Vector3.new(0.943,0.943,0.)
- wait(.1)
- script.Parent.BrickColor = BrickColor.new("White")
- script.Parent.Transparency = script.Parent.Transparency + 0.08
- script.Parent.Mesh0.Scale = script.Parent.Mesh0.Scale + Vector3.new(0.943,0.943,0.)
- wait(.1)
- for i = 1,150 do
- script.Parent.Transparency = script.Parent.Transparency + 0.005
- script.Parent.Mesh0.Scale = script.Parent.Mesh0.Scale + Vector3.new(0.641,0.641,0.1)
- wait()
- end
- wait(1)
- script.Parent:remove()
- end,o12)
- end))
- o13.Name = "light"
- o13.Parent = o8
- o13.Disabled = true
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- print 'Hello world!'
- g=game.Lighting.Ambient.g
- b=game.Lighting.Ambient.b
- r=game.Lighting.Ambient.r
- local a = 1000/255
- game.Lighting.Ambient=Color3.new(r+a,g+a,b+a)
- wait(1)
- for i=1,100 do
- local a =10/255
- g=game.Lighting.Ambient.g
- b=game.Lighting.Ambient.b
- r=game.Lighting.Ambient.r
- game.Lighting.Ambient=Color3.new(r-a,g-a,b-a)
- wait(0.05)
- end
- end,o13)
- end))
- o14.Name = "Abscond"
- o14.Parent = o8
- o14.SoundId = "http://www.roblox.com/asset/?id=2767090"
- o14.Volume = 1
- o15.Name = "Berserk"
- o15.Parent = o8
- o15.SoundId = "rbxassetid://362846090"
- o15.Volume = 1
- o16.Name = "Break"
- o16.Parent = o8
- o16.Pitch = 0.75
- o16.SoundId = "http://www.roblox.com/asset/?id=3264793"
- o16.Volume = 1
- o17.Name = "Curse"
- o17.Parent = o8
- o17.Pitch = 0.40000000596046
- o17.SoundId = "http://www.roblox.com/asset/?id=13775494"
- o17.Volume = 1
- o18.Name = "DBC"
- o18.Parent = o8
- o18.Pitch = 0.55000001192093
- o18.SoundId = "http://www.roblox.com/asset/?id=2101137"
- o18.Volume = 1
- o19.Name = "DBCha"
- o19.Parent = o8
- o19.Pitch = 0.30000001192093
- o19.SoundId = "http://www.roblox.com/asset/?id=2101137"
- o19.Volume = 1
- o20.Name = "DBExplode"
- o20.Parent = o8
- o20.SoundId = "rbxassetid://204032720"
- o20.Volume = 1
- o21.Name = "DCHHIT"
- o21.Parent = o8
- o21.Pitch = 0.5
- o21.SoundId = "http://www.roblox.com/asset/?id=2801263"
- o21.Volume = 1
- o22.Name = "DS"
- o22.Parent = o8
- o22.Pitch = 0.69999998807907
- o22.SoundId = "http://www.roblox.com/asset/?id=2691586"
- o22.Volume = 1
- o23.Name = "DSHit"
- o23.Parent = o8
- o23.Pitch = 1.5
- o23.SoundId = "http://www.roblox.com/asset/?id=2101148"
- o23.Volume = 1
- o24.Name = "Defile"
- o24.Parent = o8
- o24.Pitch = 1.125
- o24.SoundId = "http://www.roblox.com/asset/?id=3264923"
- o24.Volume = 1
- o25.Name = "Elec"
- o25.Parent = o8
- o25.Pitch = 0.69999998807907
- o25.SoundId = "http://www.roblox.com/asset/?id=2800815"
- o25.Volume = 1
- o26.Name = "GB1"
- o26.Parent = o8
- o26.Pitch = 0.69999998807907
- o26.SoundId = "http://www.roblox.com/asset?id=1369158"
- o26.Volume = 1
- o27.Name = "GB2"
- o27.Parent = o8
- o27.Pitch = 0.80000001192093
- o27.SoundId = "http://www.roblox.com/asset/?id=2974000"
- o27.Volume = 1
- o28.Name = "GB3"
- o28.Parent = o8
- o28.Pitch = 0.20000000298023
- o28.SoundId = "http://www.roblox.com/asset/?id=12222124"
- o28.Volume = 1
- o29.Name = "GB4"
- o29.Parent = o8
- o29.Pitch = 0.64999997615814
- o29.SoundId = "http://www.roblox.com/asset/?id=2974249"
- o29.Volume = 1
- o30.Name = "Imbue"
- o30.Parent = o8
- o30.SoundId = "http://www.roblox.com/asset/?id=2785493"
- o30.Volume = 1
- o31.Name = "LAAAAA"
- o31.Parent = o8
- o31.SoundId = "rbxassetid://643035411"
- o31.Volume = 5
- o32.Name = "BlastMesh"
- o32.Parent = o8
- o32.MeshId = "http://www.roblox.com/asset/?id=20329976"
- o32.Scale = Vector3.new(1, 0.100000001, 1)
- o32.MeshType = Enum.MeshType.FileMesh
- o33.Name = "CYMesh"
- o33.Parent = o8
- o33.Scale = Vector3.new(12, 9, 12)
- o33.MeshType = Enum.MeshType.Cylinder
- o34.Name = "MAMAMesh"
- o34.Parent = o8
- o34.MeshType = Enum.MeshType.Sphere
- o35.Name = "RingMesh"
- o35.Parent = o8
- o35.MeshId = "http://www.roblox.com/asset/?id=3270017"
- o35.Scale = Vector3.new(0.100000001, 0.100000001, 0.100000001)
- o35.MeshType = Enum.MeshType.FileMesh
- o36.Name = "magic"
- o36.Parent = o8
- o36.Size = NumberSequence.new(10,2.6875,0)
- o36.Color = ColorSequence.new(Color3.new(1, 1, 0),Color3.new(1, 1, 1))
- o36.Enabled = false
- o36.LightEmission = 10000
- o36.Texture = "http://www.roblox.com/asset/?id=241650934"
- o36.ZOffset = 3
- o36.Lifetime = NumberRange.new(0.5,2)
- o36.Rate = 10000000000
- o36.RotSpeed = NumberRange.new(-280,280)
- o36.Speed = NumberRange.new(0,0)
- o36.VelocitySpread = 360
- o37.Name = "attractO"
- o37.Parent = o8
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- function onPlayerBlownUp(part, distance, creator)
- if part.Anchored==false then
- aa= script.gotopos:Clone()
- aa.Disabled=false
- aa.Value.Value=script.Parent.Position
- aa.Parent=part
- game:GetService("Debris"):AddItem(aa,10)
- local b = part.Parent:findFirstChild("Humanoid")
- local c = part.Parent:findFirstChild("Humanoid")
- if b == nil and c == nil then
- local a = math.random(1,7)
- if a == 1 then
- part:BreakJoints()
- end
- end
- end
- end
- local a = Instance.new("Explosion")
- a.Position=script.Parent.Position
- a.Parent=game.Workspace
- a.BlastPressure=0
- a.BlastRadius=200
- a.Hit:connect(function(part, distance) onPlayerBlownUp(part, distance) end)
- end,o37)
- end))
- o38.Name = "gotopos"
- o38.Parent = o37
- o38.Disabled = true
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- print 'Hello world!'
- local b = script.Value.Value
- while true do
- wait(0.1)
- local a = script.Parent.Position
- local dir = (a - b).unit
- dir=dir*-1
- script.Parent.Velocity = dir*30
- end
- end,o38)
- end))
- o39.Parent = o38
- o40.Name = "Blam"
- o40.Parent = o8
- o40.SoundId = "rbxassetid://193444173"
- o40.Volume = 1
- o41.Name = "smoke"
- o41.Parent = o8
- o41.Size = UDim2.new(7.5,0,7.5,0)
- o41.Enabled = false
- o42.Parent = o41
- o42.Position = UDim2.new(-3.5,0,-3.5,0)
- o42.Size = UDim2.new(8,0,8,0)
- o42.Position = UDim2.new(-3.5,0,-3.5,0)
- o42.BackgroundColor3 = Color3.new(1, 1, 1)
- o42.BackgroundTransparency = 1
- o42.BorderSizePixel = 0
- o42.Image = "http://www.roblox.com/asset/?id=31727915"
- o43.Parent = o42
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- while true do
- script.Parent.Rotation = script.Parent.Rotation+1
- wait(0.1)
- end
- end,o43)
- end))
- o44.Name = "ya"
- o44.Parent = o8
- o44.force = Vector3.new(0, 8790, 0)
- o45.Name = "fireableno"
- o45.Parent = o8
- o45.Disabled = true
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- print 'Hello world!'
- wait(10)
- script.Parent.Enabled=false
- end,o45)
- end))
- o46.Name = "attract"
- o46.Parent = o8
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- local hole = script.Parent
- local childList = {}
- local massConstant = 5.8 -- Generally a good value
- local mass = 40000 * massConstant
- -- This is basically a function that finds all unanchored parts and adds them to childList.
- -- Note: This should only be run once for each object
- function checkObject(obj)
- if (obj ~= hole) and (obj.className == "Part") then
- if (obj.Anchored == false) then
- table.insert(childList, 1, obj)
- end
- elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then
- local child = obj:GetChildren()
- for x = 1, #child do
- checkObject(child[x])
- end
- obj.ChildAdded:connect(checkObject)
- end
- end
- checkObject(workspace)
- print("Black Hole script loaded.")
- local n = 0
- while true do
- if n < #childList then
- n = n + 1
- if n % 800 == 0 then
- wait(0.5)
- end
- else
- n = 1
- wait(0.5)
- end
- local child = childList[n]
- if (child ~= hole) and (child.className == "Part") and (child.Anchored == false) then
- local relPos = hole.Position - child.Position
- local motivator = child:FindFirstChild("BlackHole Influence")
- if relPos.magnitude * 350 * massConstant < mass then
- local a = math.random(1,25)
- if a == 1 and child.Parent:findFirstChild("Humanoid") == nil then
- child:BreakJoints()
- end
- if (relPos.magnitude * 320 * massConstant < mass) and (child.Size.z + hole.Size.x > relPos.magnitude * 2 - 4) then
- mass = mass + child:GetMass()
- -- child:Remove()
- table.remove(childList, n)
- n = n - 1 -- This is the reason I need a counter of my own design
- else
- -- child.CanCollide = false -- I Can assume that things won't escape the black hole.
- if motivator == nil then
- motivator = Instance.new("BodyPosition")
- motivator.Parent = child
- game:GetService("Debris"):AddItem(motivator,0.4)
- motivator.Name = "BlackHole Influence"
- end
- if child.Parent:findFirstChild("Humanoid") ~= nil then
- motivator.position = hole.Position
- motivator.maxForce = Vector3.new(1000, 1000, 1000)-- * mass * child:GetMass() / (relPos.magnitude * massConstant)
- motivator:remove()
- local posfind = child.Parent:findFirstChild("Torso")
- if posfind ~= nil then
- local posfind2 = posfind:findFirstChild("gotopos")
- if posfind2== nil then
- aa= script.gotopos:Clone()
- aa.Disabled=false
- game:GetService("Debris"):AddItem(aa,10)
- aa.Value.Value=script.Parent.Position
- aa.Parent=child.Parent.Torso
- end
- end
- else
- motivator.position = hole.Position
- motivator.maxForce = Vector3.new(1500, 1500, 1500)-- * mass * child:GetMass() / (relPos.magnitude * massConstant)
- end
- end
- elseif motivator ~= nil then
- motivator:Remove()
- end
- end
- end
- end,o46)
- end))
- o47.Name = "gotopos"
- o47.Parent = o46
- o47.Disabled = true
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- print 'Hello world!'
- local b = script.Value.Value
- while true do
- wait(0.1)
- local a = script.Parent.Position
- local dir = (a - b).unit
- dir=dir*-1
- script.Parent.Velocity = dir*30
- end
- end,o47)
- end))
- o48.Parent = o47
- o49.Name = "Handle"
- o49.Parent = o1
- o49.Size = Vector3.new(4, 1, 2)
- o50.Name = "Blam"
- o50.Parent = o49
- o50.Pitch = 0.89999997615814
- o50.SoundId = "rbxassetid://164012897"
- o50.Volume = 1
- o51.Name = "Throw"
- o51.Parent = o49
- o51.SoundId = "http://www.roblox.com/asset/?id=18426149"
- o51.Volume = 1
- o52.Name = "dudsound"
- o52.Parent = o49
- o52.SoundId = "rbxassetid://148635119"
- o52.Volume = 1
- o53.Name = "Activate"
- o53.Parent = o49
- o53.Size = NumberSequence.new(2,0.1875,0)
- o53.Color = ColorSequence.new(Color3.new(1, 1, 0),Color3.new(1, 1, 0))
- o53.Enabled = false
- o53.LightEmission = 1
- o53.Texture = "http://www.roblox.com/asset/?id=241650934"
- o53.Lifetime = NumberRange.new(0.20000000298023,0.60000002384186)
- o53.Rate = 100000
- o53.Speed = NumberRange.new(10,10)
- o53.VelocitySpread = 360
- o54.Name = "Activate2"
- o54.Parent = o49
- o54.Size = NumberSequence.new(2,0.1875,0.062499601393938,10)
- o54.Color = ColorSequence.new(Color3.new(1, 1, 0),Color3.new(1, 1, 0))
- o54.Enabled = false
- o54.LightEmission = 1
- o54.Texture = "http://www.roblox.com/asset/?id=241650934"
- o54.Lifetime = NumberRange.new(3,3)
- o54.Rate = 100000
- o54.Speed = NumberRange.new(10,10)
- o54.VelocitySpread = 360
- o55.Parent = o49
- o55.Size = NumberSequence.new(2,0.1875,0)
- o55.Color = ColorSequence.new(Color3.new(1, 1, 0),Color3.new(1, 1, 0))
- o55.Enabled = false
- o55.LightEmission = 1
- o55.Texture = "http://www.roblox.com/asset/?id=241650934"
- o55.Lifetime = NumberRange.new(0.20000000298023,0.60000002384186)
- o55.Rate = 100000
- o55.Speed = NumberRange.new(0,0)
- o56.Name = "dud"
- o56.Parent = o49
- o56.Transparency = NumberSequence.new(0,0.98749995231628)
- o56.Size = NumberSequence.new(0,3.875,4.9375,7.3125)
- o56.Color = ColorSequence.new(Color3.new(0.639216, 0.635294, 0.647059),Color3.new(0.639216, 0.635294, 0.647059))
- o56.Enabled = false
- o56.Texture = "rbxasset://textures/particles/smoke_main.dds"
- o56.Acceleration = Vector3.new(0, 1, 0)
- o56.Lifetime = NumberRange.new(5,5)
- o56.Rate = 10
- o56.RotSpeed = NumberRange.new(0,10)
- o56.Speed = NumberRange.new(0,0)
- o56.VelocitySpread = 10
- o57.Name = "zap"
- o57.Parent = o49
- o57.Transparency = NumberSequence.new(0.89999997615814,0.89999997615814)
- o57.Rotation = NumberRange.new(-360,360)
- o57.Size = NumberSequence.new(1.0429400205612,8.9375,0,8.875,0,8.9375,0,8.875,0.030674900859594,9.0625,0,8.875,0,9,0,8.375)
- o57.Color = ColorSequence.new(Color3.new(1, 1, 0),Color3.new(1, 1, 1))
- o57.Enabled = false
- o57.LightEmission = 1
- o57.Texture = "http://www.roblox.com/asset/?id=243098098"
- o57.Lifetime = NumberRange.new(0.20000000298023,0.20000000298023)
- o57.Rate = 250
- o57.Speed = NumberRange.new(0,0)
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = script
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement