Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[Made by DevSersponge]]--
- --[[Egg laying script..lol]]--
- print'Made by DevSersponge'
- local instructions = "to make someone lay an egg use this command (lay egg person)"
- local instructions2 = "EX: if the player name is potatokiller42 you would do (lay egg potato)"
- warn(instructions)
- warn(instructions2)
- timetogrow = 1
- local admin = {"WaverlyCoal", "nub"} -- who can use lay egg?
- local stuff = {"Hi mommy!","How are you mommy","Can we play?","I wanna play","I love you","Hugs!!","You're soo cool!","I wanna be like you someday","My mom is the best!","I'm the luckiest person on the world","I really love you!","Hi!"}
- local Dstuff = {"I-I dont feel soo good","I'm feeling bad..","It hurts!","I-I'm Scared","I-I will always love you","Mommy help me!","It hurts soo much","*sob* mommy!!","Mommy hold my hand please!"}
- local numberKeypoints = {
- -- API: NumberSequenceKeypoint.new(time, size, envelop)
- NumberSequenceKeypoint.new( 0, 0); -- At t=0, fully transparent
- NumberSequenceKeypoint.new(.1, .25); -- At t=.1, fully opaque
- NumberSequenceKeypoint.new(.5, .5); -- At t=.5, mostly opaque
- NumberSequenceKeypoint.new( 1, 1); -- At t=1, fully transparent
- }
- local numberKeypoints2 = {
- -- API: NumberSequenceKeypoint.new(time, size, envelop)
- NumberSequenceKeypoint.new( 0, .5); -- At t=0, fully transparent
- NumberSequenceKeypoint.new(.1, .75); -- At t=.1, fully opaque
- NumberSequenceKeypoint.new(.5, .95); -- At t=.5, mostly opaque
- NumberSequenceKeypoint.new( 1, 1); -- At t=1, fully transparent
- }
- local numberKeypoints3 = {
- -- API: NumberSequenceKeypoint.new(time, size, envelop)
- NumberSequenceKeypoint.new( 0, .95); -- At t=0, fully transparent
- NumberSequenceKeypoint.new(.1, .97); -- At t=.1, fully opaque
- NumberSequenceKeypoint.new(.5, .98); -- At t=.5, mostly opaque
- NumberSequenceKeypoint.new( 1, 1); -- At t=1, fully transparent
- }
- local function createson(wat,who)
- local son = Instance.new("Part", workspace)
- son.Position = wat.Position
- local dying = false
- son.Size = Vector3.new(2,2,2)
- son.Color = who.Torso.Color
- local head = son
- local bbg = Instance.new("BillboardGui",head)
- bbg.Size = UDim2.new(2,0,1,0)
- bbg.AlwaysOnTop = true
- bbg.StudsOffsetWorldSpace = Vector3.new(0,3,0)
- local ttb = Instance.new("TextBox", bbg)
- ttb.Size = UDim2.new(2, 0, 1, 0)
- ttb.Position = UDim2.new(-0.5, 0, -0.5, 0)
- ttb.BackgroundTransparency = 1
- ttb.TextScaled = true
- local gender2 = math.random(1,2)
- local gender = "kek"
- if gender2 == 1 then
- gender = "Boy"
- elseif gender2 == 2 then
- gender = "Girl"
- end
- ttb.Text = ("hi".. " ".. who.Name.. " ".. "i'm".. " ".. "a".. " ".. gender)
- ttb.TextColor3 = Color3.new(1,1,9)
- local txtsp = 0.04
- local fol = Instance.new("BodyPosition", son)
- local distancesize = Vector3.new(2, 1, 0)
- spawn(function()
- while true do
- wait(5)
- if dying == false then
- local text = stuff[math.random(1,#stuff)]
- for i = 1, #text do
- ttb.Text = string.sub(text, 1, i)
- wait(txtsp)
- end
- wait(.6)
- ttb.Text = " "
- else
- local text = Dstuff[math.random(1,#Dstuff)]
- for i = 1, #text do
- ttb.Text = string.sub(text, 1, i)
- wait(txtsp)
- end
- wait(1)
- ttb.Text = " "
- end
- end
- end)
- spawn(function() -- growing and dying
- for i=0,5,0.1 do
- son.Size = son.Size + Vector3.new(.1,.1,.1)
- --son.Color = son.Color + Color3.new(0,0,1)
- distancesize = distancesize + Vector3.new(.1, .1, .1)
- wait(1)
- end
- dying = true
- wait(1)
- son.BrickColor = BrickColor.new("Really black")
- --son.Material = "Neon"
- fol:Remove()
- wait(12)
- local partc = Instance.new("ParticleEmitter",son)
- partc.Rate = 99999999999999999999999
- partc.Lifetime = NumberRange.new(0.1,4)
- partc.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,4,0),NumberSequenceKeypoint.new(1,0,0)})
- partc.Speed = NumberRange.new(10,20)
- partc.VelocitySpread = NumberRange.new(0, 15)
- partc.SpreadAngle = Vector2.new(0,3)
- son.Material = "Neon"
- for i=0,5,0.1 do
- son.Transparency = son.Transparency + 0.02
- wait()
- end
- partc.Transparency = NumberSequence.new(numberKeypoints)
- wait(1)
- partc.Transparency = NumberSequence.new(numberKeypoints2)
- wait(1)
- partc.Transparency = NumberSequence.new(numberKeypoints3)
- wait(2)
- son:Remove()
- end)
- spawn(function()
- while wait() do
- fol.Position = who.Head.CFrame:pointToWorldSpace(distancesize)
- end
- end)
- end
- local function hatch(wat)
- wat.Size = wat.lool.Scale
- wat:ClearAllChildren()
- local mew = Instance.new("Part", wat)
- mew.Size = wat.Size * 2 - Vector3.new(0,5,0)
- mew.Position = wat.Position
- mew.BrickColor = BrickColor.new("Bright yellow")
- mew.Material = "Glass"
- wat.Size = wat.Size / 2
- asd = wat:Clone()
- asd.Parent = workspace
- wat.Position = wat.Position + Vector3.new(3,0,1)
- end
- local function goodhatch(wat,who)
- wat.Size = wat.lool.Scale
- wat:ClearAllChildren()
- wat.Size = wat.Size / 2
- dsa = wat:Clone()
- dsa.Parent = workspace
- wat.Position = wat.Position + Vector3.new(3,0,1)
- createson(wat,who)
- end
- local function egg(guy)
- local rad = math.rad
- local char = guy
- local tors = char.Torso
- local egg = Instance.new("Part", workspace)
- local egpow = 60
- local hatched = false
- egg.Name = (guy.Name.. "'s".. "".."egg")
- egg.Color = Color3.new(1,1,9)
- --egg.Color = tors.Color
- egg.Material = "Marble"
- local mesh = Instance.new("SpecialMesh", egg)
- mesh.MeshType = "Sphere"
- mesh.Name = "lool"
- mesh.Scale = Vector3.new(.3,1.2,.56) --(.3,1.2,.56)
- egg.CFrame = tors.CFrame
- egg.CanCollide = false
- local wld = Instance.new("Weld", tors)
- wld.Part0 = tors
- wld.Part1 = egg
- wld.C0 = tors.CFrame:Inverse()
- wld.C1 = egg.CFrame:Inverse()
- wld.C0 = CFrame.new(0,-.8,0)*CFrame.Angles(rad(0),rad(90),rad(0))
- local CFrame1=wld.C0
- local CFrame2=CFrame.new(0,-.8,1) * CFrame.Angles(rad(-90),rad(0),rad(0))
- for i=0,0.9,.09 do
- wld.C0=CFrame1:lerp(CFrame2,i)
- wait()
- end
- egg.CanCollide = true
- wld:Remove()
- --t8k care of ur egg
- spawn(function()
- for i=0,5,0.1 do
- mesh.Scale = mesh.Scale + Vector3.new(.3,1.2,.56) / 10
- wait(timetogrow)
- end
- if hatched == false then
- goodhatch(egg,guy)
- end
- end)
- spawn(function()
- egvel = math.floor(math.sqrt((egg.Velocity.X^2)+(egg.Velocity.Y^2)+(egg.Velocity.Z^2)))
- egg.Touched:connect(function(hit)
- hitvel = math.floor(math.sqrt((hit.Velocity.X^2)+(hit.Velocity.Y^2)+(hit.Velocity.Z^2)))
- if egvel > egpow or hitvel > egpow / 3 then
- if hatched == false then
- hatched = true
- hatch(egg)
- end
- end
- end)
- end)
- end
- function onChatted(msg)
- if string.sub(msg, 1, 8) == "lay egg " then
- said = string.lower(string.sub(msg, 9))
- look = game:GetService("Players"):GetChildren()
- for i = 1, #look do
- if string.find(string.lower(look[i].Name), said) == 1 then
- ch = look[i].Character
- pcall(function()
- egg(ch)
- end)
- end
- end
- end
- end
- for _, v in pairs(game:GetService("Players"):GetChildren()) do
- for i = 1, #admin do
- if v.Name == admin[i] then
- v.Chatted:connect(onChatted)
- end
- end
- end
- --end
- --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement