Advertisement
Dr_Neutron

Scp - 173 roblox script

May 18th, 2018
3,508
-1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.87 KB | None | 0 1
  1. --Converted with ttyyuu12345's model to script plugin v4 thanks ttyyuu12345
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. local chil = workspace:GetChildren()
  19. for i,v in pairs(chil) do
  20. if not (v==script or v:IsA("Camera") or v:IsA("Terrain") or game:GetService("Players"):GetPlayerFromCharacter(v)~=nil) then
  21.  
  22. end
  23. end
  24. print(script.Parent)
  25. Model0 = Instance.new("Model")
  26. Part1 = Instance.new("Part")
  27. Decal2 = Instance.new("Decal")
  28. BlockMesh3 = Instance.new("BlockMesh")
  29. Humanoid4 = Instance.new("Humanoid")
  30. Part5 = Instance.new("Part")
  31. Sound6 = Instance.new("Sound")
  32. Sound7 = Instance.new("Sound")
  33. Script8 = Instance.new("Script")
  34. Sound9 = Instance.new("Sound")
  35. Script10 = Instance.new("Script")
  36. Script11 = Instance.new("Script")
  37. Script12 = Instance.new("Script")
  38. BoolValue13 = Instance.new("BoolValue")
  39. Script14 = Instance.new("Script")
  40. Script15 = Instance.new("Script")
  41. Part16 = Instance.new("Part")
  42. SpecialMesh17 = Instance.new("SpecialMesh")
  43. Part18 = Instance.new("Part")
  44. Part19 = Instance.new("Part")
  45. Model0.Name = "SCP-173"
  46. Model0.Parent = mas
  47. Part1.Name = "Phys2"
  48. Part1.Parent = Model0
  49. Part1.Transparency = 1
  50. Part1.Rotation = Vector3.new(0, 0.00999999978, 0)
  51. Part1.Anchored = true
  52. Part1.CanCollide = false
  53. Part1.FormFactor = Enum.FormFactor.Custom
  54. Part1.Size = Vector3.new(1.49034107, 1.19227278, 0.242000014)
  55. Part1.CFrame = CFrame.new(93.8503723, 6.04123878, -28.8758316, 1, -3.53153553e-07, 0.000210747166, 3.53092247e-07, 1, 2.90925698e-07, -0.000210747166, -2.90851261e-07, 1)
  56. Part1.Position = Vector3.new(93.8503723, 6.04123878, -28.8758316)
  57. Part1.Orientation = Vector3.new(0, 0.00999999978, 0)
  58. Decal2.Parent = Part1
  59. Decal2.Transparency = 1
  60. Decal2.Texture = "http://www.roblox.com/asset/?id=163640214"
  61. BlockMesh3.Parent = Part1
  62. BlockMesh3.Scale = Vector3.new(1, 1, 0.615843534)
  63. BlockMesh3.Scale = Vector3.new(1, 1, 0.615843534)
  64. Humanoid4.Parent = Model0
  65. Humanoid4.NameOcclusion = Enum.NameOcclusion.NoOcclusion
  66. Humanoid4.Health = 0
  67. Part5.Name = "Death"
  68. Part5.Parent = Model0
  69. Part5.Transparency = 1
  70. Part5.Rotation = Vector3.new(180, -0.00999999978, 180)
  71. Part5.Anchored = true
  72. Part5.CanCollide = false
  73. Part5.FormFactor = Enum.FormFactor.Custom
  74. Part5.Size = Vector3.new(36.2999992, 2.42000008, 36.2999992)
  75. Part5.CFrame = CFrame.new(94.0098267, 1.50000203, -28.5803337, -1, -4.85476622e-13, -0.000210776969, -4.80887791e-13, 1, -2.1770941e-11, 0.000210776969, -2.17708386e-11, -1)
  76. Part5.BottomSurface = Enum.SurfaceType.Smooth
  77. Part5.TopSurface = Enum.SurfaceType.Smooth
  78. Part5.Position = Vector3.new(94.0098267, 1.50000203, -28.5803337)
  79. Part5.Orientation = Vector3.new(0, -179.98999, 0)
  80. Sound6.Name = "Slide"
  81. Sound6.Parent = Part5
  82. Sound6.SoundId = "http://www.roblox.com/asset/?id=149293656"
  83. Sound6.Volume = 1
  84. Sound6.Looped = true
  85. Sound7.Name = "Kill"
  86. Sound7.Parent = Part5
  87. Sound7.SoundId = "http://www.roblox.com/asset/?id=149293645"
  88. Sound7.Volume = 1
  89. Script8.Parent = Part5
  90. table.insert(cors,sandbox(Script8,function()
  91. local soundIds = {150185006,150184965,150185025}
  92. local sounds = {}
  93. for i=1,#soundIds do
  94. local s = Instance.new("Sound")
  95. s.SoundId = "http://www.roblox.com/asset/?id=" .. soundIds[i]
  96. s.Volume = 1
  97. s.Parent = script.Parent
  98. sounds[#sounds + 1] = s
  99. end
  100. fpor = game.Workspace.FindPartOnRay
  101. seen_dist = 200
  102. function canSee(subject,viewer)
  103. if (not subject) or (not viewer) then return false end
  104. local sh = subject:findFirstChild("Death")
  105. local vh = viewer:findFirstChild("Head")
  106. if (not sh) or (not vh) then return false end
  107. local vec = sh.Position - vh.Position
  108. local isInFOV = (vec:Dot(vh.CFrame.lookVector) > 0)
  109. if (isInFOV) and (vec.magnitude < seen_dist) then
  110. local ray = Ray.new(vh.Position,vec.unit*200)
  111. local por = fpor(workspace,ray,viewer,false)
  112. return (por == nil) or (por:IsDescendantOf(subject))
  113. end
  114. return false
  115. end
  116. function canSee2(subject,viewer)
  117. if (not subject) or (not viewer) then return false end
  118. local sh = subject:findFirstChild("Death")
  119. local vh = viewer:findFirstChild("Head")
  120. if (not sh) or (not vh) then return false end
  121. local vec = sh.Position - vh.Position
  122. if (vec.magnitude < seen_dist) then
  123. local ray = Ray.new(vh.Position,vec.unit*200)
  124. local por = fpor(workspace,ray,viewer,false)
  125. return (por == nil) or (por:IsDescendantOf(subject))
  126. end
  127. return false
  128. end
  129. function stick(x, y)
  130. weld = Instance.new("Weld")
  131. weld.Part0 = x
  132. weld.Part1 = y
  133. local HitPos = x.Position
  134. local CJ = CFrame.new(HitPos)
  135. local C0 = x.CFrame:inverse() *CJ
  136. local C1 = y.CFrame:inverse() * CJ
  137. weld.C0 = C0
  138. weld.C1 = C1
  139. weld.Parent = x
  140. x.Anchored = false
  141. y.Anchored = false
  142. end
  143. stick(script.Parent, script.Parent.Parent.Phys)
  144. function stick2(x, y)
  145. weld = Instance.new("Weld")
  146. weld.Part0 = x
  147. weld.Part1 = y
  148. local HitPos = x.Position
  149. local CJ = CFrame.new(HitPos)
  150. local C0 = x.CFrame:inverse() *CJ
  151. local C1 = y.CFrame:inverse() * CJ
  152. weld.C0 = C0
  153. weld.C1 = C1
  154. weld.Parent = x
  155. x.Anchored = false
  156. y.Anchored = false
  157. end
  158.  
  159. stick2(script.Parent, script.Parent.Parent.Phys2)
  160. while true do
  161. local minmag = nil
  162. local minply = nil
  163. local mindir = nil
  164. local beingwatched = false
  165. players = game:GetService("Players"):GetChildren()
  166. for i=1,#players do
  167. char = players[i].Character
  168. if char then
  169. local foundhead = char:FindFirstChild("Head")
  170. local foundtorso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
  171. local foundHumanoidRootPart = char:FindFirstChild("HumanoidRootPart")
  172. local foundhum = char:FindFirstChild("Humanoid")
  173. if foundhead and foundtorso and foundHumanoidRootPart and foundhum and foundhum.Health > 0 then
  174. local sub = (script.Parent.CFrame.p - foundhead.CFrame.p)
  175. local dir = sub.unit
  176. local mag = sub.magnitude
  177. if not minmag or minmag > mag then
  178. minmag = mag
  179. minply = char:FindFirstChild("HumanoidRootPart")
  180. mindir = dir
  181. if canSee(script.Parent.Parent, char) then beingwatched = true end
  182. end
  183. end
  184. end
  185. end
  186.  
  187. if minply and not beingwatched and canSee2(script.Parent.Parent, minply.Parent) then
  188. if minmag and minmag <= 200 then
  189. local unit = (script.Parent.Position-minply.Position).unit
  190. unit = Vector3.new(unit.X,0,unit.Z)
  191. script.Parent.CFrame = CFrame.new(script.Parent.Position + (unit*-20), Vector3.new(minply.Position.X, script.Parent.Position.Y, minply.Position.Z))
  192. script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0,math.rad(180),0)
  193. script.Parent.Slide:Play()
  194. if minmag < 15 and minply.Parent:FindFirstChildOfClass("Humanoid") and minply.Parent.Humanoid.Health > 0 then
  195. minply.Parent:BreakJoints()
  196. script.Parent.Kill:Play()
  197. end
  198. end
  199. end
  200. wait(.1)
  201. script.Parent.Slide:Pause()
  202. wait(.1)
  203. end
  204. end))
  205. Sound9.Parent = Part5
  206. Sound9.SoundId = "rbxassetid://150185025"
  207. Sound9.Volume = 1
  208. Sound9.PlayOnRemove = true
  209. Script10.Name = "Movement"
  210. Script10.Parent = Part5
  211. table.insert(cors,sandbox(Script10,function()
  212. function findNearestTorso(pos)
  213. local list = game.Workspace:children()
  214. local torso = nil
  215. local dist = 10000
  216. local temp = nil
  217. local human = nil
  218. local temp2 = nil
  219. for x = 1, #list do
  220. temp2 = list[x]
  221. if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  222. temp = temp2:findFirstChild("Right Arm")
  223. human = temp2:findFirstChildOfclass("Humanoid")
  224. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  225. if (temp.Position - pos).magnitude < dist then
  226. torso = temp
  227. dist = (temp.Position - pos).magnitude
  228. end
  229. end
  230. end
  231. end
  232. return torso
  233. end
  234.  
  235. while true do
  236. wait(math.random(1,5))
  237. if (not script.Parent.Q_Locked.Value) then
  238. script.Parent.Zombie.Jump = false
  239. end
  240. local target = findNearestTorso(script.Parent.Torso.Position)
  241. if target ~= nil then
  242. script.Parent.Zombie:MoveTo(target.Position, target)
  243. end
  244. end
  245.  
  246. end))
  247. Script11.Name = "QuantumLock"
  248. Script11.Parent = Model0
  249. table.insert(cors,sandbox(Script11,function()
  250. --Notes, the distance between the main brick and the others can be as big or small as you want (i set it to 12 or something, but it can be anything)
  251. dist = 50
  252. local StoneColor = "Brick yellow"
  253. local Speed = 30
  254.  
  255. wait(2)
  256. local angel = script.Parent
  257. local torso = angel.Torso
  258. local hum = angel.Zombie
  259. local qlock = angel.Q_Locked
  260.  
  261. local parts = {}
  262. local bcolors = {}
  263. local trans = {}
  264. local refs = {}
  265.  
  266. function Lock()
  267. if (qlock.Value) then return end
  268. qlock.Value = true
  269. hum.WalkSpeed = 0
  270. parts,bcolors,trans,refs = {},{},{},{}
  271. for i,p in pairs(angel:children()) do
  272. if (p:IsA("BasePart")) then
  273. table.insert(parts,p)
  274. table.insert(bcolors,tostring(p.BrickColor))
  275. table.insert(trans,p.Transparency)
  276. table.insert(refs,p.Reflectance)
  277. p.BrickColor = BrickColor.new(StoneColor)
  278. p.Transparency = 1
  279. p.Reflectance = 0
  280. end
  281. end
  282. end
  283.  
  284. function Unlock()
  285. if (not qlock.Value) then return end
  286. qlock.Value = false
  287. hum.WalkSpeed = Speed
  288. for i,p in pairs(parts) do
  289. p.BrickColor = BrickColor.new(bcolors[i])
  290. p.Transparency = trans[i]
  291. p.Reflectance = refs[i]
  292. end
  293. end
  294.  
  295. function CanBeSeen()
  296. for i,v in pairs(game.Players:children()) do
  297. if (v.Character ~= nil) and (v.Character:findFirstChild("Torso") ~= nil) then
  298. if (v.Character.Torso.Position - torso.Position).magnitude < dist then
  299. distA = (torso.Position - (v.Character.Torso.CFrame * CFrame.new(5,0,-10)).p).magnitude
  300. distB= (torso.Position - (v.Character.Torso.CFrame * CFrame.new(-5,0,-10)).p).magnitude
  301. distC= (torso.Position - (v.Character.Torso.CFrame * CFrame.new(0,0,2)).p).magnitude
  302. if distA < distC and distB < distC then return true end
  303. end
  304. end
  305. end
  306. return false end
  307.  
  308. Unlock()
  309. while true do
  310. wait(0.1)
  311. if (CanBeSeen()) then
  312. Lock()
  313. else
  314. Unlock()
  315. end
  316. end
  317.  
  318. --D fl V Y
  319. end))
  320. Script12.Name = "AngelSetup"
  321. Script12.Parent = Model0
  322. table.insert(cors,sandbox(Script12,function()
  323. local angel = script.Parent
  324.  
  325. local w = Instance.new("Weld")
  326. w.Parent = game.JointsService
  327. w.Part0 = angel.Torso
  328.  
  329. for i,p in pairs(angel:children()) do
  330. if (p:IsA("BasePart")) then
  331. p.Anchored = false
  332. end
  333. end
  334.  
  335. end))
  336. BoolValue13.Name = "Q_Locked"
  337. BoolValue13.Parent = Model0
  338. Script14.Name = "Weld"
  339. Script14.Parent = Model0
  340. table.insert(cors,sandbox(Script14,function()
  341. function weld()
  342. local parts,last = {}
  343. local function scan(parent)
  344. for _,v in pairs(parent:GetChildren()) do
  345. if (v:IsA("BasePart")) then
  346. if (last) then
  347. local w = Instance.new("Weld")
  348. w.Name = ("%s_Weld"):format(v.Name)
  349. w.Part0,w.Part1 = last,v
  350. w.C0 = last.CFrame:inverse()
  351. w.C1 = v.CFrame:inverse()
  352. w.Parent = last
  353. end
  354. last = v
  355. table.insert(parts,v)
  356. end
  357. scan(v)
  358. end
  359. end
  360. scan(script.Parent)
  361. for _,v in pairs(parts) do
  362. v.Anchored = false
  363. end
  364. wait(5)
  365. script.Parent.Script.Disabled = false
  366. end
  367.  
  368. weld()
  369. script:Remove()
  370. end))
  371. Script15.Name = "Respawn"
  372. Script15.Parent = Model0
  373. table.insert(cors,sandbox(Script15,function()
  374. name="Humanoid"
  375.  
  376. robo=script.Parent:clone()
  377.  
  378. while true do
  379. wait(1)
  380. if script.Parent.Zombie.Health<1 then
  381. wait(4)
  382. robot=robo:clone()
  383. robot.Parent=script.Parent.Parent
  384. robot:makeJoints()
  385. script.Parent:remove()
  386. end
  387. end
  388.  
  389.  
  390.  
  391.  
  392. end))
  393. Part16.Name = "Phys"
  394. Part16.Parent = Model0
  395. Part16.Size = Vector3.new(1.56400001, 6.35599995, 1.91999996)
  396. Part16.CFrame = CFrame.new(93.875, 3.73200011, -28.0060005, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  397. Part16.BottomSurface = Enum.SurfaceType.Smooth
  398. Part16.TopSurface = Enum.SurfaceType.Smooth
  399. Part16.Position = Vector3.new(93.875, 3.73200011, -28.0060005)
  400. SpecialMesh17.Parent = Part16
  401. SpecialMesh17.MeshId = "rbxassetid://430348199"
  402. SpecialMesh17.Scale = Vector3.new(0.333333075, 0.333333075, 0.333333105)
  403. SpecialMesh17.TextureId = "rbxassetid://430348224"
  404. SpecialMesh17.MeshType = Enum.MeshType.FileMesh
  405. SpecialMesh17.Scale = Vector3.new(0.333333075, 0.333333075, 0.333333105)
  406. Part18.Name = "Phys"
  407. Part18.Parent = Model0
  408. Part18.Transparency = 1
  409. Part18.Size = Vector3.new(1.56400001, 6.35599995, 1.91999996)
  410. Part18.CFrame = CFrame.new(93.875, 3.73200011, -28.0060005, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  411. Part18.BottomSurface = Enum.SurfaceType.Smooth
  412. Part18.TopSurface = Enum.SurfaceType.Smooth
  413. Part18.Position = Vector3.new(93.875, 3.73200011, -28.0060005)
  414. Part19.Name = "Phys"
  415. Part19.Parent = Model0
  416. Part19.Transparency = 1
  417. Part19.Size = Vector3.new(1.56400001, 6.35599995, 1.91999996)
  418. Part19.CFrame = CFrame.new(93.875, 3.73200011, -28.0060005, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  419. Part19.BottomSurface = Enum.SurfaceType.Smooth
  420. Part19.TopSurface = Enum.SurfaceType.Smooth
  421. Part19.Position = Vector3.new(93.875, 3.73200011, -28.0060005)
  422. for i,v in pairs(mas:GetChildren()) do
  423. v.Parent = script
  424. pcall(function() v:MakeJoints() end)
  425. end
  426. mas:Destroy()
  427. for i,v in pairs(cors) do
  428. spawn(function()
  429. pcall(v)
  430. end)
  431. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement