Advertisement
bmrx13

map eater (made by me OOOOOWEEEEEEEEEEEEE)

Jun 5th, 2018
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.84 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Model0 = Instance.new("Model")
  20. BoolValue1 = Instance.new("BoolValue")
  21. Part2 = Instance.new("Part")
  22. Script3 = Instance.new("Script")
  23. Decal4 = Instance.new("Decal")
  24. PointLight5 = Instance.new("PointLight")
  25. Script6 = Instance.new("Script")
  26. Sound7 = Instance.new("Sound")
  27. Sound8 = Instance.new("Sound")
  28. BodyForce9 = Instance.new("BodyForce")
  29. Script10 = Instance.new("Script")
  30. BodyGyro11 = Instance.new("BodyGyro")
  31. Script12 = Instance.new("Script")
  32. Script13 = Instance.new("Script")
  33. Script14 = Instance.new("Script")
  34. Model0.Name = "Yummey!"
  35. Model0.Parent = mas
  36. BoolValue1.Name = "on"
  37. BoolValue1.Parent = Model0
  38. BoolValue1.Value = true
  39. Part2.Name = "Yummey"
  40. Part2.Parent = Model0
  41. Part2.Material = Enum.Material.SmoothPlastic
  42. Part2.BrickColor = BrickColor.new("Bright red")
  43. Part2.FormFactor = Enum.FormFactor.Symmetric
  44. Part2.Shape = Enum.PartType.Ball
  45. Part2.Size = Vector3.new(1, 1, 1)
  46. Part2.CFrame = CFrame.new(42, 0.500012994, 49, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  47. Part2.BottomSurface = Enum.SurfaceType.Smooth
  48. Part2.TopSurface = Enum.SurfaceType.Smooth
  49. Part2.Color = Color3.new(0.768628, 0.156863, 0.109804)
  50. Part2.Position = Vector3.new(42, 0.500012994, 49)
  51. Part2.Color = Color3.new(0.768628, 0.156863, 0.109804)
  52. Script3.Name = "clome"
  53. Script3.Parent = Part2
  54. table.insert(cors,sandbox(Script3,function()
  55. eatlocked = 0 --Leave this as "0", or else it will delete anything locked.
  56. duplicate = 1 -- set this to 0 if you don't want them to duplicate after eating five parts
  57. --[[I (kind of) made this script myself, because I copy and pasted
  58. everything i had in reach.
  59. i guess this is my first complete script.
  60. every other script in this model isn't made by me except the expire script.
  61. I only modified them.
  62.  
  63. Modified the VirusScript to prevent the things from eating locked parts.
  64. ]]--
  65.  
  66. local yummeyp = 0
  67. local brecksaet = 0
  68.  
  69. local s = Instance.new("Sound")
  70. local self = script.Parent
  71.  
  72. s.Name = "BGMusic"
  73. s.SoundId = "http://www.roblox.com/asset/?id=16213987"
  74. s.Volume = 1
  75. s.Pitch = 1
  76. s.Looped = false
  77. s.archivable = false
  78.  
  79. s.Parent = script.Parent
  80. function cloneobjectpls()
  81. print("clone")
  82. local a=script.Parent:clone()
  83. --a.Script:remove()
  84. a.Position=script.Parent.Position
  85. a.Parent=script.Parent.Parent
  86. a.CanCollide=true
  87. a.Anchored=false
  88. a.Color = Color3.new (math.random (), math.random (), math.random () )
  89. a.Reflectance = 0
  90. yummeyp = 0
  91. end
  92.  
  93. function eat_brecks_pls()
  94. print("I liek aeting thengs!")
  95. --yes
  96. brecksaet = brecksaet + 1
  97. yummeyp = yummeyp + 1
  98. if yummeyp == 5 then
  99. cloneobjectpls()
  100. end
  101. print("yummey")
  102. s:play()
  103. end
  104.  
  105. function onTouched(hit)
  106.  
  107. if (hit ~= nil) then
  108. if (hit.Name == "Yummey") or (hit.Name == "Powerup Box") then return end
  109. if (hit.locked == true) then
  110. if eatlocked == 1 then
  111. hit:remove()
  112. eat_brecks_pls()
  113. end
  114. end
  115. if (hit.Locked == false) then
  116. hit:remove()
  117. eat_brecks_pls()
  118. end
  119. end
  120. end
  121.  
  122.  
  123.  
  124. connection = script.Parent.Touched:connect(onTouched)
  125.  
  126.  
  127.  
  128.  
  129. end))
  130. Decal4.Parent = Part2
  131. Decal4.Texture = "http://www.roblox.com/asset/?id=171121051"
  132. PointLight5.Parent = Part2
  133. PointLight5.Color = Color3.new(1, 0, 0)
  134. PointLight5.Brightness = 10
  135. PointLight5.Color = Color3.new(1, 0, 0)
  136. Script6.Name = "Face"
  137. Script6.Parent = Part2
  138. table.insert(cors,sandbox(Script6,function()
  139. -- declarations
  140.  
  141. local head = script.Parent
  142. local sound = head:findFirstChild("Victory")
  143.  
  144. function onTouched(part)
  145. local h = part.Parent:findFirstChild("Humanoid")
  146. if h~=nil then
  147. sound:play()
  148. if part.Parent:findFirstChild("Head"):findFirstChild("face").Texture == nil then return end
  149. part.Parent:findFirstChild("Head"):findFirstChild("face").Texture="http://www.roblox.com/asset/?id=171121051"
  150. end
  151. end
  152.  
  153. script.Parent.Touched:connect(onTouched)
  154. end))
  155. Sound7.Name = "Victory"
  156. Sound7.Parent = Part2
  157. Sound7.SoundId = "rbxasset://sounds/victory.wav"
  158. Sound7.Volume = 0.20000000298023
  159. Sound8.Name = "Scream"
  160. Sound8.Parent = Part2
  161. Sound8.Pitch = 0.69999998807907
  162. Sound8.Volume = 1
  163. BodyForce9.Parent = Part2
  164. BodyForce9.force = Vector3.new(0, 97.5988159, 0)
  165. Script10.Parent = Part2
  166. table.insert(cors,sandbox(Script10,function()
  167. --created by govinda4320.its a another starter script by govinda4320.just read the instructions and if there is a message saying "don't mess with this"then don't mess with it
  168. function onTouched(hit)
  169. local human = hit.Parent:FindFirstChild("Humanoid") --this checks if its a robloxian touching the brick
  170. if (human ~= nil) then --If it is a real robloxian, then the brick kills them.but don't worry robloxiands don't die.and don't mess with this
  171. human.Health = 0
  172. human:breakjoint()
  173. print("pwned lol")
  174. end--don't mess with this
  175. end--don't mess with this
  176.  
  177. if (script.Parent ~= nil) and (script.Parent.className == "Part") then --this means that is this script is in a smoothblockmodel then the script will work.but don't mess with this
  178. connection = script.Parent.Touched:connect(onTouched)--don't mess with this
  179. end--don't mess with dis at all.but if you good scripter then you understand not to mess with it and what it means
  180.  
  181.  
  182. end))
  183. BodyGyro11.Parent = Part2
  184. Script12.Name = "Expire"
  185. Script12.Parent = Part2
  186. table.insert(cors,sandbox(Script12,function()
  187. local s = Instance.new("Sound")
  188. local self = script.Parent
  189.  
  190. s.Name = "BMusic"
  191. s.SoundId = "rbxasset://sounds/uuhhh.wav"
  192. s.Volume = 1
  193. s.Pitch = 1
  194. s.Looped = false
  195. s.archivable = false
  196.  
  197.  
  198. print("expire script!!!!! nao u eat brecks.")
  199. wait(180)
  200. print("ded")
  201. s:play()
  202. self:remove()
  203. end))
  204. Script13.Name = "VirusScript"
  205. Script13.Parent = Part2
  206. table.insert(cors,sandbox(Script13,function()
  207. wait(1)
  208. coroutine.resume(coroutine.create(function()
  209. wait(1)
  210. end))
  211.  
  212. script.Parent.Touched:connect(function(hit)
  213. if hit == nil then return end
  214. if hit.Parent == nil or hit.Name == "Virus" or hit:FindFirstChild("InfectedScript") ~= nil then return end
  215. local s = script.InfectedScript:clone()
  216. local t = script:clone()
  217. t.Disabled = true
  218. t.Parent = s
  219. s.Disabled = false
  220. s.Parent = hit
  221. GetTarget()
  222. end)
  223.  
  224. function attack(what)
  225. if (what.Locked == true) then return end
  226. while what ~= nil and what:FindFirstChild("InfectedScript") == nil and what.Parent ~= nil do
  227. script.Parent.CFrame = CFrame.new(script.Parent.Position,what.Position)
  228. script.Parent.Velocity = script.Parent.CFrame.lookVector*100
  229. wait(0.1)
  230. end
  231. GetTarget()
  232. end
  233.  
  234. function find(w)
  235. if #w:GetChildren() == 0 then return end
  236. for _,v in pairs(w:GetChildren()) do
  237. if v.Name ~= "Virus" and v:FindFirstChild("VirusScript") == nil then
  238. if v.className == "Part" and v.Locked ~= true then
  239. table.insert(a,v)
  240. end
  241. find(v)
  242. end
  243. end
  244. end
  245.  
  246. function GetTarget()
  247. wait(.1)
  248. a = {}
  249. find(game.Workspace)
  250.  
  251. if #a == 0 then GetTarget()end
  252.  
  253. min = 99999
  254. target = nil
  255.  
  256. for _,v in pairs(a) do
  257. if (script.Parent.Position-v.Position).magnitude < min and v.Name ~= "Virus" or v.locked ~= true and v:FindFirstChild("InfectedScript") == nil then
  258. min = (script.Parent.Position-v.Position).magnitude
  259. target = v
  260. end
  261. end
  262.  
  263. if target == nil or target.Locked == true then GetTarget()end
  264. --found out the problem
  265.  
  266. attack(target)
  267. end
  268.  
  269. GetTarget()
  270.  
  271. end))
  272. Script14.Name = "version"
  273. Script14.Parent = Model0
  274. table.insert(cors,sandbox(Script14,function()
  275. print 'version 0.5'
  276. --figured out how to keep them from eating locked parts
  277. end))
  278. for i,v in pairs(mas:GetChildren()) do
  279. v.Parent = workspace
  280. pcall(function() v:MakeJoints() end)
  281. end
  282. mas:Destroy()
  283. for i,v in pairs(cors) do
  284. spawn(function()
  285. pcall(v)
  286. end)
  287. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement