Advertisement
lafur

Untitled

Oct 21st, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.19 KB | None | 0 0
  1. --Created by PenguinAnonymous (ttyyuu12345) Editied by Dittoide
  2. --What's Added To M2S with Dittoide's Edit?
  3. --/ Better dummy script function to improve compatibility (makes it like you are running the code inside the script.)
  4. --/ Removed Gui In Bottom-Left for when you are making guis.
  5. --/ Removed "Inserting Map Please Wait" gui when selected Workspace as Place to export.
  6. --Credit: PenguinAnonymous for making original script, i just wanted to iron it out to my liking.
  7. --Errors: Camera,Terrain
  8. local runDummyScript = function(f,scri)
  9. if (not scri:IsA('Script')) or (not scri:IsA('LocalScript')) then return false; end;
  10. local Dummy_CoRoutine = coroutine.create(function()
  11. getfenv().script = scri
  12. ypcall(function() f() end)
  13. end)
  14. table.insert(cors,Dummy_CoRoutine);
  15. coroutine.resume(Dummy_CoRoutine);
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. mas.Name = "M2S_Model"
  20. o3 = Instance.new("Model")
  21. o4 = Instance.new("Part")
  22. o5 = Instance.new("SpecialMesh")
  23. o6 = Instance.new("Script")
  24. o7 = Instance.new("Message")
  25. o8 = Instance.new("Script")
  26. o9 = Instance.new("Part")
  27. o10 = Instance.new("Snap")
  28. o11 = Instance.new("Fire")
  29. o12 = Instance.new("Script")
  30. o13 = Instance.new("IntValue")
  31. o14 = Instance.new("IntValue")
  32. o15 = Instance.new("IntValue")
  33. o16 = Instance.new("IntValue")
  34. o17 = Instance.new("Script")
  35. o18 = Instance.new("Script")
  36. o19 = Instance.new("Humanoid")
  37. o20 = Instance.new("Script")
  38. o21 = Instance.new("Part")
  39. o22 = Instance.new("SpecialMesh")
  40. o23 = Instance.new("Script")
  41. o3.Name = "Shark"
  42. o3.Parent = mas
  43. o4.Name = "Head"
  44. o4.Parent = o3
  45. o4.BrickColor = BrickColor.new("Black")
  46. o4.Position = Vector3.new(-142.398438, 168.500015, -146.171875)
  47. o4.Rotation = Vector3.new(-90, 0, 90)
  48. o4.FormFactor = Enum.FormFactor.Symmetric
  49. o4.Friction = 0
  50. o4.Size = Vector3.new(2, 1, 1)
  51. o4.CFrame = CFrame.new(-142.398438, 168.500015, -146.171875, 4.20540346e-06, -1, -7.20879689e-06, 4.88454862e-06, -7.20877961e-06, 1, -1, -4.20543529e-06, 4.08822598e-06)
  52. o4.TopSurface = Enum.SurfaceType.Smooth
  53. o4.Color = Color3.new(0.105882, 0.164706, 0.207843)
  54. o4.Position = Vector3.new(-142.398438, 168.500015, -146.171875)
  55. o5.Parent = o4
  56. o5.Scale = Vector3.new(1.25, 1.25, 1.25)
  57. o6.Name = "Deadly"
  58. o6.Parent = o4
  59.  
  60. runDummyScript(function()
  61. function onTouched(hit)
  62. local human = hit.Parent:findFirstChild("Humanoid")
  63. if (human ~= nil) then
  64. human.Health = human.Health - 20
  65.  
  66.  
  67. end
  68. end
  69.  
  70. --if (script.Parent ~= nil) and (script.Parent.className == "Part") then --Work if in a block
  71. -- connection = script.Parent.Touched:connect(onTouched)
  72. --end
  73. script.Parent.Touched:connect(onTouched)
  74.  
  75. end,o6)
  76.  
  77. o7.Parent = o4
  78. o8.Parent = o4
  79.  
  80. runDummyScript(function()
  81. function onTouched(hit)
  82. if hit.ClassName=="Part" then
  83. hit:remove()
  84. end
  85. end
  86. connection = script.Parent.Touched:connect(onTouched)
  87. end,o8)
  88.  
  89. o9.Name = "Torso"
  90. o9.Parent = o3
  91. o9.BrickColor = BrickColor.new("Black")
  92. o9.Transparency = 1
  93. o9.Position = Vector3.new(-140.898499, 168.500015, -146.171875)
  94. o9.Rotation = Vector3.new(-90, 0, 90)
  95. o9.FormFactor = Enum.FormFactor.Symmetric
  96. o9.Friction = 0
  97. o9.Size = Vector3.new(2, 2, 1)
  98. o9.CFrame = CFrame.new(-140.898499, 168.500015, -146.171875, 4.20540437e-06, -1, -7.20879825e-06, 4.54327983e-06, -7.20877961e-06, 1, -1, -4.20543665e-06, 4.42949477e-06)
  99. o9.BackSurface = Enum.SurfaceType.Weld
  100. o9.FrontSurface = Enum.SurfaceType.Weld
  101. o9.LeftSurface = Enum.SurfaceType.Weld
  102. o9.RightSurface = Enum.SurfaceType.Weld
  103. o9.Color = Color3.new(0.105882, 0.164706, 0.207843)
  104. o9.Position = Vector3.new(-140.898499, 168.500015, -146.171875)
  105. o10.Name = "Neck"
  106. o10.Parent = o9
  107. o10.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  108. o10.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  109. o11.Parent = o9
  110. o11.Size = 30
  111. o11.Color = Color3.new(1, 1, 0)
  112. o11.Enabled = false
  113. o11.Heat = 25
  114. o11.SecondaryColor = Color3.new(1, 0, 0)
  115. o12.Parent = o11
  116.  
  117. runDummyScript(function()
  118.  
  119. end,o12)
  120.  
  121. o13.Name = "Mode"
  122. o13.Parent = o3
  123. o14.Name = "agent11191"
  124. o14.Parent = o13
  125. o15.Name = "Mode"
  126. o15.Parent = o13
  127. o16.Name = "Mode"
  128. o16.Parent = o13
  129. o17.Name = "Health"
  130. o17.Parent = o3
  131.  
  132. runDummyScript(function()
  133. function waitForChild(parent, childName)
  134. while true do
  135. local child = parent:findFirstChild(childName)
  136. if child then
  137. return child
  138. end
  139. parent.ChildAdded:wait()
  140. end
  141. end
  142.  
  143. -- declarations
  144.  
  145. local Figure = script.Parent
  146. local Head = waitForChild(Figure, "Head")
  147. local Humanoid = waitForChild(Figure, "Humanoid")
  148. -- regeneration
  149.  
  150. while true do
  151. local s = wait(4)
  152. local health = Humanoid.Health
  153. if health > 0 and health < Humanoid.MaxHealth then
  154. health = health + 0.08 * s * Humanoid.MaxHealth
  155. if health * 1.05 < Humanoid.MaxHealth then
  156. Humanoid.Health = health
  157. else
  158. Humanoid.Health = Humanoid.MaxHealth
  159. end
  160. end
  161. end
  162.  
  163. end,o17)
  164.  
  165. o18.Name = "Respawn"
  166. o18.Parent = o3
  167.  
  168. runDummyScript(function()
  169. name="Humanoid"
  170.  
  171.  
  172.  
  173. robo=script.Parent:clone()
  174.  
  175.  
  176.  
  177. while true do
  178.  
  179. wait(5)
  180.  
  181. if script.Parent.Humanoid.Health<1 then
  182.  
  183. robot=robo:clone()
  184.  
  185. robot.Parent=script.Parent.Parent
  186.  
  187. robot:makeJoints()
  188.  
  189. script.Parent:remove()
  190.  
  191. end
  192.  
  193. end
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. end,o18)
  203.  
  204. o19.Name = "Shark"
  205. o19.Parent = o3
  206. o19.NameOcclusion = Enum.NameOcclusion.NoOcclusion
  207. o19.LeftLeg = o21
  208. o19.Torso = o9
  209. o19.Health = 500
  210. o19.MaxHealth = 500
  211. o20.Name = "Follow"
  212. o20.Parent = o3
  213.  
  214. runDummyScript(function()
  215. local larm = script.Parent:FindFirstChild("Left Arm")
  216. local rarm = script.Parent:FindFirstChild("Right Arm")
  217.  
  218. function findNearestTorso(pos)
  219. local list = game.Workspace:children()
  220. local torso = nil
  221. local dist = 10000
  222. local temp = nil
  223. local human = nil
  224. local temp2 = nil
  225. for x = 1, #list do
  226. temp2 = list[x]
  227. if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  228. temp = temp2:findFirstChild("Torso")
  229. human = temp2:findFirstChild("Humanoid")
  230. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  231. if (temp.Position - pos).magnitude < dist then
  232. torso = temp
  233. dist = (temp.Position - pos).magnitude
  234. end
  235. end
  236. end
  237. end
  238. return torso
  239. end
  240.  
  241. while true do
  242. wait(0.1)
  243. local target = findNearestTorso(script.Parent.Torso.Position)
  244. if target ~= nil then
  245. script.Parent.Humanoid:MoveTo(target.Position, target)
  246. end
  247. end
  248. end,o20)
  249.  
  250. o21.Name = "Left Leg"
  251. o21.Parent = o3
  252. o21.Position = Vector3.new(-138.798569, 168.500076, -146.271835)
  253. o21.Rotation = Vector3.new(0, 90, 0)
  254. o21.Size = Vector3.new(1, 1, 2.20000005)
  255. o21.CFrame = CFrame.new(-138.798569, 168.500076, -146.271835, 4.20540346e-06, -7.20879689e-06, 1, 4.88455134e-06, 1, 7.20877961e-06, -1, 4.08822325e-06, 4.20543529e-06)
  256. o21.BackSurface = Enum.SurfaceType.Weld
  257. o21.BottomSurface = Enum.SurfaceType.Weld
  258. o21.FrontSurface = Enum.SurfaceType.Weld
  259. o21.LeftSurface = Enum.SurfaceType.Weld
  260. o21.RightSurface = Enum.SurfaceType.Weld
  261. o21.TopSurface = Enum.SurfaceType.Weld
  262. o21.Position = Vector3.new(-138.798569, 168.500076, -146.271835)
  263. o22.Parent = o21
  264. o22.MeshId = "http://www.roblox.com/asset/?id=82821384"
  265. o22.Scale = Vector3.new(10, 10, 10)
  266. o22.TextureId = "http://www.roblox.com/asset/?id=82844051"
  267. o22.MeshType = Enum.MeshType.FileMesh
  268. o23.Name = "Effect"
  269. o23.Parent = o21
  270.  
  271. runDummyScript(function()
  272. while true do
  273. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  274. wait(.1)
  275. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
  276. wait(.1)
  277. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  278. wait(.1)
  279. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
  280. wait(.1)
  281. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  282. wait(.1)
  283. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
  284. wait(.1)
  285. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  286. wait(.1)
  287. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
  288. wait(.1)
  289. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  290. wait(.1)
  291. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
  292. wait(.1)
  293. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  294. wait(.1)
  295. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
  296. wait(.1)
  297. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  298. wait(.1)
  299. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
  300. wait(.1)
  301. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  302. wait(.1)
  303. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
  304. wait(.1)
  305. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  306. wait(.1)
  307. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
  308. wait(.1)
  309. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  310. wait(.1)
  311. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
  312. wait(.1)
  313. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  314. wait(.1)
  315. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
  316. wait(.1)
  317. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  318. wait(.1)
  319. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
  320. wait(.1)
  321. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  322. wait(.1)
  323. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
  324. wait(.1)
  325. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  326. wait(.1)
  327. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
  328. wait(.1)
  329. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  330. wait(.1)
  331. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
  332. wait(.1)
  333. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  334. wait(.1)
  335. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
  336. wait(.1)
  337. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  338. wait(.1)
  339. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
  340. wait(.1)
  341. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  342. wait(.1)
  343. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
  344. wait(.1)
  345. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  346. wait(.1)
  347. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
  348. wait(.1)
  349. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  350. wait(.1)
  351. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
  352. wait(.1)
  353. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  354. wait(.1)
  355. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
  356. wait(.1)
  357. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  358. wait(.1)
  359. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
  360. wait(.1)
  361. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  362. wait(.1)
  363. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
  364. wait(.1)
  365. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
  366. wait(.1)
  367. script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
  368. wait(.1)
  369. end
  370. end,o23)
  371.  
  372. mas.Parent = workspace
  373. mas:MakeJoints()
  374. local mas1 = mas:GetChildren()
  375. for i=1,#mas1 do
  376. mas1[i].Parent = workspace
  377. ypcall(function() mas1[i]:MakeJoints() end)
  378. end
  379. mas:Destroy()
  380. for i=1,#cors do
  381. coroutine.resume(cors[i])
  382. end
  383. mess_handle.Text = "Resetting"
  384. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  385. v:LoadCharacter()
  386. end
  387. wait(1)
  388. mess_handle:Remove()
  389.  
  390. game:GetService("Lighting").Ambient = Color3.new(0, 0, 0)
  391. game:GetService("Lighting").Brightness = 1
  392. game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
  393. game:GetService("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
  394. game:GetService("Lighting").GlobalShadows = true
  395. game:GetService("Lighting").OutdoorAmbient = Color3.new(0.5, 0.5, 0.5)
  396. game:GetService("Lighting").Outlines = false
  397. game:GetService("Lighting").GeographicLatitude = 41.733299255371
  398. game:GetService("Lighting").TimeOfDay = "14:00:00"
  399. game:GetService("Lighting").FogColor = Color3.new(0.75, 0.75, 0.75)
  400. game:GetService("Lighting").FogEnd = 100000
  401. game:GetService("Lighting").FogStart = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement