yamanohera155233

epic

Jun 2nd, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.40 KB | None | 0 0
  1. math.randomseed(tick())
  2.  
  3. Players_Met = {}
  4. Target = nil
  5. Tones = {
  6. Enum.ChatColor.Blue,
  7. Enum.ChatColor.Green,
  8. Enum.ChatColor.Red,
  9. }
  10.  
  11. Random_Thoughts = {
  12. "Oh boy! Such a sunny day.",
  13. "Lalalala..",
  14. "Meh.",
  15. "Hmm..",
  16. }
  17.  
  18. Neutral_Answers = {
  19. Hello = {
  20. "Hi.",
  21. "Hello.",
  22. },
  23. }
  24.  
  25. local Asset = "http://www.roblox.com/asset/?id="
  26.  
  27. Shirtss = {Asset.."48121909", Asset.."13563477", Asset.."7825492", Asset.."49299226", Asset.."49299226", Asset.."25813650", Asset.."7825464", Asset.."50629907", Asset.."44096838", Asset.."19423653", Asset.."45506671", Asset.."50629907", Asset.."50629907"}
  28. Pantss = {Asset.."48121928", Asset.."13563502", Asset.."7825668", Asset.."30703758", Asset.."7825663", Asset.."19954576", Asset.."44097222", Asset.."19425981", Asset.."45506330", Asset.."19954576", Asset.."19954576"}
  29. Names = {"Joe", "Mark", "Carl", "Homer", "Kyle", "Stan", "Clyde", "Mick", "Nick", "Rick", "Peter", "Bucky", "Greg", "Eric",
  30. "Joel", "Kim", "Lenny", "Barney", "Aaron", "Allan", "Andrew", "Brian", "Chad", "Chris", "Daniel", "David",
  31. "Edward",
  32. }
  33.  
  34. function Part(P, Anch, Coll, Tran, Ref, Col, X, Y, Z)
  35. local p = Instance.new("Part")
  36. p.TopSurface = 0
  37. p.BottomSurface = 0
  38. p.Transparency = Tran
  39. p.Reflectance = Ref
  40. p.CanCollide = Coll
  41. p.Anchored = Anch
  42. p.BrickColor = BrickColor.new(Col)
  43. p.formFactor = "Custom"
  44. p.Size = Vector3.new(X,Y,Z)
  45. p.Parent = P
  46. p.Locked = true
  47. p:BreakJoints()
  48. return p
  49. end
  50.  
  51. function Weld(P0, P1, X, Y, Z, A, B, C)
  52. local w = Instance.new("Weld")
  53. w.Part0 = P0
  54. w.Part1 = P1
  55. w.C1 = CN(X, Y, Z) * CA(A, B, C)
  56. w.Parent = P0
  57. return w
  58. end
  59.  
  60. CA = CFrame.Angles
  61. CN = CFrame.new
  62. V3 = Vector3.new
  63. MR = math.rad
  64. MP = math.pi
  65. MRA = math.random
  66. MH = math.huge
  67.  
  68. Noob = nil
  69.  
  70. function MakeMotor(torso, p1, c0, c1)
  71. local mot = Instance.new("Motor6D")
  72. mot.C0 = c0
  73. mot.C1 = c1
  74. mot.Part0 = torso
  75. mot.Part1 = p1
  76. mot.Parent = torso
  77. return mot
  78. end
  79.  
  80. function Set(tab)
  81. for _,v in pairs(tab) do
  82. local motor = v[1]
  83. local vel = v[2]
  84. local des = v[3]
  85. motor.MaxVelocity = vel
  86. motor.DesiredAngle = des
  87. end
  88. end
  89.  
  90. function Animate(Hum, RSH, LSH, RH, LH)
  91. local pose = "Standing"
  92. local function sit()
  93. pose = "Seated"
  94. end
  95. local function jump()
  96. pose = "Jumping"
  97. end
  98. local function died()
  99. pose = "Dead"
  100. end
  101. local function falling()
  102. pose = "Falling"
  103. end
  104. local function climbing()
  105. pose = "Climbing"
  106. end
  107. local function run(speed)
  108. if speed > 0.5 then
  109. pose = "Running"
  110. else
  111. pose = "Standing"
  112. end
  113. end
  114. local function move(tiem)
  115. local amplitude, frequency
  116. if pose == "Seated" then
  117. Set({{RSH, 0.15, math.pi/2}, {LSH, 0.15, -math.pi/2}, {LH, 0.15, math.pi/2}, {RH, 0.15, -math.pi/2}})
  118. return
  119. end
  120. if pose == "Jumping" then
  121. Set({{RSH, 0.3, math.pi}, {LSH, 0.3, -math.pi}, {LH, 0.3, 0}, {RH, 0.3, 0}})
  122. return
  123. end
  124. if pose == "Falling" then
  125. Set({{RSH, 0.35, math.pi}, {LSH, 0.35, -math.pi}, {LH, 0.35, 0}, {RH, 0.35, 0}})
  126. return
  127. end
  128. local climb = 0
  129. if pose == "Running" then
  130. RSH.MaxVelocity = 0.15
  131. LSH.MaxVelocity = 0.15
  132. RH.MaxVelocity = 0.15
  133. LH.MaxVelocity = 0.15
  134. amplitude = 1
  135. frequency = 8
  136. elseif pose == "Climbing" then
  137. RSH.MaxVelocity = 0.3
  138. LSH.MaxVelocity = 0.3
  139. RH.MaxVelocity = 0.15
  140. LH.MaxVelocity = 0.15
  141. amplitude = 1
  142. frequency = 8
  143. climb = math.pi
  144. else
  145. amplitude = 0.1
  146. frequency = 1
  147. end
  148. des = amplitude * math.sin(tiem*frequency)
  149. RSH.DesiredAngle = des + climb
  150. LSH.DesiredAngle = des - climb
  151. RH.DesiredAngle = -des
  152. LH.DesiredAngle = -des
  153. end
  154. Hum.Jumping:connect(jump)
  155. Hum.Running:connect(run)
  156. Hum.Seated:connect(sit)
  157. Hum.Died:connect(died)
  158. Hum.FreeFalling:connect(falling)
  159. Hum.Climbing:connect(climbing)
  160. coroutine.resume(coroutine.create(function()
  161. while pose ~= "Dead" do
  162. local _, time = wait(0.1)
  163. move(time)
  164. end
  165. end))
  166. end
  167.  
  168. function MakeNoob(pos, scale)
  169. local Name = Names[MRA(1,#Names)]
  170. local Nub = Instance.new("Model")
  171. Nub.Name = Name
  172. Noob = Nub
  173. local Torso = Part(Nub, false, false, 0, 0, "Bright blue", 2*scale, 2*scale, 1*scale)
  174. Torso.Name = "Torso"
  175. local Head = Part(Nub, false, false, 0, 0, "Bright yellow", 2*scale, 1*scale, 1*scale)
  176. Head.Name = "Head"
  177. local Neck = MakeMotor(Torso, Head, CN(0, 1*scale, 0), CN(0, -0.5*scale, 0))
  178. local HeadMesh = Instance.new("SpecialMesh",Head)
  179. HeadMesh.Scale = V3(1.25, 1.25, 1.25)
  180. local Face = Instance.new("Decal",Head)
  181. Face.Face = "Front"
  182. Face.Texture = Asset..(13038247)
  183. local Rarm = Part(Nub, false, false, 0, 0, "Bright yellow", 1*scale, 2*scale, 1*scale)
  184. Rarm.Name = "Right Arm"
  185. local Larm = Part(Nub, false, false, 0, 0, "Bright yellow", 1*scale, 2*scale, 1*scale)
  186. Larm.Name = "Left Arm"
  187. local Rleg = Part(Nub, false, false, 0, 0, "Br. yellowish green", 1*scale, 2*scale, 1*scale)
  188. Rleg.Name = "Right Leg"
  189. local Lleg = Part(Nub, false, false, 0, 0, "Br. yellowish green", 1*scale, 2*scale, 1*scale)
  190. Lleg.Name = "Left Leg"
  191. local RSH = MakeMotor(Torso, Rarm, CN(1*scale, 0.5*scale, 0) * CA(0, MR(90), 0), CN(-0.5*scale, 0.5*scale, 0) * CA(0, MR(90), 0))
  192. local LSH = MakeMotor(Torso, Larm, CN(-1*scale, 0.5*scale, 0) * CA(0, MR(-90), 0), CN(0.5*scale, 0.5*scale, 0) * CA(0, MR(-90), 0))
  193. local RH = MakeMotor(Torso, Rleg, CN(0.5*scale, -1*scale, 0) * CA(0, MR(-90), 0), CN(0, 1*scale, 0) * CA(0, MR(-90), 0))
  194. local LH = MakeMotor(Torso, Lleg, CN(-0.5*scale, -1*scale, 0) * CA(0, MR(90), 0), CN(0, 1*scale, 0) * CA(0, MR(90), 0))
  195. local Shirt = Instance.new("Shirt", Nub)
  196. local Pants = Instance.new("Pants", Nub)
  197. Shirt.ShirtTemplate = Shirtss[MRA(1,#Shirtss)]
  198. Pants.PantsTemplate = Pantss[MRA(1,#Pantss)]
  199. local Hum = Instance.new("Humanoid")
  200. Hum.MaxHealth = 40+(scale*60)
  201. Hum.Health = 100
  202. Hum.Parent = Nub
  203. Nub.Parent = workspace
  204. Nub:MakeJoints()
  205. Nub:MoveTo(pos)
  206. Animate(Hum,RSH,LSH,RH,LH)
  207. --[[Hum.Died:connect(function()
  208. wait(6)
  209. Nub:remove()
  210. wait(4)
  211. MakeNoob(pos, scale)
  212. end)]]
  213. return {Name = Name, Model = Nub, Humanoid = Hum, Torso = Torso, Head = Head, Rarm = Rarm, Larm = Larm, Rleg = Rleg, Lleg = Lleg, RSH = RSH, LSH = LSH, RH = RH, LH = LH, Neck = Neck}
  214. end
  215.  
  216. local Npc = MakeNoob(V3(MRA(-20, 20),10,MRA(-20, 20)), 1)
  217.  
  218. function Chat(msg, tone)
  219. local tone = tone
  220. if tone == nil then tone = 1 end
  221. game:GetService("Chat"):Chat(Npc.Head, msg, Tones[tone] or 1)
  222. end
  223.  
  224. wait(1.5)
  225.  
  226. Chat(("Hello! My name is %s."):format(Npc.Name))
  227.  
  228. while true do
  229.  
  230. wait(0.4)
  231. end
Add Comment
Please, Sign In to add comment