Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- 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")
- BoolValue1 = Instance.new("BoolValue")
- Part2 = Instance.new("Part")
- Script3 = Instance.new("Script")
- Decal4 = Instance.new("Decal")
- PointLight5 = Instance.new("PointLight")
- Script6 = Instance.new("Script")
- Sound7 = Instance.new("Sound")
- Sound8 = Instance.new("Sound")
- BodyForce9 = Instance.new("BodyForce")
- Script10 = Instance.new("Script")
- BodyGyro11 = Instance.new("BodyGyro")
- Script12 = Instance.new("Script")
- Script13 = Instance.new("Script")
- Script14 = Instance.new("Script")
- Model0.Name = "Yummey!"
- Model0.Parent = mas
- BoolValue1.Name = "on"
- BoolValue1.Parent = Model0
- BoolValue1.Value = true
- Part2.Name = "Yummey"
- Part2.Parent = Model0
- Part2.Material = Enum.Material.SmoothPlastic
- Part2.BrickColor = BrickColor.new("Bright red")
- Part2.FormFactor = Enum.FormFactor.Symmetric
- Part2.Shape = Enum.PartType.Ball
- Part2.Size = Vector3.new(1, 1, 1)
- Part2.CFrame = CFrame.new(42, 0.500012994, 49, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part2.Color = Color3.new(0.768628, 0.156863, 0.109804)
- Part2.Position = Vector3.new(42, 0.500012994, 49)
- Part2.Color = Color3.new(0.768628, 0.156863, 0.109804)
- Script3.Name = "clome"
- Script3.Parent = Part2
- table.insert(cors,sandbox(Script3,function()
- eatlocked = 0 --Leave this as "0", or else it will delete anything locked.
- duplicate = 1 -- set this to 0 if you don't want them to duplicate after eating five parts
- --[[I (kind of) made this script myself, because I copy and pasted
- everything i had in reach.
- i guess this is my first complete script.
- every other script in this model isn't made by me except the expire script.
- I only modified them.
- Modified the VirusScript to prevent the things from eating locked parts.
- ]]--
- local yummeyp = 0
- local brecksaet = 0
- local s = Instance.new("Sound")
- local self = script.Parent
- s.Name = "BGMusic"
- s.SoundId = "http://www.roblox.com/asset/?id=16213987"
- s.Volume = 1
- s.Pitch = 1
- s.Looped = false
- s.archivable = false
- s.Parent = script.Parent
- function cloneobjectpls()
- print("clone")
- local a=script.Parent:clone()
- --a.Script:remove()
- a.Position=script.Parent.Position
- a.Parent=script.Parent.Parent
- a.CanCollide=true
- a.Anchored=false
- a.Color = Color3.new (math.random (), math.random (), math.random () )
- a.Reflectance = 0
- yummeyp = 0
- end
- function eat_brecks_pls()
- print("I liek aeting thengs!")
- --yes
- brecksaet = brecksaet + 1
- yummeyp = yummeyp + 1
- if yummeyp == 5 then
- cloneobjectpls()
- end
- print("yummey")
- s:play()
- end
- function onTouched(hit)
- if (hit ~= nil) then
- if (hit.Name == "Yummey") or (hit.Name == "Powerup Box") then return end
- if (hit.locked == true) then
- if eatlocked == 1 then
- hit:remove()
- eat_brecks_pls()
- end
- end
- if (hit.Locked == false) then
- hit:remove()
- eat_brecks_pls()
- end
- end
- end
- connection = script.Parent.Touched:connect(onTouched)
- end))
- Decal4.Parent = Part2
- Decal4.Texture = "http://www.roblox.com/asset/?id=171121051"
- PointLight5.Parent = Part2
- PointLight5.Color = Color3.new(1, 0, 0)
- PointLight5.Brightness = 10
- PointLight5.Color = Color3.new(1, 0, 0)
- Script6.Name = "Face"
- Script6.Parent = Part2
- table.insert(cors,sandbox(Script6,function()
- -- declarations
- local head = script.Parent
- local sound = head:findFirstChild("Victory")
- function onTouched(part)
- local h = part.Parent:findFirstChild("Humanoid")
- if h~=nil then
- sound:play()
- if part.Parent:findFirstChild("Head"):findFirstChild("face").Texture == nil then return end
- part.Parent:findFirstChild("Head"):findFirstChild("face").Texture="http://www.roblox.com/asset/?id=171121051"
- end
- end
- script.Parent.Touched:connect(onTouched)
- end))
- Sound7.Name = "Victory"
- Sound7.Parent = Part2
- Sound7.SoundId = "rbxasset://sounds/victory.wav"
- Sound7.Volume = 0.20000000298023
- Sound8.Name = "Scream"
- Sound8.Parent = Part2
- Sound8.Pitch = 0.69999998807907
- Sound8.Volume = 1
- BodyForce9.Parent = Part2
- BodyForce9.force = Vector3.new(0, 97.5988159, 0)
- Script10.Parent = Part2
- table.insert(cors,sandbox(Script10,function()
- --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
- function onTouched(hit)
- local human = hit.Parent:FindFirstChild("Humanoid") --this checks if its a robloxian touching the brick
- 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
- human.Health = 0
- human:breakjoint()
- print("pwned lol")
- end--don't mess with this
- end--don't mess with this
- 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
- connection = script.Parent.Touched:connect(onTouched)--don't mess with this
- 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
- end))
- BodyGyro11.Parent = Part2
- Script12.Name = "Expire"
- Script12.Parent = Part2
- table.insert(cors,sandbox(Script12,function()
- local s = Instance.new("Sound")
- local self = script.Parent
- s.Name = "BMusic"
- s.SoundId = "rbxasset://sounds/uuhhh.wav"
- s.Volume = 1
- s.Pitch = 1
- s.Looped = false
- s.archivable = false
- print("expire script!!!!! nao u eat brecks.")
- wait(180)
- print("ded")
- s:play()
- self:remove()
- end))
- Script13.Name = "VirusScript"
- Script13.Parent = Part2
- table.insert(cors,sandbox(Script13,function()
- wait(1)
- coroutine.resume(coroutine.create(function()
- wait(1)
- end))
- script.Parent.Touched:connect(function(hit)
- if hit == nil then return end
- if hit.Parent == nil or hit.Name == "Virus" or hit:FindFirstChild("InfectedScript") ~= nil then return end
- local s = script.InfectedScript:clone()
- local t = script:clone()
- t.Disabled = true
- t.Parent = s
- s.Disabled = false
- s.Parent = hit
- GetTarget()
- end)
- function attack(what)
- if (what.Locked == true) then return end
- while what ~= nil and what:FindFirstChild("InfectedScript") == nil and what.Parent ~= nil do
- script.Parent.CFrame = CFrame.new(script.Parent.Position,what.Position)
- script.Parent.Velocity = script.Parent.CFrame.lookVector*100
- wait(0.1)
- end
- GetTarget()
- end
- function find(w)
- if #w:GetChildren() == 0 then return end
- for _,v in pairs(w:GetChildren()) do
- if v.Name ~= "Virus" and v:FindFirstChild("VirusScript") == nil then
- if v.className == "Part" and v.Locked ~= true then
- table.insert(a,v)
- end
- find(v)
- end
- end
- end
- function GetTarget()
- wait(.1)
- a = {}
- find(game.Workspace)
- if #a == 0 then GetTarget()end
- min = 99999
- target = nil
- for _,v in pairs(a) do
- if (script.Parent.Position-v.Position).magnitude < min and v.Name ~= "Virus" or v.locked ~= true and v:FindFirstChild("InfectedScript") == nil then
- min = (script.Parent.Position-v.Position).magnitude
- target = v
- end
- end
- if target == nil or target.Locked == true then GetTarget()end
- --found out the problem
- attack(target)
- end
- GetTarget()
- end))
- Script14.Name = "version"
- Script14.Parent = Model0
- table.insert(cors,sandbox(Script14,function()
- print 'version 0.5'
- --figured out how to keep them from eating locked parts
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement