Advertisement
lafur

Untitled

May 23rd, 2020
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.88 KB | None | 0 0
  1. -- Converted using Mokiros's Model to Script plugin
  2. -- Converted string size: 3331
  3. local genv={}
  4. local Scripts = {
  5. function() function fire(spn)
  6. local missile = script.Parent.Rocket:clone()
  7. missile.CFrame = spn.CFrame * CFrame.new(0, 0, -6)
  8. local creator_tag = Instance.new("ObjectValue")
  9. creator_tag.Value = game.Players.LocalPlayer
  10. creator_tag.Name = "creator"
  11. creator_tag.Parent = missile
  12. missile.Kill.Disabled = false
  13. missile.Transparency = 0
  14. missile.Light.Light.Visible = true
  15. missile.RocketScript.Disabled = false
  16. script.Parent.Rocket.PewPew:play()
  17. missile.Parent = game.Workspace
  18. script.Parent.Flash.Light.Light.Visible = true
  19. wait(0.1)
  20. script.Parent.Flash.Light.Light.Visible = false
  21. end
  22. while true do
  23.  
  24.  
  25. wait(math.random(0.5,1))
  26. fire(script.Parent.Torso)
  27.  
  28.  
  29. end
  30.  
  31.  
  32. end;
  33. function() function onTouched(part)
  34. local hum = part.Parent:FindFirstChild("Humanoid")
  35. if (hum ~= nil) then
  36. hum.Health = hum.Health - 20
  37. script.Parent.Parent = nil
  38. elseif part.Name == "Projectile" then
  39. --blah
  40. else
  41. script.Parent.Parent = nil
  42. end
  43. end
  44. script.Parent.Touched:connect(onTouched) end;
  45. function() gun = script.Parent
  46. local velo = Instance.new("BodyVelocity")
  47. velo.Parent = script.Parent
  48. velo.velocity = gun.CFrame:vectorToWorldSpace(Vector3.new(0,0,-500))
  49. wait(5)
  50. script.Parent.Parent = nil end;
  51. function() script.Parent.Adornee = script.Parent.Parent end;
  52. function() human = script.Parent:findFirstChild("Humanoid")
  53. if human == nil then human = script.Parent:findFirstChild("Zombie") end
  54.  
  55. if script.Parent.archivable == false then script.Parent.archivable = true end
  56. robo=script.Parent:clone()
  57. robo.Parent = game.Lighting
  58.  
  59. player = game.Players:playerFromCharacter(script.Parent)
  60. if player ~= nil then robo:findFirstChild(script.Name):remove() end
  61.  
  62. while true do
  63. wait(5)
  64. if human.Health<1 then
  65. robot=robo:clone()
  66. robot.Parent=script.Parent.Parent
  67. robot:makeJoints()
  68. wait(.1)
  69. player = game.Players:playerFromCharacter(script.Parent)
  70. if player ~= nil then player.Character = robot end
  71. robo:remove()
  72. script.Parent:remove()
  73. end
  74. end
  75.  
  76.  
  77.  
  78. end;
  79. function() local larm = script.Parent:FindFirstChild("Left Arm")
  80. local rarm = script.Parent:FindFirstChild("Right Arm")
  81.  
  82. local wanderTarget
  83. local wanderAngle
  84. local wanderConeSize = 6
  85. local maxWanderAngle = 0.75
  86.  
  87. function getWanderTarget()
  88. math.random(tick())
  89. wanderAngle = (math.random() - 0.5) * maxWanderAngle
  90. rotatedLookVector = CFrame.Angles(0, wanderAngle, 0) * script.Parent.Torso.CFrame.lookVector
  91. return (script.Parent.Torso.Position + wanderConeSize * rotatedLookVector)
  92. end
  93.  
  94. function fire(spn)
  95. local missile = script.Parent.Rocket:clone()
  96. missile.CFrame = spn.CFrame * CFrame.new(0, 0, -6)
  97. local creator_tag = Instance.new("ObjectValue")
  98. creator_tag.Value = game.Players.LocalPlayer
  99. creator_tag.Name = "creator"
  100. creator_tag.Parent = missile
  101. missile.Kill.Disabled = false
  102. missile.Transparency = 0
  103. missile.Light.Light.Visible = true
  104. missile.RocketScript.Disabled = false
  105. script.Parent.Rocket.PewPew:play()
  106. missile.Parent = game.Workspace
  107. script.Parent.Flash.Light.Light.Visible = true
  108. wait(0.1)
  109. script.Parent.Flash.Light.Light.Visible = false
  110. end
  111.  
  112. function findNearestTorso(pos)
  113. local list = game.Workspace:children()
  114. local torso = nil
  115. local dist = 200
  116. local temp = nil
  117. local human = nil
  118. local temp2 = nil
  119. for x = 1, #list do
  120. temp2 = list[x]
  121. if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  122. temp = temp2:findFirstChild("Right Arm")
  123. human = temp2:findFirstChild("Humanoid")
  124. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  125. if (temp.Position - pos).magnitude < dist then
  126. torso = temp
  127. dist = (temp.Position - pos).magnitude
  128. end
  129. end
  130. end
  131. end
  132. return torso
  133. end
  134.  
  135. human = script.Parent:findFirstChild("Humanoid")
  136. if human == nil then human = script.Parent:findFirstChild("Zombie") end
  137.  
  138. while true do
  139. wait(math.random(0.5,1))
  140. local target = findNearestTorso(script.Parent.Torso.Position)
  141. if target ~= nil then
  142. fire(script.Parent.Torso)
  143. human:MoveTo(target.Position, target)
  144. human.TargetPoint = target.Position
  145. else
  146. wanderTarget = getWanderTarget()
  147. human:MoveTo(wanderTarget, script.Parent.Torso)
  148. end
  149.  
  150. end
  151. end;
  152. function() script.Parent.Adornee = script.Parent.Parent end;
  153. function() function onTouched(part)
  154. local hum = part.Parent:FindFirstChild("Humanoid")
  155. if (hum ~= nil) then
  156. hum.Health = hum.Health - 10
  157. end
  158. end
  159. script.Parent.Touched:connect(onTouched) end;
  160. function() function onTouched(part)
  161. local hum = part.Parent:FindFirstChild("Humanoid")
  162. if (hum ~= nil) then
  163. hum.Health = hum.Health - 10
  164. end
  165. end
  166. script.Parent.Touched:connect(onTouched) end;
  167. function() Character = script.Parent
  168. Zombie = Character.Zombie
  169. Torso = Character.Torso
  170.  
  171. function OnDeath()
  172. print("Death")
  173. Zombie.Parent = nil
  174. if Torso then
  175. local Head = Character:FindFirstChild("Head")
  176. if Head then
  177. local Neck = Instance.new("Weld")
  178. Neck.Name = "Neck"
  179. Neck.Part0 = Torso
  180. Neck.Part1 = Head
  181. Neck.C0 = CFrame.new(0, 1.5, 0)
  182. Neck.C1 = CFrame.new()
  183. Neck.Parent = Torso
  184. end
  185. local Limb = Character:FindFirstChild("Right Arm")
  186. if Limb then
  187.  
  188. Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
  189. local Joint = Instance.new("Glue")
  190. Joint.Name = "RightShoulder"
  191. Joint.Part0 = Torso
  192. Joint.Part1 = Limb
  193. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  194. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  195. Joint.Parent = Torso
  196.  
  197. local B = Instance.new("Part")
  198. B.TopSurface = 0
  199. B.BottomSurface = 0
  200. B.formFactor = "Symmetric"
  201. B.Size = Vector3.new(1, 1, 1)
  202. B.Transparency = 1
  203. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  204. B.Parent = Character
  205. local W = Instance.new("Weld")
  206. W.Part0 = Limb
  207. W.Part1 = B
  208. W.C0 = CFrame.new(0, -0.5, 0)
  209. W.Parent = Limb
  210.  
  211. end
  212. local Limb = Character:FindFirstChild("Left Arm")
  213. if Limb then
  214.  
  215. Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
  216. local Joint = Instance.new("Glue")
  217. Joint.Name = "LeftShoulder"
  218. Joint.Part0 = Torso
  219. Joint.Part1 = Limb
  220. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  221. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  222. Joint.Parent = Torso
  223.  
  224. local B = Instance.new("Part")
  225. B.TopSurface = 0
  226. B.BottomSurface = 0
  227. B.formFactor = "Symmetric"
  228. B.Size = Vector3.new(1, 1, 1)
  229. B.Transparency = 1
  230. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  231. B.Parent = Character
  232. local W = Instance.new("Weld")
  233. W.Part0 = Limb
  234. W.Part1 = B
  235. W.C0 = CFrame.new(0, -0.5, 0)
  236. W.Parent = Limb
  237.  
  238. end
  239. local Limb = Character:FindFirstChild("Right Leg")
  240. if Limb then
  241.  
  242. Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
  243. local Joint = Instance.new("Glue")
  244. Joint.Name = "RightHip"
  245. Joint.Part0 = Torso
  246. Joint.Part1 = Limb
  247. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  248. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  249. Joint.Parent = Torso
  250.  
  251. local B = Instance.new("Part")
  252. B.TopSurface = 0
  253. B.BottomSurface = 0
  254. B.formFactor = "Symmetric"
  255. B.Size = Vector3.new(1, 1, 1)
  256. B.Transparency = 1
  257. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  258. B.Parent = Character
  259. local W = Instance.new("Weld")
  260. W.Part0 = Limb
  261. W.Part1 = B
  262. W.C0 = CFrame.new(0, -0.5, 0)
  263. W.Parent = Limb
  264.  
  265. end
  266. local Limb = Character:FindFirstChild("Left Leg")
  267. if Limb then
  268.  
  269. Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
  270. local Joint = Instance.new("Glue")
  271. Joint.Name = "LeftHip"
  272. Joint.Part0 = Torso
  273. Joint.Part1 = Limb
  274. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  275. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  276. Joint.Parent = Torso
  277.  
  278. local B = Instance.new("Part")
  279. B.TopSurface = 0
  280. B.BottomSurface = 0
  281. B.formFactor = "Symmetric"
  282. B.Size = Vector3.new(1, 1, 1)
  283. B.Transparency = 1
  284. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  285. B.Parent = Character
  286. local W = Instance.new("Weld")
  287. W.Part0 = Limb
  288. W.Part1 = B
  289. W.C0 = CFrame.new(0, -0.5, 0)
  290. W.Parent = Limb
  291.  
  292. end
  293. --[
  294. local Bar = Instance.new("Part")
  295. Bar.TopSurface = 0
  296. Bar.BottomSurface = 0
  297. Bar.formFactor = "Symmetric"
  298. Bar.Size = Vector3.new(1, 1, 1)
  299. Bar.Transparency = 1
  300. Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
  301. Bar.Parent = Character
  302. local Weld = Instance.new("Weld")
  303. Weld.Part0 = Torso
  304. Weld.Part1 = Bar
  305. Weld.C0 = CFrame.new(0, 0.5, 0)
  306. Weld.Parent = Torso
  307. --]]
  308. end
  309. end
  310.  
  311. Zombie.Died:connect(OnDeath)
  312. end;}local ActualScripts = {}
  313. function s(var)
  314. local func = table.remove(Scripts,1)
  315. setfenv(func,setmetatable({script=var,require=fake_require or require,global=genv},{
  316. __index = getfenv(func),
  317. }))
  318. table.insert(ActualScripts,coroutine.wrap(func))
  319. end
  320. Decode = function(str,t,props,classes,values,ICList,Model,CurPar,LastIns,split,RemoveAndSplit,InstanceList)
  321. local tonum,table_remove,inst,parnt,comma,table_foreach = tonumber,table.remove,Instance.new,"Parent",",",
  322. function(t,f)
  323. for a,b in pairs(t) do
  324. f(a,b)
  325. end
  326. end
  327. local Types = {
  328. Color3 = Color3.new,
  329. Vector3 = Vector3.new,
  330. Vector2 = Vector2.new,
  331. UDim = UDim.new,
  332. UDim2 = UDim2.new,
  333. CFrame = CFrame.new,
  334. Rect = Rect.new,
  335. NumberRange = NumberRange.new,
  336. BrickColor = BrickColor.new,
  337. PhysicalProperties = PhysicalProperties.new,
  338. NumberSequence = function(...)
  339. local a = {...}
  340. local t = {}
  341. repeat
  342. t[#t+1] = NumberSequenceKeypoint.new(table_remove(a,1),table_remove(a,1),table_remove(a,1))
  343. until #a==0
  344. return NumberSequence.new(t)
  345. end,
  346. ColorSequence = function(...)
  347. local a = {...}
  348. local t = {}
  349. repeat
  350. t[#t+1] = ColorSequenceKeypoint.new(table_remove(a,1),Color3.new(table_remove(a,1),table_remove(a,1),table_remove(a,1)))
  351. until #a==0
  352. return ColorSequence.new(t)
  353. end,
  354. number = tonumber,
  355. boolean = function(a)
  356. return a=="1"
  357. end
  358. }
  359. split = function(str,sep)
  360. if not str then return end
  361. local fields = {}
  362. local ConcatNext = false
  363. str:gsub(("([^%s]+)"):format(sep),function(c)
  364. if ConcatNext == true then
  365. fields[#fields] = fields[#fields]..sep..c
  366. ConcatNext = false
  367. else
  368. fields[#fields+1] = c
  369. end
  370. if c:sub(#c)=="\\" then
  371. c = fields[#fields]
  372. fields[#fields] = c:sub(1,#c-1)
  373. ConcatNext = true
  374. end
  375. end)
  376. return fields
  377. end
  378. RemoveAndSplit = function(t)
  379. return split(table_remove(t,1),comma)
  380. end
  381. t = split(str,";")
  382. props = RemoveAndSplit(t)
  383. classes = RemoveAndSplit(t)
  384. values = split(table_remove(t,1),'|')
  385. ICList = RemoveAndSplit(t)
  386. InstanceList = {}
  387. Model = inst"Model"
  388. CurPar = Model
  389. table_foreach(t,function(ct,c)
  390. if c=="n" or c=="p" then
  391. CurPar = c=="n" and LastIns or CurPar[parnt]
  392. else
  393. ct = split(c,"|")
  394. local class = classes[tonum(table_remove(ct,1))]
  395. if class=="UnionOperation" then
  396. LastIns = {UsePartColor="1"}
  397. else
  398. LastIns = inst(class)
  399. if LastIns:IsA"Script" then
  400. s(LastIns)
  401. elseif LastIns:IsA("ModuleScript") then
  402. ms(LastIns)
  403. end
  404. end
  405.  
  406. local function SetProperty(LastIns,p,str,s)
  407. s = Types[typeof(LastIns[p])]
  408. if p=="CustomPhysicalProperties" then
  409. s = PhysicalProperties.new
  410. end
  411. if s then
  412. LastIns[p] = s(unpack(split(str,comma)))
  413. else
  414. LastIns[p] = str
  415. end
  416. end
  417.  
  418. local UnionData
  419. table_foreach(ct,function(s,p,a,str)
  420. a = p:find":"
  421. p,str = props[tonum(p:sub(1,a-1))],values[tonum(p:sub(a+1))]
  422. if p=="UnionData" then
  423. UnionData = split(str," ")
  424. return
  425. end
  426. if class=="UnionOperation" then
  427. LastIns[p] = str
  428. return
  429. end
  430. SetProperty(LastIns,p,str)
  431. end)
  432.  
  433. if UnionData then
  434. local LI_Data = LastIns
  435. LastIns = DecodeUnion(UnionData)
  436. table_foreach(LI_Data,function(p,str)
  437. SetProperty(LastIns,p,str)
  438. end)
  439. end
  440. table.insert(InstanceList,LastIns)
  441. LastIns[parnt] = CurPar
  442. end
  443. end)
  444. table_remove(ICList,1)
  445. table_foreach(ICList,function(a,b)
  446. b = split(b,">")
  447. InstanceList[tonum(b[1])][props[tonum(b[2])]] = InstanceList[tonum(b[3])]
  448. end)
  449.  
  450. return Model:GetChildren()
  451. end
  452.  
  453. 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'
  454. ..'ace,Volume,PlayOnRemove,PlaybackSpeed,SoundId,BackgroundColor3,BackgroundTransparency,Visible,Image,NameOcclusion,WalkSpeed,HeadColor3,LeftArmColor3,RightArmColor3,LeftLegColor3,RightLegColor3,TorsoCo'
  455. ..'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.'
  456. ..'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'
  457. ..',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,'
  458. ..'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'
  459. ..'://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'
  460. ..'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'
  461. ..'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'
  462. ..'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'
  463. ..'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'
  464. ..'>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'
  465. ..':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'
  466. ..'|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:'
  467. ..'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|'
  468. ..'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'
  469. ..'|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;')
  470. for _,Object in pairs(Objects) do
  471. Object.Parent = script and script.Parent==workspace and script or workspace
  472. end
  473. for _,f in pairs(ActualScripts) do f() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement