Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Converted using Mokiros's Model to Script plugin
- -- Converted string size: 3331
- local genv={}
- local Scripts = {
- function() function fire(spn)
- local missile = script.Parent.Rocket:clone()
- missile.CFrame = spn.CFrame * CFrame.new(0, 0, -6)
- local creator_tag = Instance.new("ObjectValue")
- creator_tag.Value = game.Players.LocalPlayer
- creator_tag.Name = "creator"
- creator_tag.Parent = missile
- missile.Kill.Disabled = false
- missile.Transparency = 0
- missile.Light.Light.Visible = true
- missile.RocketScript.Disabled = false
- script.Parent.Rocket.PewPew:play()
- missile.Parent = game.Workspace
- script.Parent.Flash.Light.Light.Visible = true
- wait(0.1)
- script.Parent.Flash.Light.Light.Visible = false
- end
- while true do
- wait(math.random(0.5,1))
- fire(script.Parent.Torso)
- end
- end;
- function() function onTouched(part)
- local hum = part.Parent:FindFirstChild("Humanoid")
- if (hum ~= nil) then
- hum.Health = hum.Health - 20
- script.Parent.Parent = nil
- elseif part.Name == "Projectile" then
- --blah
- else
- script.Parent.Parent = nil
- end
- end
- script.Parent.Touched:connect(onTouched) end;
- function() gun = script.Parent
- local velo = Instance.new("BodyVelocity")
- velo.Parent = script.Parent
- velo.velocity = gun.CFrame:vectorToWorldSpace(Vector3.new(0,0,-500))
- wait(5)
- script.Parent.Parent = nil end;
- function() script.Parent.Adornee = script.Parent.Parent end;
- function() human = script.Parent:findFirstChild("Humanoid")
- if human == nil then human = script.Parent:findFirstChild("Zombie") end
- if script.Parent.archivable == false then script.Parent.archivable = true end
- robo=script.Parent:clone()
- robo.Parent = game.Lighting
- player = game.Players:playerFromCharacter(script.Parent)
- if player ~= nil then robo:findFirstChild(script.Name):remove() end
- while true do
- wait(5)
- if human.Health<1 then
- robot=robo:clone()
- robot.Parent=script.Parent.Parent
- robot:makeJoints()
- wait(.1)
- player = game.Players:playerFromCharacter(script.Parent)
- if player ~= nil then player.Character = robot end
- robo:remove()
- script.Parent:remove()
- end
- end
- end;
- function() local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- local wanderTarget
- local wanderAngle
- local wanderConeSize = 6
- local maxWanderAngle = 0.75
- function getWanderTarget()
- math.random(tick())
- wanderAngle = (math.random() - 0.5) * maxWanderAngle
- rotatedLookVector = CFrame.Angles(0, wanderAngle, 0) * script.Parent.Torso.CFrame.lookVector
- return (script.Parent.Torso.Position + wanderConeSize * rotatedLookVector)
- end
- function fire(spn)
- local missile = script.Parent.Rocket:clone()
- missile.CFrame = spn.CFrame * CFrame.new(0, 0, -6)
- local creator_tag = Instance.new("ObjectValue")
- creator_tag.Value = game.Players.LocalPlayer
- creator_tag.Name = "creator"
- creator_tag.Parent = missile
- missile.Kill.Disabled = false
- missile.Transparency = 0
- missile.Light.Light.Visible = true
- missile.RocketScript.Disabled = false
- script.Parent.Rocket.PewPew:play()
- missile.Parent = game.Workspace
- script.Parent.Flash.Light.Light.Visible = true
- wait(0.1)
- script.Parent.Flash.Light.Light.Visible = false
- end
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 200
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Right Arm")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- human = script.Parent:findFirstChild("Humanoid")
- if human == nil then human = script.Parent:findFirstChild("Zombie") end
- while true do
- wait(math.random(0.5,1))
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- fire(script.Parent.Torso)
- human:MoveTo(target.Position, target)
- human.TargetPoint = target.Position
- else
- wanderTarget = getWanderTarget()
- human:MoveTo(wanderTarget, script.Parent.Torso)
- end
- end
- end;
- function() script.Parent.Adornee = script.Parent.Parent end;
- function() function onTouched(part)
- local hum = part.Parent:FindFirstChild("Humanoid")
- if (hum ~= nil) then
- hum.Health = hum.Health - 10
- end
- end
- script.Parent.Touched:connect(onTouched) end;
- function() function onTouched(part)
- local hum = part.Parent:FindFirstChild("Humanoid")
- if (hum ~= nil) then
- hum.Health = hum.Health - 10
- end
- end
- script.Parent.Touched:connect(onTouched) end;
- function() Character = script.Parent
- Zombie = Character.Zombie
- Torso = Character.Torso
- function OnDeath()
- print("Death")
- Zombie.Parent = nil
- if Torso then
- local Head = Character:FindFirstChild("Head")
- if Head then
- local Neck = Instance.new("Weld")
- Neck.Name = "Neck"
- Neck.Part0 = Torso
- Neck.Part1 = Head
- Neck.C0 = CFrame.new(0, 1.5, 0)
- Neck.C1 = CFrame.new()
- Neck.Parent = Torso
- end
- local Limb = Character:FindFirstChild("Right Arm")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightShoulder"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Left Arm")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftShoulder"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Right Leg")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightHip"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Left Leg")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftHip"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- --[
- local Bar = Instance.new("Part")
- Bar.TopSurface = 0
- Bar.BottomSurface = 0
- Bar.formFactor = "Symmetric"
- Bar.Size = Vector3.new(1, 1, 1)
- Bar.Transparency = 1
- Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
- Bar.Parent = Character
- local Weld = Instance.new("Weld")
- Weld.Part0 = Torso
- Weld.Part1 = Bar
- Weld.C0 = CFrame.new(0, 0.5, 0)
- Weld.Parent = Torso
- --]]
- end
- end
- Zombie.Died:connect(OnDeath)
- end;}local ActualScripts = {}
- function s(var)
- local func = table.remove(Scripts,1)
- setfenv(func,setmetatable({script=var,require=fake_require or require,global=genv},{
- __index = getfenv(func),
- }))
- table.insert(ActualScripts,coroutine.wrap(func))
- end
- Decode = function(str,t,props,classes,values,ICList,Model,CurPar,LastIns,split,RemoveAndSplit,InstanceList)
- local tonum,table_remove,inst,parnt,comma,table_foreach = tonumber,table.remove,Instance.new,"Parent",",",
- function(t,f)
- for a,b in pairs(t) do
- f(a,b)
- end
- end
- local Types = {
- Color3 = Color3.new,
- Vector3 = Vector3.new,
- Vector2 = Vector2.new,
- UDim = UDim.new,
- UDim2 = UDim2.new,
- CFrame = CFrame.new,
- Rect = Rect.new,
- NumberRange = NumberRange.new,
- BrickColor = BrickColor.new,
- PhysicalProperties = PhysicalProperties.new,
- NumberSequence = function(...)
- local a = {...}
- local t = {}
- repeat
- t[#t+1] = NumberSequenceKeypoint.new(table_remove(a,1),table_remove(a,1),table_remove(a,1))
- until #a==0
- return NumberSequence.new(t)
- end,
- ColorSequence = function(...)
- local a = {...}
- local t = {}
- repeat
- t[#t+1] = ColorSequenceKeypoint.new(table_remove(a,1),Color3.new(table_remove(a,1),table_remove(a,1),table_remove(a,1)))
- until #a==0
- return ColorSequence.new(t)
- end,
- number = tonumber,
- boolean = function(a)
- return a=="1"
- end
- }
- split = function(str,sep)
- if not str then return end
- local fields = {}
- local ConcatNext = false
- str:gsub(("([^%s]+)"):format(sep),function(c)
- if ConcatNext == true then
- fields[#fields] = fields[#fields]..sep..c
- ConcatNext = false
- else
- fields[#fields+1] = c
- end
- if c:sub(#c)=="\\" then
- c = fields[#fields]
- fields[#fields] = c:sub(1,#c-1)
- ConcatNext = true
- end
- end)
- return fields
- end
- RemoveAndSplit = function(t)
- return split(table_remove(t,1),comma)
- end
- t = split(str,";")
- props = RemoveAndSplit(t)
- classes = RemoveAndSplit(t)
- values = split(table_remove(t,1),'|')
- ICList = RemoveAndSplit(t)
- InstanceList = {}
- Model = inst"Model"
- CurPar = Model
- table_foreach(t,function(ct,c)
- if c=="n" or c=="p" then
- CurPar = c=="n" and LastIns or CurPar[parnt]
- else
- ct = split(c,"|")
- local class = classes[tonum(table_remove(ct,1))]
- if class=="UnionOperation" then
- LastIns = {UsePartColor="1"}
- else
- LastIns = inst(class)
- if LastIns:IsA"Script" then
- s(LastIns)
- elseif LastIns:IsA("ModuleScript") then
- ms(LastIns)
- end
- end
- local function SetProperty(LastIns,p,str,s)
- s = Types[typeof(LastIns[p])]
- if p=="CustomPhysicalProperties" then
- s = PhysicalProperties.new
- end
- if s then
- LastIns[p] = s(unpack(split(str,comma)))
- else
- LastIns[p] = str
- end
- end
- local UnionData
- table_foreach(ct,function(s,p,a,str)
- a = p:find":"
- p,str = props[tonum(p:sub(1,a-1))],values[tonum(p:sub(a+1))]
- if p=="UnionData" then
- UnionData = split(str," ")
- return
- end
- if class=="UnionOperation" then
- LastIns[p] = str
- return
- end
- SetProperty(LastIns,p,str)
- end)
- if UnionData then
- local LI_Data = LastIns
- LastIns = DecodeUnion(UnionData)
- table_foreach(LI_Data,function(p,str)
- SetProperty(LastIns,p,str)
- end)
- end
- table.insert(InstanceList,LastIns)
- LastIns[parnt] = CurPar
- end
- end)
- table_remove(ICList,1)
- table_foreach(ICList,function(a,b)
- b = split(b,">")
- InstanceList[tonum(b[1])][props[tonum(b[2])]] = InstanceList[tonum(b[3])]
- end)
- return Model:GetChildren()
- end
- local Objects = Decode('Name,Position,Orientation,Size,TopSurface,Scale,MeshId,TextureId,MeshType,C0,C1,Part0,Part1,Color,LeftSurface,RightSurface,Velocity,MaxForce,CanCollide,BottomSurface,Transparency,BackSurface,FrontSurf'
- ..'ace,Volume,PlayOnRemove,PlaybackSpeed,SoundId,BackgroundColor3,BackgroundTransparency,Visible,Image,NameOcclusion,WalkSpeed,HeadColor3,LeftArmColor3,RightArmColor3,LeftLegColor3,RightLegColor3,TorsoCo'
- ..'lor3;Part,Model,SpecialMesh,Snap,Weld,BodyVelocity,Script,Sound,BillboardGui,ImageLabel,Humanoid,BodyColors,IntValue,ObjectValue;Part|Enemy Trooper|Head|-2.6383,4.6,17.5173|0,180,0|2,1.2,1|0|2.0599,2.'
- ..'0599,2.3299|http://www.roblox.com/asset/?id=90247974|http://www.roblox.com/asset/?id=123282811|5|0,-0.6001,0,1,0,0,-0,-0,-1,0,1,0|0,0.9999,0,1,0,0,0,0,-1,0,1,0|1,0,0,0,0,1,0,1,0,-1,-0,-0|-0.5,0.3999,0'
- ..',0,0,1,0,1,0,-1,0,0|Torso|0.898,0.8941,0.8745|-2.6383,3,17.5173|2,2,1|2|Jump|0,0,0|rbxassetid://90245580|rbxassetid://123284621|Left Leg|-2.1383,1,17.5173|1,2,1|0|rbxassetid://90245529|0,1,0,-1,-0,-0,'
- ..'0,0,1,0,1,0|-0.5,-1.0001,0,-1,0,0,0,0,1,0,1,0|Right Leg|-3.1383,1,17.5173|rbxassetid://90245558|0.5,-1.0001,0,-1,0,0,0,0,1,0,1,0|Fire|Rocket|0,1,1|1|-4.1383,4.2,17.5173|1,0.4,1|Swoosh|Explosion|2|http'
- ..'://www.roblox.com/asset/?id=22968437|PewPew|0.8212|http://www.roblox.com/asset/?id=166196530|0.5,0.5,0.6999|http://www.roblox.com/asset/?id=2697549|Kill|RocketScript|Light|3,0,1.5,0|1,0,1,0|0.8666,0.8'
- ..'627,0.8745|rbxassetid://75236945|0,-0.2001,0,1,0,0,-0,-0,-1,0,1,0|0,0.5,-0.5,1,0,0,0,1,0,0,0,1|Left Arm|-1.1383,3,17.5173|rbxassetid://90245512|0.5,0,0,0,0,1,0,1,0,-1,-0,-0|-1,0,0,0,0,1,0,1,0,-1,0,0|Z'
- ..'ombie|17|Respawn|0.6392,0.6352,0.647|Mode|IsNZ|Move|Flash|0.0666,0.0666,0.0666|-4.1383,4,21.0173|1,0.8,2|2,0,2,0|0.8705,0.8666,0.8784|0,0,-1,-1,-0,-0,0,1,0,-0,-0,-1|0,0,-0.5,1,0,0,0,1,0,0,0,1|Right Ar'
- ..'m|-4.1383,3.5,18.0173|90,180,0|rbxassetid://90245542|-0.5,0,0,-0,-0,-1,0,1,0,1,0,0|1,0.5,-0.5,0,0,-1,-1,0,0,0,1,0|0,-1,0,1,0,0,-0,-0,-1,0,1,0|0,-0.5001,0.5,1,0,0,0,-1,0,0,0,-1|Blaster|-4.1383,4,19.517'
- ..'3|1.2999,1.2999,1.2999|http://www.roblox.com/asset/?id=90651205|Ragdoll;0,4>12>2,4>13>6,5>12>2,5>13>16,11>12>9,11>13>6,14>12>12,14>13>6,26>12>16,26>13>42,29>12>27,29>13>6,41>12>36,41>13>46,44>12>42,44'
- ..'>13>6,45>12>42,45>13>46;2|1:2;n;1|1:3|2:4|3:5|4:6|5:7;n;3|6:8|7:9|8:10|9:11;4|10:12|11:13;5|10:14|11:15;p;1|1:16|14:17|2:18|3:5|4:19|15:20|16:20|14:17|14:17;n;6|1:21|17:22|18:22;3|7:23|8:24|9:11;p;1|1'
- ..':25|2:26|3:5|4:27|19:28|20:7;n;3|7:29|8:24|9:11;4|10:30|11:31;p;1|1:32|2:33|3:5|4:27|19:28|20:7;n;3|7:34|8:24|9:11;4|10:30|11:35;p;7|1:36;1|1:37|14:38|21:39|2:40|3:5|4:41|22:20|20:20|23:20|15:20|16:20'
- ..'|5:20|14:38|14:38;n;8|1:42|24:39;8|1:43|25:39|26:44|27:45;8|1:46|25:39|26:47|27:48|24:39;3|6:49|7:50|9:11;7|1:51;7|1:52;9|1:53|4:54;n;10|1:53|4:55|28:56|29:39|30:28|31:57;7;p;5|10:58|11:59;p;1|1:60|2:'
- ..'61|3:5|4:27|19:28|22:20|20:20|23:20|15:20|16:20|5:20;n;3|7:62|8:24|9:11;5|10:63|11:64;p;11|1:65|32:7|33:66;7|1:67;12|34:68|35:68|36:68|37:68|38:68|39:17;13|1:69;14|1:70;7|1:71;1|1:72|14:73|21:39|2:74|'
- ..'4:75|19:28|14:73|14:73;n;9|1:53|4:76;n;10|1:53|4:55|28:77|29:39|30:28|31:57;7;p;7|1:51;5|10:78|11:79;p;1|1:80|2:81|3:82|4:27|19:28|22:20|20:20|23:20|15:20|16:20|5:20;n;3|7:83|8:24|9:11;5|10:84|11:85;5'
- ..'|10:86|11:87;p;1|1:88|14:73|2:89|3:5|4:27|22:20|20:20|23:20|15:20|16:20|5:20|14:73|14:73;n;7|1:51;3|6:90|7:91|8:10|9:11;p;7|1:92;p;')
- for _,Object in pairs(Objects) do
- Object.Parent = script and script.Parent==workspace and script or workspace
- end
- for _,f in pairs(ActualScripts) do f() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement