Advertisement
wamandnj

Untitled

Mar 4th, 2019
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[Made by DevSersponge]]--
  2. --[[Egg laying script..lol]]--
  3. print'Made by DevSersponge'
  4. local instructions = "to make someone lay an egg use this command (lay egg person)"
  5. local instructions2 = "EX: if the player name is potatokiller42 you would do (lay egg potato)"
  6. warn(instructions)
  7. warn(instructions2)
  8.  
  9. timetogrow = 1
  10. local admin = {"TameDoNotClick", "nub"} -- who can use lay egg?
  11. 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!"}
  12. 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!"}
  13.  
  14. local numberKeypoints = {
  15. -- API: NumberSequenceKeypoint.new(time, size, envelop)
  16. NumberSequenceKeypoint.new( 0, 0); -- At t=0, fully transparent
  17. NumberSequenceKeypoint.new(.1, .25); -- At t=.1, fully opaque
  18. NumberSequenceKeypoint.new(.5, .5); -- At t=.5, mostly opaque
  19. NumberSequenceKeypoint.new( 1, 1); -- At t=1, fully transparent
  20. }
  21. local numberKeypoints2 = {
  22. -- API: NumberSequenceKeypoint.new(time, size, envelop)
  23. NumberSequenceKeypoint.new( 0, .5); -- At t=0, fully transparent
  24. NumberSequenceKeypoint.new(.1, .75); -- At t=.1, fully opaque
  25. NumberSequenceKeypoint.new(.5, .95); -- At t=.5, mostly opaque
  26. NumberSequenceKeypoint.new( 1, 1); -- At t=1, fully transparent
  27. }
  28.  
  29. local numberKeypoints3 = {
  30. -- API: NumberSequenceKeypoint.new(time, size, envelop)
  31. NumberSequenceKeypoint.new( 0, .95); -- At t=0, fully transparent
  32. NumberSequenceKeypoint.new(.1, .97); -- At t=.1, fully opaque
  33. NumberSequenceKeypoint.new(.5, .98); -- At t=.5, mostly opaque
  34. NumberSequenceKeypoint.new( 1, 1); -- At t=1, fully transparent
  35. }
  36.  
  37. local function createson(wat,who)
  38. local son = Instance.new("Part", workspace)
  39. son.Position = wat.Position
  40. local dying = false
  41. son.Size = Vector3.new(2,2,2)
  42. son.Color = who.Torso.Color
  43. local head = son
  44. local bbg = Instance.new("BillboardGui",head)
  45. bbg.Size = UDim2.new(2,0,1,0)
  46. bbg.AlwaysOnTop = true
  47. bbg.StudsOffsetWorldSpace = Vector3.new(0,3,0)
  48. local ttb = Instance.new("TextBox", bbg)
  49. ttb.Size = UDim2.new(2, 0, 1, 0)
  50. ttb.Position = UDim2.new(-0.5, 0, -0.5, 0)
  51. ttb.BackgroundTransparency = 1
  52. ttb.TextScaled = true
  53. local gender2 = math.random(1,2)
  54. local gender = "kek"
  55. if gender2 == 1 then
  56. gender = "Boy"
  57. elseif gender2 == 2 then
  58. gender = "Girl"
  59. end
  60. ttb.Text = ("hi".. " ".. who.Name.. " ".. "i'm".. " ".. "a".. " ".. gender)
  61. ttb.TextColor3 = Color3.new(1,1,9)
  62. local txtsp = 0.04
  63. local fol = Instance.new("BodyPosition", son)
  64. local distancesize = Vector3.new(2, 1, 0)
  65. spawn(function()
  66. while true do
  67. wait(5)
  68. if dying == false then
  69. local text = stuff[math.random(1,#stuff)]
  70.  
  71. for i = 1, #text do
  72. ttb.Text = string.sub(text, 1, i)
  73. wait(txtsp)
  74. end
  75. wait(.6)
  76. ttb.Text = " "
  77. else
  78. local text = Dstuff[math.random(1,#Dstuff)]
  79. for i = 1, #text do
  80. ttb.Text = string.sub(text, 1, i)
  81. wait(txtsp)
  82. end
  83. wait(1)
  84. ttb.Text = " "
  85. end
  86. end
  87. end)
  88.  
  89. spawn(function() -- growing and dying
  90. for i=0,5,0.1 do
  91. son.Size = son.Size + Vector3.new(.1,.1,.1)
  92. --son.Color = son.Color + Color3.new(0,0,1)
  93. distancesize = distancesize + Vector3.new(.1, .1, .1)
  94. wait(1)
  95. end
  96. dying = true
  97. wait(1)
  98. son.BrickColor = BrickColor.new("Really black")
  99. --son.Material = "Neon"
  100. fol:Remove()
  101. wait(12)
  102. local partc = Instance.new("ParticleEmitter",son)
  103. partc.Rate = 99999999999999999999999
  104. partc.Lifetime = NumberRange.new(0.1,4)
  105. partc.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,4,0),NumberSequenceKeypoint.new(1,0,0)})
  106. partc.Speed = NumberRange.new(10,20)
  107. partc.VelocitySpread = NumberRange.new(0, 15)
  108. partc.SpreadAngle = Vector2.new(0,3)
  109. son.Material = "Neon"
  110. for i=0,5,0.1 do
  111. son.Transparency = son.Transparency + 0.02
  112. wait()
  113. end
  114. partc.Transparency = NumberSequence.new(numberKeypoints)
  115. wait(1)
  116. partc.Transparency = NumberSequence.new(numberKeypoints2)
  117. wait(1)
  118. partc.Transparency = NumberSequence.new(numberKeypoints3)
  119. wait(2)
  120. son:Remove()
  121. end)
  122. spawn(function()
  123. while wait() do
  124. fol.Position = who.Head.CFrame:pointToWorldSpace(distancesize)
  125. end
  126. end)
  127. end
  128. local function hatch(wat)
  129. wat.Size = wat.lool.Scale
  130. wat:ClearAllChildren()
  131. local mew = Instance.new("Part", wat)
  132. mew.Size = wat.Size * 2 - Vector3.new(0,5,0)
  133. mew.Position = wat.Position
  134. mew.BrickColor = BrickColor.new("Bright yellow")
  135. mew.Material = "Glass"
  136. wat.Size = wat.Size / 2
  137. asd = wat:Clone()
  138. asd.Parent = workspace
  139. wat.Position = wat.Position + Vector3.new(3,0,1)
  140. end
  141. local function goodhatch(wat,who)
  142. wat.Size = wat.lool.Scale
  143. wat:ClearAllChildren()
  144. wat.Size = wat.Size / 2
  145. dsa = wat:Clone()
  146. dsa.Parent = workspace
  147. wat.Position = wat.Position + Vector3.new(3,0,1)
  148. createson(wat,who)
  149. end
  150. local function egg(guy)
  151. local rad = math.rad
  152. local char = guy
  153. local tors = char.Torso
  154. local egg = Instance.new("Part", workspace)
  155. local egpow = 60
  156. local hatched = false
  157. egg.Name = (guy.Name.. "'s".. "".."egg")
  158. egg.Color = Color3.new(1,1,9)
  159. --egg.Color = tors.Color
  160. egg.Material = "Marble"
  161.  
  162. local mesh = Instance.new("SpecialMesh", egg)
  163. mesh.MeshType = "Sphere"
  164. mesh.Name = "lool"
  165. mesh.Scale = Vector3.new(.3,1.2,.56) --(.3,1.2,.56)
  166. egg.CFrame = tors.CFrame
  167. egg.CanCollide = false
  168. local wld = Instance.new("Weld", tors)
  169. wld.Part0 = tors
  170. wld.Part1 = egg
  171. wld.C0 = tors.CFrame:Inverse()
  172. wld.C1 = egg.CFrame:Inverse()
  173. wld.C0 = CFrame.new(0,-.8,0)*CFrame.Angles(rad(0),rad(90),rad(0))
  174.  
  175. local CFrame1=wld.C0
  176. local CFrame2=CFrame.new(0,-.8,1) * CFrame.Angles(rad(-90),rad(0),rad(0))
  177. for i=0,0.9,.09 do
  178. wld.C0=CFrame1:lerp(CFrame2,i)
  179. wait()
  180. end
  181. egg.CanCollide = true
  182. wld:Remove()
  183.  
  184. --t8k care of ur egg
  185.  
  186. spawn(function()
  187. for i=0,5,0.1 do
  188. mesh.Scale = mesh.Scale + Vector3.new(.3,1.2,.56) / 10
  189. wait(timetogrow)
  190. end
  191. if hatched == false then
  192. goodhatch(egg,guy)
  193. end
  194. end)
  195. spawn(function()
  196. egvel = math.floor(math.sqrt((egg.Velocity.X^2)+(egg.Velocity.Y^2)+(egg.Velocity.Z^2)))
  197. egg.Touched:connect(function(hit)
  198. hitvel = math.floor(math.sqrt((hit.Velocity.X^2)+(hit.Velocity.Y^2)+(hit.Velocity.Z^2)))
  199. if egvel > egpow or hitvel > egpow / 3 then
  200. if hatched == false then
  201. hatched = true
  202. hatch(egg)
  203. end
  204. end
  205. end)
  206. end)
  207. end
  208.  
  209. function onChatted(msg)
  210. if string.sub(msg, 1, 8) == "lay egg " then
  211. said = string.lower(string.sub(msg, 9))
  212. look = game:GetService("Players"):GetChildren()
  213. for i = 1, #look do
  214. if string.find(string.lower(look[i].Name), said) == 1 then
  215. ch = look[i].Character
  216. pcall(function()
  217. egg(ch)
  218. end)
  219. end
  220. end
  221. end
  222. end
  223.  
  224. for _, v in pairs(game:GetService("Players"):GetChildren()) do
  225. for i = 1, #admin do
  226. if v.Name == admin[i] then
  227. v.Chatted:connect(onChatted)
  228. end
  229. end
  230. end
  231. --end
  232. --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement