Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Created by PenguinAnonymous (ttyyuu12345) Editied by Dittoide
- --What's Added To M2S with Dittoide's Edit?
- --/ Better dummy script function to improve compatibility (makes it like you are running the code inside the script.)
- --/ Removed Gui In Bottom-Left for when you are making guis.
- --/ Removed "Inserting Map Please Wait" gui when selected Workspace as Place to export.
- --Credit: PenguinAnonymous for making original script, i just wanted to iron it out to my liking.
- --Errors: Camera,Terrain
- local runDummyScript = function(f,scri)
- if (not scri:IsA('Script')) or (not scri:IsA('LocalScript')) then return false; end;
- local Dummy_CoRoutine = coroutine.create(function()
- getfenv().script = scri
- ypcall(function() f() end)
- end)
- table.insert(cors,Dummy_CoRoutine);
- coroutine.resume(Dummy_CoRoutine);
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "M2S_Model"
- o3 = Instance.new("Model")
- o4 = Instance.new("Part")
- o5 = Instance.new("SpecialMesh")
- o6 = Instance.new("Script")
- o7 = Instance.new("Message")
- o8 = Instance.new("Script")
- o9 = Instance.new("Part")
- o10 = Instance.new("Snap")
- o11 = Instance.new("Fire")
- o12 = Instance.new("Script")
- o13 = Instance.new("IntValue")
- o14 = Instance.new("IntValue")
- o15 = Instance.new("IntValue")
- o16 = Instance.new("IntValue")
- o17 = Instance.new("Script")
- o18 = Instance.new("Script")
- o19 = Instance.new("Humanoid")
- o20 = Instance.new("Script")
- o21 = Instance.new("Part")
- o22 = Instance.new("SpecialMesh")
- o23 = Instance.new("Script")
- o3.Name = "Shark"
- o3.Parent = mas
- o4.Name = "Head"
- o4.Parent = o3
- o4.BrickColor = BrickColor.new("Black")
- o4.Position = Vector3.new(-142.398438, 168.500015, -146.171875)
- o4.Rotation = Vector3.new(-90, 0, 90)
- o4.FormFactor = Enum.FormFactor.Symmetric
- o4.Friction = 0
- o4.Size = Vector3.new(2, 1, 1)
- 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)
- o4.TopSurface = Enum.SurfaceType.Smooth
- o4.Color = Color3.new(0.105882, 0.164706, 0.207843)
- o4.Position = Vector3.new(-142.398438, 168.500015, -146.171875)
- o5.Parent = o4
- o5.Scale = Vector3.new(1.25, 1.25, 1.25)
- o6.Name = "Deadly"
- o6.Parent = o4
- runDummyScript(function()
- function onTouched(hit)
- local human = hit.Parent:findFirstChild("Humanoid")
- if (human ~= nil) then
- human.Health = human.Health - 20
- end
- end
- --if (script.Parent ~= nil) and (script.Parent.className == "Part") then --Work if in a block
- -- connection = script.Parent.Touched:connect(onTouched)
- --end
- script.Parent.Touched:connect(onTouched)
- end,o6)
- o7.Parent = o4
- o8.Parent = o4
- runDummyScript(function()
- function onTouched(hit)
- if hit.ClassName=="Part" then
- hit:remove()
- end
- end
- connection = script.Parent.Touched:connect(onTouched)
- end,o8)
- o9.Name = "Torso"
- o9.Parent = o3
- o9.BrickColor = BrickColor.new("Black")
- o9.Transparency = 1
- o9.Position = Vector3.new(-140.898499, 168.500015, -146.171875)
- o9.Rotation = Vector3.new(-90, 0, 90)
- o9.FormFactor = Enum.FormFactor.Symmetric
- o9.Friction = 0
- o9.Size = Vector3.new(2, 2, 1)
- 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)
- o9.BackSurface = Enum.SurfaceType.Weld
- o9.FrontSurface = Enum.SurfaceType.Weld
- o9.LeftSurface = Enum.SurfaceType.Weld
- o9.RightSurface = Enum.SurfaceType.Weld
- o9.Color = Color3.new(0.105882, 0.164706, 0.207843)
- o9.Position = Vector3.new(-140.898499, 168.500015, -146.171875)
- o10.Name = "Neck"
- o10.Parent = o9
- o10.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o10.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o11.Parent = o9
- o11.Size = 30
- o11.Color = Color3.new(1, 1, 0)
- o11.Enabled = false
- o11.Heat = 25
- o11.SecondaryColor = Color3.new(1, 0, 0)
- o12.Parent = o11
- runDummyScript(function()
- end,o12)
- o13.Name = "Mode"
- o13.Parent = o3
- o14.Name = "agent11191"
- o14.Parent = o13
- o15.Name = "Mode"
- o15.Parent = o13
- o16.Name = "Mode"
- o16.Parent = o13
- o17.Name = "Health"
- o17.Parent = o3
- runDummyScript(function()
- function waitForChild(parent, childName)
- while true do
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- parent.ChildAdded:wait()
- end
- end
- -- declarations
- local Figure = script.Parent
- local Head = waitForChild(Figure, "Head")
- local Humanoid = waitForChild(Figure, "Humanoid")
- -- regeneration
- while true do
- local s = wait(4)
- local health = Humanoid.Health
- if health > 0 and health < Humanoid.MaxHealth then
- health = health + 0.08 * s * Humanoid.MaxHealth
- if health * 1.05 < Humanoid.MaxHealth then
- Humanoid.Health = health
- else
- Humanoid.Health = Humanoid.MaxHealth
- end
- end
- end
- end,o17)
- o18.Name = "Respawn"
- o18.Parent = o3
- runDummyScript(function()
- name="Humanoid"
- robo=script.Parent:clone()
- while true do
- wait(5)
- if script.Parent.Humanoid.Health<1 then
- robot=robo:clone()
- robot.Parent=script.Parent.Parent
- robot:makeJoints()
- script.Parent:remove()
- end
- end
- end,o18)
- o19.Name = "Shark"
- o19.Parent = o3
- o19.NameOcclusion = Enum.NameOcclusion.NoOcclusion
- o19.LeftLeg = o21
- o19.Torso = o9
- o19.Health = 500
- o19.MaxHealth = 500
- o20.Name = "Follow"
- o20.Parent = o3
- runDummyScript(function()
- local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 10000
- 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("Torso")
- 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
- while true do
- wait(0.1)
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- script.Parent.Humanoid:MoveTo(target.Position, target)
- end
- end
- end,o20)
- o21.Name = "Left Leg"
- o21.Parent = o3
- o21.Position = Vector3.new(-138.798569, 168.500076, -146.271835)
- o21.Rotation = Vector3.new(0, 90, 0)
- o21.Size = Vector3.new(1, 1, 2.20000005)
- 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)
- o21.BackSurface = Enum.SurfaceType.Weld
- o21.BottomSurface = Enum.SurfaceType.Weld
- o21.FrontSurface = Enum.SurfaceType.Weld
- o21.LeftSurface = Enum.SurfaceType.Weld
- o21.RightSurface = Enum.SurfaceType.Weld
- o21.TopSurface = Enum.SurfaceType.Weld
- o21.Position = Vector3.new(-138.798569, 168.500076, -146.271835)
- o22.Parent = o21
- o22.MeshId = "http://www.roblox.com/asset/?id=82821384"
- o22.Scale = Vector3.new(10, 10, 10)
- o22.TextureId = "http://www.roblox.com/asset/?id=82844051"
- o22.MeshType = Enum.MeshType.FileMesh
- o23.Name = "Effect"
- o23.Parent = o21
- runDummyScript(function()
- while true do
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843647"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82821384"
- wait(.1)
- script.Parent.Mesh.MeshId = "http://www.roblox.com/asset/?id=82843712"
- wait(.1)
- end
- end,o23)
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = workspace
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
- mess_handle.Text = "Resetting"
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- v:LoadCharacter()
- end
- wait(1)
- mess_handle:Remove()
- game:GetService("Lighting").Ambient = Color3.new(0, 0, 0)
- game:GetService("Lighting").Brightness = 1
- game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
- game:GetService("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
- game:GetService("Lighting").GlobalShadows = true
- game:GetService("Lighting").OutdoorAmbient = Color3.new(0.5, 0.5, 0.5)
- game:GetService("Lighting").Outlines = false
- game:GetService("Lighting").GeographicLatitude = 41.733299255371
- game:GetService("Lighting").TimeOfDay = "14:00:00"
- game:GetService("Lighting").FogColor = Color3.new(0.75, 0.75, 0.75)
- game:GetService("Lighting").FogEnd = 100000
- game:GetService("Lighting").FogStart = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement